Skip to content

Commit

Permalink
MRG: Merge pull request #105 from octue/revert-104-feature/add-output…
Browse files Browse the repository at this point in the history
…-location-strand

Revert "Add output location strand"
  • Loading branch information
cortadocodes authored May 3, 2022
2 parents 60cbe16 + fe7b271 commit 2eab418
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 26 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

setup(
name="twined",
version="0.4.0",
version="0.4.1",
py_modules=[],
install_requires=["jsonschema ~= 4.4.0", "python-dotenv"],
url="https://www.github.com/octue/twined",
Expand Down
17 changes: 0 additions & 17 deletions tests/test_twine.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import json
import os

from twined import MANIFEST_STRANDS, Twine, exceptions
Expand Down Expand Up @@ -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")
5 changes: 0 additions & 5 deletions twined/schema/twine_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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_.\/-]*$"
}
}
}
3 changes: 0 additions & 3 deletions twined/twine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)


Expand Down

0 comments on commit 2eab418

Please sign in to comment.