-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #202 from OpenEnergyPlatform/hotfix-fix-master-bra…
…nch-renaming-artifacts Hotfix fix master branch renaming artifacts
- Loading branch information
Showing
26 changed files
with
42 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
def test_if_example_json_loads_successfully(): | ||
from metadata.v20.example import OEMETADATA_V200_EXAMPLE | ||
from metadata.v20.example import OEMETADATA_V20_EXAMPLE | ||
|
||
|
||
def test_example_against_schema_which_should_succeed(): | ||
import jsonschema | ||
from metadata.v20.example import OEMETADATA_V200_EXAMPLE | ||
from metadata.v20.schema import OEMETADATA_V200_SCHEMA | ||
from metadata.v20.example import OEMETADATA_V20_EXAMPLE | ||
from metadata.v20.schema import OEMETADATA_V20_SCHEMA | ||
|
||
assert jsonschema.validate(OEMETADATA_V200_EXAMPLE, OEMETADATA_V200_SCHEMA) == None | ||
assert jsonschema.validate(OEMETADATA_V20_EXAMPLE, OEMETADATA_V20_SCHEMA) == None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,32 @@ | ||
def test_if_schema_json_loads_successfully(): | ||
try: | ||
from metadata.v20.schema import OEMETADATA_V200_SCHEMA | ||
from metadata.v20.schema import OEMETADATA_V20_SCHEMA | ||
except Warning: | ||
print("Metadata Schema v2.0.0 cant load. Check if the files are missing!") | ||
print("Metadata Schema v2.0.1 cant load. Check if the files are missing!") | ||
|
||
|
||
def test_if_schema_json_has_correct_schema_and_id_set(): | ||
from metadata.v20.schema import OEMETADATA_V200_SCHEMA | ||
from metadata.v20.schema import OEMETADATA_V20_SCHEMA | ||
import string | ||
|
||
def get_string(s): | ||
return string.printable + s + string.printable | ||
|
||
assert get_string(OEMETADATA_V200_SCHEMA["$schema"]) == get_string( | ||
assert get_string(OEMETADATA_V20_SCHEMA["$schema"]) == get_string( | ||
"http://json-schema.org/draft-07/schema#" | ||
) | ||
|
||
assert get_string(OEMETADATA_V200_SCHEMA["$id"]) == get_string( | ||
assert get_string(OEMETADATA_V20_SCHEMA["$id"]) == get_string( | ||
"https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/develop/metadata/v20/schema.json" | ||
) | ||
|
||
|
||
def test_schema_against_metaschema_which_should_succeed(): | ||
import jsonschema | ||
from metadata.v20.schema import OEMETADATA_V200_SCHEMA | ||
from metadata.v20.schema import OEMETADATA_V20_SCHEMA | ||
from metadata.metaschema.draft07.schema import OEMETADATA_METASCHEMA_DRAFT07_SCHEMA | ||
|
||
assert ( | ||
jsonschema.validate( | ||
OEMETADATA_V200_SCHEMA, OEMETADATA_METASCHEMA_DRAFT07_SCHEMA | ||
) | ||
jsonschema.validate(OEMETADATA_V20_SCHEMA, OEMETADATA_METASCHEMA_DRAFT07_SCHEMA) | ||
is None | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
def test_if_template_json_loads_successfully(): | ||
from metadata.v20.template import OEMETADATA_V200_TEMPLATE | ||
from metadata.v20.template import OEMETADATA_V20_TEMPLATE | ||
|
||
|
||
def test_template_against_schema_which_should_succeed(): | ||
import jsonschema | ||
from metadata.v20.template import OEMETADATA_V200_TEMPLATE | ||
from metadata.v20.schema import OEMETADATA_V200_SCHEMA | ||
from metadata.v20.template import OEMETADATA_V20_TEMPLATE | ||
from metadata.v20.schema import OEMETADATA_V20_SCHEMA | ||
|
||
assert jsonschema.validate(OEMETADATA_V200_TEMPLATE, OEMETADATA_V200_SCHEMA) == None | ||
assert jsonschema.validate(OEMETADATA_V20_TEMPLATE, OEMETADATA_V20_SCHEMA) == None |