From c8ac0312d0cbc451f4e5b536257a56687f57f7e9 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Mon, 2 May 2022 17:54:35 +0100 Subject: [PATCH 1/2] Revert "Add output location strand" --- setup.py | 2 +- tests/test_twine.py | 17 ----------------- twined/schema/twine_schema.json | 5 ----- twined/twine.py | 3 --- 4 files changed, 1 insertion(+), 26 deletions(-) diff --git a/setup.py b/setup.py index 779c2cd..c720dad 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setup( name="twined", - version="0.4.0", + version="0.3.1", py_modules=[], install_requires=["jsonschema ~= 4.4.0", "python-dotenv"], url="https://www.github.com/octue/twined", diff --git a/tests/test_twine.py b/tests/test_twine.py index fc69dd7..a347db9 100644 --- a/tests/test_twine.py +++ b/tests/test_twine.py @@ -1,4 +1,3 @@ -import json import os from twined import MANIFEST_STRANDS, Twine, exceptions @@ -159,19 +158,3 @@ def test_deprecation_warning_issued_if_datasets_not_given_as_dictionary_in_manif } }, ) - - def test_twine_with_invalid_output_location(self): - """Test that an error is raised if an invalid output location is given in the twine.""" - for invalid_output_location in ( - "https://my-bucket/output_datasets", - "dgs://my-bucket/output_datasets", - "not/a/cloud/path", - ): - with self.subTest(output_location=invalid_output_location): - with self.assertRaises(exceptions.InvalidTwineContents): - Twine(source=json.dumps({"output_location": invalid_output_location})) - - def test_twine_with_valid_output_location(self): - """Test that a valid output location passes validation.""" - twine = Twine(source=json.dumps({"output_location": "gs://my-bucket/output_datasets"})) - self.assertEqual(twine.output_location, "gs://my-bucket/output_datasets") diff --git a/twined/schema/twine_schema.json b/twined/schema/twine_schema.json index d465a6f..0974502 100644 --- a/twined/schema/twine_schema.json +++ b/twined/schema/twine_schema.json @@ -125,11 +125,6 @@ "output_manifest": {"$ref": "#/$defs/manifest"}, "output_values_schema": { "type": "object" - }, - "output_location": { - "description": "The path to a Google Cloud Storage directory to upload output datasets into. The way these datasets are organised within this directory is controlled in the app code.", - "type": "string", - "pattern": "^gs:\/\/[a-z\\d][a-z\\d_.\/-]*$" } } } diff --git a/twined/twine.py b/twined/twine.py index fbb1fa6..be4d143 100644 --- a/twined/twine.py +++ b/twined/twine.py @@ -26,14 +26,11 @@ CHILDREN_STRANDS = ("children",) -OUTPUT_LOCATION_STRAND = ("output_location",) - ALL_STRANDS = ( *SCHEMA_STRANDS, *MANIFEST_STRANDS, *CREDENTIAL_STRANDS, *CHILDREN_STRANDS, - *OUTPUT_LOCATION_STRAND, ) From fe7b271841028eb136d22c6908c273bf1f0851f3 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Mon, 2 May 2022 17:55:46 +0100 Subject: [PATCH 2/2] OPS: Increase patch version number --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c720dad..866a997 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setup( name="twined", - version="0.3.1", + version="0.4.1", py_modules=[], install_requires=["jsonschema ~= 4.4.0", "python-dotenv"], url="https://www.github.com/octue/twined",