From cf72369613d46dd6e9fac793b7623be718aa2cd0 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Mon, 10 May 2021 12:48:29 +0100 Subject: [PATCH 1/9] DOC: Update tags format in examples --- .../data/configuration_manifest.json | 4 ++-- .../data/input_manifest.json | 12 ++++++------ .../data/output_manifest.json | 4 ++-- .../data/output_manifest.json | 18 +++++++++--------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/examples/damage_classifier_service/data/configuration_manifest.json b/examples/damage_classifier_service/data/configuration_manifest.json index 8acf4c2..0bfcfdd 100644 --- a/examples/damage_classifier_service/data/configuration_manifest.json +++ b/examples/damage_classifier_service/data/configuration_manifest.json @@ -5,14 +5,14 @@ "id": "7ead7669-8162-4f64-8cd5-4abe92509e17", "name": "training data for system abc123", "organisation": "megacorp", - "tags": "classifier, damage, system:abc123", + "tags": ["classifier", "damage", "system:abc123"], "files": [ { "path": "datasets/7ead7669/blade_damage.mdl", "cluster": 0, "sequence": 0, "extension": "csv", - "tags": "", + "tags": [], "posix_timestamp": 0, "id": "abff07bc-7c19-4ed5-be6d-a6546eae8e86", "last_modified": "2019-02-28T22:40:30.533005Z", diff --git a/examples/met_mast_scada_service/data/input_manifest.json b/examples/met_mast_scada_service/data/input_manifest.json index a2b3242..b4f42be 100644 --- a/examples/met_mast_scada_service/data/input_manifest.json +++ b/examples/met_mast_scada_service/data/input_manifest.json @@ -4,14 +4,14 @@ { "id": "7ead7669-8162-4f64-8cd5-4abe92509e17", "name": "meteorological mast dataset", - "tags": "met, mast, wind, location:108346", + "tags": ["met", "mast", "wind", "location:108346"], "files": [ { "path": "input/datasets/7ead7669/mast_1.csv", "cluster": 0, "sequence": 0, "extension": "csv", - "tags": "", + "tags": [], "posix_timestamp": 1551393630, "id": "abff07bc-7c19-4ed5-be6d-a6546eae8e86", "last_modified": "2019-02-28T22:40:30.533005Z", @@ -24,7 +24,7 @@ "cluster": 0, "sequence": 1, "extension": "csv", - "tags": "", + "tags": [], "posix_timestamp": 1551394230, "id": "bbff07bc-7c19-4ed5-be6d-a6546eae8e45", "last_modified": "2019-02-28T22:50:40.633001Z", @@ -37,14 +37,14 @@ { "id": "5cf9e445-c288-4567-9072-edc31003b022", "name": "scada data exports", - "tags": "wind, turbine, scada, system:ab32, location:108346", + "tags": ["wind", "turbine", "scada", "system:ab32", "location:108346"], "files": [ { "path": "input/datasets/7ead7669/export_1.csv", "cluster": 0, "sequence": 0, "extension": "csv", - "tags": "", + "tags": [], "posix_timestamp": 1551393600, "id": "78fa511f-3e28-4bc2-aa28-7b6a2e8e6ef9", "last_modified": "2019-02-28T22:40:00.000000Z", @@ -57,7 +57,7 @@ "cluster": 0, "sequence": 1, "extension": "csv", - "tags": "", + "tags": [], "posix_timestamp": 1551394200, "id": "204d7316-7ae6-45e3-8f90-443225b21226", "last_modified": "2019-02-28T22:50:00.000000Z", diff --git a/examples/met_mast_scada_service/data/output_manifest.json b/examples/met_mast_scada_service/data/output_manifest.json index dc5aed0..50f7e89 100644 --- a/examples/met_mast_scada_service/data/output_manifest.json +++ b/examples/met_mast_scada_service/data/output_manifest.json @@ -5,14 +5,14 @@ "id": "4564deca-5654-42e8-aadf-70690b393a30", "name": "visual cross check data", "organisation": "megacorp", - "tags": "figure, met, mast, scada, check, location:108346", + "tags": ["figure", "met", "mast", "scada", "check", "location:108346"], "files": [ { "path": "datasets/7ead7669/cross_check.fig", "cluster": 0, "sequence": 0, "extension": "fig", - "tags": "", + "tags": [], "posix_timestamp": 1551394800, "id": "38f77fe2-c8c0-49d1-a08c-0928d53a742f", "last_modified": "2019-02-28T23:00:00.000000Z", diff --git a/examples/wind_tunnel_datalogger_service/data/output_manifest.json b/examples/wind_tunnel_datalogger_service/data/output_manifest.json index eac4ac4..ae2241e 100644 --- a/examples/wind_tunnel_datalogger_service/data/output_manifest.json +++ b/examples/wind_tunnel_datalogger_service/data/output_manifest.json @@ -5,14 +5,14 @@ "id": "1eba4346-daff-421b-921c-8f1c05d6997d", "name": "Test results from naca0012 section", "organisation": "megacorp", - "tags": "section:naca0012", + "tags": ["section:naca0012"], "files": [ { "path": "datasets/7ead7669/sys_temp.json", "cluster": 0, "sequence": 0, "extension": "json", - "tags": "system, temperature", + "tags": ["system", "temperature"], "posix_timestamp": 1551394800, "id": "afcdef45-da6b-4805-95d6-7a889d81f5b9", "last_modified": "2020-02-28T13:12:42.000000Z", @@ -25,7 +25,7 @@ "cluster": 1, "sequence": 0, "extension": "json", - "tags": "wind, tunnel, velocity, profile, background, turbulence", + "tags": ["wind", "tunnel", "velocity", "profile", "background", "turbulence"], "posix_timestamp": 1551394800, "id": "3667aa6d-ee64-4cd4-a2fd-e72bcdc65791", "last_modified": "2020-02-28T13:24:43.000000Z", @@ -38,7 +38,7 @@ "cluster": 2, "sequence": 0, "extension": "dat", - "tags": "pressure, coefficient, cp, profile, reference", + "tags": ["pressure", "coefficient", "cp", "profile", "reference"], "posix_timestamp": 1551394800, "id": "310bc665-fe8c-4948-b821-0ad43fcd480d", "last_modified": "2020-02-28T13:47:23.000000Z", @@ -51,7 +51,7 @@ "cluster": 3, "sequence": 0, "extension": "dat", - "tags": "pressure, coefficient, cp, profile, reference, alpha:0", + "tags": ["pressure", "coefficient", "cp", "profile", "reference", "alpha:0"], "posix_timestamp": 1551394800, "id": "c3a6c14d-19d8-44da-9aa5-119798f53d15", "last_modified": "2020-02-28T13:54:24.000000Z", @@ -64,7 +64,7 @@ "cluster": 3, "sequence": 1, "extension": "dat", - "tags": "pressure, coefficient, cp, profile, reference, alpha:1", + "tags": ["pressure", "coefficient", "cp", "profile", "reference", "alpha:1"], "posix_timestamp": 1551394800, "id": "fac62036-722c-481a-9daf-87897c4872ec", "last_modified": "2020-02-28T13:56:21.000000Z", @@ -77,7 +77,7 @@ "cluster": 3, "sequence": 2, "extension": "dat", - "tags": "pressure, coefficient, cp, profile, reference, alpha:2", + "tags": ["pressure", "coefficient", "cp", "profile", "reference", "alpha:2"], "posix_timestamp": 1551394800, "id": "70cda7f6-c97d-4b99-9156-2ff6f5947b7e", "last_modified": "2020-02-28T13:57:03.000000Z", @@ -90,7 +90,7 @@ "cluster": 3, "sequence": 3, "extension": "dat", - "tags": "pressure, coefficient, cp, profile, reference, alpha:3", + "tags": ["pressure", "coefficient", "cp", "profile", "reference", "alpha:3"], "posix_timestamp": 1551394800, "id": "5ab4015a-608a-4ecd-9e30-95aee82d86d9", "last_modified": "2020-02-28T13:58:46.000000Z", @@ -103,7 +103,7 @@ "cluster": 3, "sequence": 4, "extension": "dat", - "tags": "pressure, coefficient, cp, profile, reference, alpha:4", + "tags": ["pressure", "coefficient", "cp", "profile", "reference", "alpha:4"], "posix_timestamp": 1551394800, "id": "3ba97d4b-002d-4ca3-a6b0-54573a5eefde", "last_modified": "2020-02-28T13:59:32.000000Z", From 9a2e8304ed3ae06ea980ae0894778e6efc5845c6 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Mon, 10 May 2021 12:49:14 +0100 Subject: [PATCH 2/9] TST: Update tags format in test manifest file --- tests/data/apps/example_app/input/manifest.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/data/apps/example_app/input/manifest.json b/tests/data/apps/example_app/input/manifest.json index a994280..047cc10 100644 --- a/tests/data/apps/example_app/input/manifest.json +++ b/tests/data/apps/example_app/input/manifest.json @@ -5,14 +5,14 @@ { "id": "7ead7669-8162-4f64-8cd5-4abe92509e17", "name": "my meteorological dataset", - "tags": "met, mast, wind", + "tags": ["met", "mast", "wind"], "files": [ { "path": "input/datasets/7ead7669/file_1.csv", "cluster": 0, "sequence": 0, "extension": "csv", - "tags": "", + "tags": [], "posix_timestamp": null, "data_file": { "id": "abff07bc-7c19-4ed5-be6d-a6546eae8e86", @@ -27,7 +27,7 @@ "cluster": 0, "sequence": 1, "extension": "csv", - "tags": "", + "tags": [], "posix_timestamp": null, "data_file": { "id": "bbff07bc-7c19-4ed5-be6d-a6546eae8e45", From eccb7a0a8b71c1787a47ad8ae672c6e0fdfbaf07 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Mon, 10 May 2021 14:29:06 +0100 Subject: [PATCH 3/9] CLN: Remove filters field from manifest in twine schema --- docs/source/examples.rst | 5 ++--- examples/damage_classifier_service/twine.json | 5 +---- .../strands/input_manifest_filters.json | 11 +++-------- .../strands/output_manifest_filters.json | 4 +--- .../strands/output_manifest_filters.json | 4 +--- tests/data/apps/example_app/twine.json | 9 +++------ tests/test_manifest_strands.py | 12 ++++-------- twined/schema/twine_schema.json | 5 ----- 8 files changed, 15 insertions(+), 40 deletions(-) diff --git a/docs/source/examples.rst b/docs/source/examples.rst index 110ba65..9a27d12 100644 --- a/docs/source/examples.rst +++ b/docs/source/examples.rst @@ -128,8 +128,7 @@ copied straight from the unit test cases, so you can always check there to see h "input_manifest": [ { "key": "wind_resource_data", - "purpose": "A dataset containing Wind Resource Grid files", - "filters": "tags:(wind AND resource) files:(extension:wrg)" + "purpose": "A dataset containing Wind Resource Grid files" } ], "input_values_schema": { @@ -184,4 +183,4 @@ copied straight from the unit test cases, so you can always check there to see h } } } - } \ No newline at end of file + } diff --git a/examples/damage_classifier_service/twine.json b/examples/damage_classifier_service/twine.json index 60f02b2..3788728 100644 --- a/examples/damage_classifier_service/twine.json +++ b/examples/damage_classifier_service/twine.json @@ -5,10 +5,7 @@ // Once the inputs are validated, your analysis program can use this key to access the dataset "key": "trained_model", // General notes, which are helpful as a reminder to users of the service - "purpose": "The trained classifier", - // Issues a strict search for data provided by megacorp, containing *.mdl files tagged as - // classifiers for blade damage on system abc123 - "filters": "organisation: megacorp AND tags:(classifier AND damage AND system:abc123) AND files:(extension:mdl)" + "purpose": "The trained classifier" } ] } diff --git a/examples/met_mast_scada_service/strands/input_manifest_filters.json b/examples/met_mast_scada_service/strands/input_manifest_filters.json index 5e3d851..9f1dd5f 100644 --- a/examples/met_mast_scada_service/strands/input_manifest_filters.json +++ b/examples/met_mast_scada_service/strands/input_manifest_filters.json @@ -5,16 +5,11 @@ // Once the inputs are validated, your analysis program can use this key to access the dataset "key": "met_mast_data", // General notes, which are helpful as a reminder to users of the service - "purpose": "A dataset containing meteorological mast data", - // Searches datasets which are tagged "met*" (allowing for "met" and "meterological"), whose - // files are CSVs in a numbered sequence, and which occur at a particular location - "filters": "tags:(met* AND mast) AND files:(extension:csv AND sequence:>=0) AND location:10" + "purpose": "A dataset containing meteorological mast data" }, { "key": "scada_data", - "purpose": "A dataset containing scada data", - // The organisation: filter refines search to datasets owned by a particular organisation handle - "filters": "organisation: megacorp AND tags:(scada AND mast) AND files:(extension:csv AND sequence:>=0)" + "purpose": "A dataset containing scada data" } - ], + ] } diff --git a/examples/met_mast_scada_service/strands/output_manifest_filters.json b/examples/met_mast_scada_service/strands/output_manifest_filters.json index 32626b0..e08fa91 100644 --- a/examples/met_mast_scada_service/strands/output_manifest_filters.json +++ b/examples/met_mast_scada_service/strands/output_manifest_filters.json @@ -4,9 +4,7 @@ // Twined will prepare a manifest with this key, which you can add to during the analysis or once its complete "key": "met_scada_checks", // General notes, which are helpful as a reminder to users of the service - "purpose": "A dataset containing figures showing correlations between mast and scada data", - // Twined will check that the output file manifest has tags appropriate to the filters - "filters": "tags:(met* AND scada AND correlation) AND files:(extension:json) AND location:*" + "purpose": "A dataset containing figures showing correlations between mast and scada data" } ] } diff --git a/examples/wind_tunnel_datalogger_service/strands/output_manifest_filters.json b/examples/wind_tunnel_datalogger_service/strands/output_manifest_filters.json index 32626b0..e08fa91 100644 --- a/examples/wind_tunnel_datalogger_service/strands/output_manifest_filters.json +++ b/examples/wind_tunnel_datalogger_service/strands/output_manifest_filters.json @@ -4,9 +4,7 @@ // Twined will prepare a manifest with this key, which you can add to during the analysis or once its complete "key": "met_scada_checks", // General notes, which are helpful as a reminder to users of the service - "purpose": "A dataset containing figures showing correlations between mast and scada data", - // Twined will check that the output file manifest has tags appropriate to the filters - "filters": "tags:(met* AND scada AND correlation) AND files:(extension:json) AND location:*" + "purpose": "A dataset containing figures showing correlations between mast and scada data" } ] } diff --git a/tests/data/apps/example_app/twine.json b/tests/data/apps/example_app/twine.json index a86ee38..a69015a 100644 --- a/tests/data/apps/example_app/twine.json +++ b/tests/data/apps/example_app/twine.json @@ -2,8 +2,7 @@ "children": [ { "key": "turbines", - "purpose": "wind turbines in a farm", - "filters": "tags:(met* AND mast AND location) files:(extension:csv AND sequence:>=0) location:10" + "purpose": "wind turbines in a farm" } ], "configuration_schema": { @@ -34,13 +33,11 @@ "input_manifest": [ { "key": "met_mast_data", - "purpose": "A dataset containing meteorological mast data", - "filters": "tags:(met* AND mast AND location) files:(extension:csv AND sequence:>=0) location:10" + "purpose": "A dataset containing meteorological mast data" }, { "key": "scada_data", - "purpose": "A dataset containing scada data", - "filters": "tags:(met* AND mast) files:(extension:csv AND sequence:>=0) location:10" + "purpose": "A dataset containing scada data" } ], "input_values_schema": { diff --git a/tests/test_manifest_strands.py b/tests/test_manifest_strands.py index 5ca0bb0..4d20ea7 100644 --- a/tests/test_manifest_strands.py +++ b/tests/test_manifest_strands.py @@ -13,27 +13,23 @@ class TestManifestStrands(BaseTestCase): "configuration_manifest": [ { "key": "configuration_files_data", - "purpose": "A dataset containing files used in configuration", - "filters": "tags:(the AND config AND tags) files:(extension:csv AND sequence:>=0)" + "purpose": "A dataset containing files used in configuration" } ], "input_manifest": [ { "key": "met_mast_data", - "purpose": "A dataset containing meteorological mast data", - "filters": "tags:(met* AND mast AND location) files:(extension:csv AND sequence:>=0) location:10" + "purpose": "A dataset containing meteorological mast data" }, { "key": "scada_data", - "purpose": "A dataset containing scada data", - "filters": "tags:(met* AND mast) files:(extension:csv AND sequence:>=0) location:10" + "purpose": "A dataset containing scada data" } ], "output_manifest": [ { "key": "output_files_data", - "purpose": "A dataset containing output results", - "filters": "tags:(the AND output AND tags) files:(extension:csv AND sequence:>=0)" + "purpose": "A dataset containing output results" } ] } diff --git a/twined/schema/twine_schema.json b/twined/schema/twine_schema.json index eda7828..8272dce 100644 --- a/twined/schema/twine_schema.json +++ b/twined/schema/twine_schema.json @@ -66,11 +66,6 @@ "description": "What data this dataset contains, eg 'the set of data files from the energy production calculation process'", "type": "string", "default": "" - }, - "filters": { - "description": "A search term, using the Lucene Query Language, which can be used to automatically refine the list of available datasets down to ones suitable for use with this twin", - "type": "string", - "default": "" } }, "required": ["key"] From dcbd0cfd55d2e146b63ac2db4b3ec02db0aff41c Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Mon, 10 May 2021 16:02:19 +0100 Subject: [PATCH 4/9] CLN: Remove kind field from manifest schema --- twined/schema/manifest_schema.json | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/twined/schema/manifest_schema.json b/twined/schema/manifest_schema.json index ebbf19b..93f2397 100644 --- a/twined/schema/manifest_schema.json +++ b/twined/schema/manifest_schema.json @@ -1,20 +1,6 @@ { "type": "object", "properties": { - "kind": { - "description": "The kind of the manifest, (only 'multi-dataset' available, reserved for future use)", - "type": "string", - "default": "multi-dataset", - "anyOf": [ - { - "type": "string", - "enum": [ - "multi-dataset" - ], - "title": "Multi Dataset" - } - ] - }, "id": { "description": "ID of the manifest, typically a uuid", "type": "string" From 1ac3d535556e64e452a8733ffb563836b0f299ac Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Mon, 10 May 2021 16:22:31 +0100 Subject: [PATCH 5/9] TST: Use correct method in test --- tests/test_manifest_strands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_manifest_strands.py b/tests/test_manifest_strands.py index 4d20ea7..f5c5328 100644 --- a/tests/test_manifest_strands.py +++ b/tests/test_manifest_strands.py @@ -175,7 +175,7 @@ def test_valid_manifest_files(self): """ twine = Twine(source=self.VALID_MANIFEST_STRAND) - twine.validate_input_manifest(source=valid_configuration_manifest) + twine.validate_configuration_manifest(source=valid_configuration_manifest) twine.validate_input_manifest(source=valid_input_manifest) twine.validate_output_manifest(source=valid_output_manifest) From e1ebb192e8b389b733b997700e4c8f811e2a5104 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Thu, 13 May 2021 14:48:30 +0100 Subject: [PATCH 6/9] REV: Restore filter field to children field of twine.json example --- tests/data/apps/example_app/twine.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/data/apps/example_app/twine.json b/tests/data/apps/example_app/twine.json index a69015a..15bf008 100644 --- a/tests/data/apps/example_app/twine.json +++ b/tests/data/apps/example_app/twine.json @@ -2,7 +2,8 @@ "children": [ { "key": "turbines", - "purpose": "wind turbines in a farm" + "purpose": "wind turbines in a farm", + "filters": "tags:(met* AND mast AND location) files:(extension:csv AND sequence:>=0) location:10" } ], "configuration_schema": { From 8df5beec82757dfe0d6503a56a17385280222f57 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Thu, 13 May 2021 14:54:10 +0100 Subject: [PATCH 7/9] FIX: Add missing configuration_manifest_schema field to twine metaschema --- twined/schema/twine_schema.json | 44 +++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/twined/schema/twine_schema.json b/twined/schema/twine_schema.json index 8272dce..124553e 100644 --- a/twined/schema/twine_schema.json +++ b/twined/schema/twine_schema.json @@ -1,4 +1,27 @@ { + "$defs": { + "manifest": { + "type": "array", + "description": "A list of entries, each describing a dataset that should be attached to / made available to the digital twin", + "items": { + "type": "object", + "properties": { + "key": { + "description": "A textual key identifying this dataset within the application/twin", + "type": "string" + }, + "purpose": { + "description": "What data this dataset contains, eg 'the set of data files from the energy production calculation process'", + "type": "string", + "default": "" + } + }, + "required": [ + "key" + ] + } + } + }, "type": "object", "$schema": "http://json-schema.org/2019-09/schema#", "properties": { @@ -27,6 +50,7 @@ ] } }, + "configuration_manifest": {"$ref": "#/$defs/manifest"}, "configuration_schema": { "type": "object", "required": ["properties"] @@ -52,25 +76,7 @@ "additionalProperties": false } }, - "input_manifest": { - "type": "array", - "description": "A list of entries, each describing a dataset that should be attached to / made available to the digital twin", - "items": { - "type": "object", - "properties": { - "key": { - "description": "A textual key identifying this dataset within the application/twin", - "type": "string" - }, - "purpose": { - "description": "What data this dataset contains, eg 'the set of data files from the energy production calculation process'", - "type": "string", - "default": "" - } - }, - "required": ["key"] - } - }, + "input_manifest": {"$ref": "#/$defs/manifest"}, "input_values_schema": { "type": "object" }, From dca30f96c6a3d8388686895f2ce507327ed6a9a6 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Thu, 13 May 2021 15:36:47 +0100 Subject: [PATCH 8/9] FIX: Fix name of configuration_values_schema in twine schema --- docs/source/examples.rst | 2 +- tests/data/apps/empty_app/twine.json | 2 +- tests/data/apps/example_app/twine.json | 2 +- tests/data/apps/simple_app/twine.json | 2 +- tests/test_twine.py | 2 +- twined/schema/twine_schema.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/source/examples.rst b/docs/source/examples.rst index 9a27d12..c6bf981 100644 --- a/docs/source/examples.rst +++ b/docs/source/examples.rst @@ -47,7 +47,7 @@ copied straight from the unit test cases, so you can always check there to see h "description": "This twine helps compute the cost of an installed foundation.", "children": [ ], - "configuration_schema": { + "configuration_values_schema": { "$schema": "http://json-schema.org/2019-09/schema#", "title": "Foundation cost twin configuration", "description": "Set config parameters and constants at startup of the twin.", diff --git a/tests/data/apps/empty_app/twine.json b/tests/data/apps/empty_app/twine.json index 39b9e14..c83fb06 100644 --- a/tests/data/apps/empty_app/twine.json +++ b/tests/data/apps/empty_app/twine.json @@ -1,7 +1,7 @@ { "children": [ ], - "configuration_schema": { + "configuration_values_schema": { "$schema": "http://json-schema.org/2019-09/schema#", "title": "The example configuration form", "description": "The configuration strand of an example twine", diff --git a/tests/data/apps/example_app/twine.json b/tests/data/apps/example_app/twine.json index 15bf008..4319080 100644 --- a/tests/data/apps/example_app/twine.json +++ b/tests/data/apps/example_app/twine.json @@ -6,7 +6,7 @@ "filters": "tags:(met* AND mast AND location) files:(extension:csv AND sequence:>=0) location:10" } ], - "configuration_schema": { + "configuration_values_schema": { "$schema": "http://json-schema.org/2019-09/schema#", "title": "The example configuration form", "description": "The configuration strand of an example twine", diff --git a/tests/data/apps/simple_app/twine.json b/tests/data/apps/simple_app/twine.json index 8b86eac..340959a 100644 --- a/tests/data/apps/simple_app/twine.json +++ b/tests/data/apps/simple_app/twine.json @@ -1,5 +1,5 @@ { - "configuration_schema": { + "configuration_values_schema": { "$schema": "http://json-schema.org/2019-09/schema#", "title": "Configuration for a simple app", "description": "The app creates a mandelbrot plot", diff --git a/tests/test_twine.py b/tests/test_twine.py index 9e27977..5389823 100644 --- a/tests/test_twine.py +++ b/tests/test_twine.py @@ -49,7 +49,7 @@ def test_broken_json_twine(self): invalid_json_twine = """ { "children": [ - "configuration_schema": { + "configuration_values_schema": { "$schema": "http://json-schema.org/2019-09/schema#", "title": "The example configuration form", "description": "The configuration strand of an example twine", diff --git a/twined/schema/twine_schema.json b/twined/schema/twine_schema.json index 124553e..de4193d 100644 --- a/twined/schema/twine_schema.json +++ b/twined/schema/twine_schema.json @@ -51,7 +51,7 @@ } }, "configuration_manifest": {"$ref": "#/$defs/manifest"}, - "configuration_schema": { + "configuration_values_schema": { "type": "object", "required": ["properties"] }, From 3b3155b37c12e4a69418663cc8584c07044aa1a4 Mon Sep 17 00:00:00 2001 From: cortadocodes Date: Thu, 13 May 2021 15:43:00 +0100 Subject: [PATCH 9/9] REF: Use manifest definition for output_manifest in twine schema --- twined/schema/twine_schema.json | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/twined/schema/twine_schema.json b/twined/schema/twine_schema.json index de4193d..6908519 100644 --- a/twined/schema/twine_schema.json +++ b/twined/schema/twine_schema.json @@ -80,34 +80,7 @@ "input_values_schema": { "type": "object" }, - "output_manifest": { - "type": "array", - "description": "A list of entries, each describing a dataset that may be created/updated when the twin is run", - "items": { - "type": "object", - "properties": { - "key": { - "description": "A textual key identifying this dataset within the application/twin", - "type": "string" - }, - "purpose": { - "description": "What data this dataset contains, eg 'the set of data files from the energy production calculation process'", - "type": "string", - "default": "" - }, - "tags": { - "description": "Comma separated tags that will be applied to the dataset when created", - "type": "array", - "items": [ - { - "type": "string" - } - ] - } - }, - "required": ["key"] - } - }, + "output_manifest": {"$ref": "#/$defs/manifest"}, "output_values_schema": { "type": "object" }