Skip to content

Commit

Permalink
MRG: Merge pull request #100 from octue/fix/fix-json-metaschema-path
Browse files Browse the repository at this point in the history
Use latest JSON metaschema
  • Loading branch information
cortadocodes authored Mar 21, 2022
2 parents c156fc0 + 6c3835c commit 1e4dbcf
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 24 deletions.
8 changes: 4 additions & 4 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ copied straight from the unit test cases, so you can always check there to see h
"children": [
],
"configuration_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Foundation cost twin configuration",
"description": "Set config parameters and constants at startup of the twin.",
"type": "object",
Expand All @@ -68,7 +68,7 @@ copied straight from the unit test cases, so you can always check there to see h
}
},
"input_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Input Values schema for the foundation cost twin",
"description": "These values are supplied to the twin asynchronously over a web socket. So as these values change, the twin can reply with an update.",
"type": "object",
Expand Down Expand Up @@ -135,7 +135,7 @@ copied straight from the unit test cases, so you can always check there to see h
]
},
"input_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Input Values for the weather service twin",
"description": "This is a simple example for getting metocean conditions at a single location",
"type": "object",
Expand Down Expand Up @@ -174,7 +174,7 @@ copied straight from the unit test cases, so you can always check there to see h
]
},
"output_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Output Values for the metocean service twin",
"description": "The output values strand of an example twine",
"type": "object",
Expand Down
6 changes: 3 additions & 3 deletions docs/source/quick_start_create_your_first_twine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Now, let's define an input values strand, to specify what values are required by
"title": "My first digital twin",
"description": "A simple example to build on..."
"input_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Input Values schema for my first digital twin",
"description": "These values are supplied to the twin by another program (often over a websocket, depending on your integration provider). So as these values change, the twin can reply with an update.",
"type": "object",
Expand All @@ -50,7 +50,7 @@ Finally, let's define an output values strand, to define what kind of data is re
.. code-block:: javascript
"output_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Output Values schema for my first digital twin",
"description": "The twin will output data that matches this schema",
"type": "object",
Expand Down Expand Up @@ -108,4 +108,4 @@ Then parse and validate directly from the file:
.. ATTENTION::
LIBRARY IS UNDER CONSTRUCTION! WATCH THIS SPACE FOR MORE!
LIBRARY IS UNDER CONSTRUCTION! WATCH THIS SPACE FOR MORE!
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

setup(
name="twined",
version="0.2.1",
version="0.2.2",
py_modules=[],
install_requires=["jsonschema ~= 3.2.0", "python-dotenv"],
install_requires=["jsonschema ~= 4.4.0", "python-dotenv"],
url="https://www.github.com/octue/twined",
license="MIT",
author="Octue (github: octue)",
Expand Down
4 changes: 2 additions & 2 deletions tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
VALID_SCHEMA_TWINE = """
{
"configuration_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "The example configuration form",
"description": "The configuration strand of an example twine",
"type": "object",
Expand All @@ -21,7 +21,7 @@
}
},
"input_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Input Values",
"description": "The input values strand of an example twine, with a required height value",
"type": "object",
Expand Down
4 changes: 2 additions & 2 deletions tests/data/apps/empty_app/twine.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"children": [
],
"configuration_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "The example configuration form",
"description": "The configuration strand of an example twine",
"type": "object",
Expand All @@ -15,7 +15,7 @@
"datasets": {}
},
"input_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Input Values",
"description": "The input values strand of an example twine",
"type": "object",
Expand Down
4 changes: 2 additions & 2 deletions tests/data/apps/example_app/twine.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
],
"configuration_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "The example configuration form",
"description": "The configuration strand of an example twine",
"type": "object",
Expand Down Expand Up @@ -42,7 +42,7 @@
}
},
"input_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Input Values",
"description": "The input values strand of an example twine",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion tests/data/apps/simple_app/twine.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"configuration_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Configuration for a simple app",
"description": "The app creates a mandelbrot plot",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_schema_strands.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_strand_not_found(self):
valid_no_output_schema_twine = """
{
"configuration_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "The example configuration form",
"description": "The configuration strand of an example twine",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_twine.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_broken_json_twine(self):
{
"children": [
"configuration_values_schema": {
"$schema": "http://json-schema.org/2019-09/schema#",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "The example configuration form",
"description": "The configuration strand of an example twine",
"type": "object",
Expand Down
8 changes: 3 additions & 5 deletions twined/schema/manifest_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
"labels": {
"description": "Textual labels associated with the object",
"type": "array",
"items": [
{
"type": "string"
}
]
"items": {
"type": "string"
}
}
},
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion twined/schema/twine_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
}
},
"type": "object",
"$schema": "http://json-schema.org/2019-09/schema#",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"children": {
"type": "array",
Expand Down

0 comments on commit 1e4dbcf

Please sign in to comment.