Skip to content

Commit

Permalink
DOC: Use new manifest strand format in twine examples
Browse files Browse the repository at this point in the history
skip_ci_tests
  • Loading branch information
cortadocodes committed May 26, 2021
1 parent 3c4c50e commit 0d167dc
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 65 deletions.
4 changes: 2 additions & 2 deletions docs/source/anatomy_manifest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ for examples.

.. accordion-row:: Show twine containing this strand

.. literalinclude:: ../../examples/met_mast_scada_service/strands/input_manifest_filters.json
.. literalinclude:: ../../examples/met_mast_scada_service/strands/input_manifest.json
:language: javascript

.. accordion-row:: Show a matching file manifest
Expand All @@ -120,7 +120,7 @@ for examples.

.. accordion-row:: Show twine containing this strand

.. literalinclude:: ../../examples/met_mast_scada_service/strands/output_manifest_filters.json
.. literalinclude:: ../../examples/met_mast_scada_service/strands/output_manifest.json
:language: javascript

.. accordion-row:: Show a matching file manifest
Expand Down
37 changes: 21 additions & 16 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ copied straight from the unit test cases, so you can always check there to see h
}
}
},
"output_manifest": [
],
"output_manifest": {
"datasets": []
},
"output_values_schema": {
"title": "Output Values schema for the foundation cost twin",
"description": "The response supplied to a change in input values will always conform to this schema.",
Expand Down Expand Up @@ -125,12 +126,14 @@ copied straight from the unit test cases, so you can always check there to see h
"purpose": "Token for accessing a 3rd party weather API service"
}
],
"input_manifest": [
{
"key": "wind_resource_data",
"purpose": "A dataset containing Wind Resource Grid files"
}
],
"input_manifest": {
"datasets": [
{
"key": "wind_resource_data",
"purpose": "A dataset containing Wind Resource Grid files"
}
]
},
"input_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"title": "Input Values for the weather service twin",
Expand Down Expand Up @@ -160,14 +163,16 @@ copied straight from the unit test cases, so you can always check there to see h
}
}
},
"output_manifest": [
{
"key": "production_data",
"purpose": "A dataset containing production data",
"tags": {"cleaned": True},
"labels": ["production", "wind"]
}
],
"output_manifest": {
"datasets": [
{
"key": "production_data",
"purpose": "A dataset containing production data",
"tags": {"cleaned": true},
"labels": ["production", "wind"]
}
]
},
"output_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"title": "Output Values for the metocean service twin",
Expand Down
18 changes: 10 additions & 8 deletions examples/damage_classifier_service/twine.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
// Manifest strands contain lists, with one entry for each required dataset
"configuration_manifest": [
{
// 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"
}
]
"configuration_manifest": {
"datasets": [
{
// 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"
}
]
}
}
17 changes: 17 additions & 0 deletions examples/met_mast_scada_service/strands/input_manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
// Manifest strands contain lists, with one entry for each required dataset
"input_manifest": {
"datasets": [
{
// 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"
},
{
"key": "scada_data",
"purpose": "A dataset containing scada data"
}
]
}
}

This file was deleted.

12 changes: 12 additions & 0 deletions examples/met_mast_scada_service/strands/output_manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"output_manifest": {
"datasets": [
{
// 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"
}
]
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"output_manifest": {
"datasets": [
{
// 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"
}
]
}
}

This file was deleted.

10 changes: 6 additions & 4 deletions tests/data/apps/empty_app/twine.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
},
"credentials": [
],
"input_manifest": [
],
"input_manifest": {
"datasets": []
},
"input_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"title": "Input Values",
Expand All @@ -21,8 +22,9 @@
"properties": {
}
},
"output_manifest": [
],
"output_manifest": {
"datasets": []
},
"output_values_schema": {
"title": "Output Values",
"description": "The output values strand of an example twine",
Expand Down

0 comments on commit 0d167dc

Please # to comment.