diff --git a/setup.py b/setup.py index 79c367d..0b3f599 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setup( name="twined", - version="0.2.0", + version="0.2.1", py_modules=[], install_requires=["jsonschema ~= 3.2.0", "python-dotenv"], url="https://www.github.com/octue/twined", diff --git a/tests/test_children.py b/tests/test_children.py index 5f47c2d..0631dbb 100644 --- a/tests/test_children.py +++ b/tests/test_children.py @@ -60,8 +60,7 @@ class TestChildrenValidation(BaseTestCase): "id": "some-id", "backend": { "name": "GCPPubSubBackend", - "project_name": "my-project", - "credentials_environment_variable": "GCP_SERVICE_ACCOUNT" + "project_name": "my-project" } } ] @@ -72,12 +71,12 @@ def test_no_children(self): Twine().validate_children(source=[]) def test_missing_children(self): - """Test that a twine with children will not validate on an empty children input""" + """Test that a twine with children will not validate on an empty children input.""" with self.assertRaises(exceptions.InvalidValuesContents): Twine(source=self.VALID_TWINE_WITH_CHILDREN).validate_children(source=[]) def test_extra_children(self): - """Test that a twine with no children will not validate a non-empty children input""" + """Test that a twine with no children will not validate a non-empty children input.""" with self.assertRaises(exceptions.InvalidValuesContents): Twine().validate_children(source=self.VALID_CHILD_VALUE) @@ -111,8 +110,7 @@ def test_extra_key_validation_on_valid_twine(self): "id": "some-id", "backend": { "name": "GCPPubSubBackend", - "project_name": "my-project", - "credentials_environment_variable": "GCP_SERVICE_ACCOUNT" + "project_name": "my-project" }, "some_extra_property": "should not be a problem if present" } diff --git a/twined/schema/children_schema.json b/twined/schema/children_schema.json index 80b3778..1da053d 100644 --- a/twined/schema/children_schema.json +++ b/twined/schema/children_schema.json @@ -27,13 +27,9 @@ "project_name": { "description": "Name of the Google Cloud Platform (GCP) project the child exists in.", "type": "string" - }, - "credentials_environment_variable": { - "description": "Name of environment variable containing either the absolute path to a Google Cloud Platform credentials JSON file or the JSON itself as a string.", - "type": "string" } }, - "required": ["name", "project_name", "credentials_environment_variable"] + "required": ["name", "project_name"] } ] } diff --git a/twined/twine.py b/twined/twine.py index 5cb2255..4faf357 100644 --- a/twined/twine.py +++ b/twined/twine.py @@ -187,7 +187,7 @@ def _validate_manifest(self, kind, source, cls=None, **kwargs): data["datasets"] = {dataset["name"]: dataset for dataset in data["datasets"]} warnings.warn( message=( - "Datasets belonging to a manifest should be provided as a dictionary mapping their name to" + "Datasets belonging to a manifest should be provided as a dictionary mapping their name to " "themselves. Support for providing a list of datasets will be phased out soon." ), category=DeprecationWarning,