diff --git a/CHANGELOG.md b/CHANGELOG.md index 8841037c..c5eade94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,12 +62,10 @@ Here is a template for new release sections ### Changed - Remove comment field as it holds information on how to fill out the metadata and therefore should not be part of the actual oemetadata but the documentation. [#???](https://github.com/OpenEnergyPlatform/oemetadata/pull/) - - Update the schema json file content (schema generation still broken, add desired output) and fix the schema path in the script for generating examples (it pointed to an incorrect directory and file name) [(#149)](https://github.com/OpenEnergyPlatform/oemetadata/pull/149) - - Update broken Link in key description example [(#159)](https://github.com/OpenEnergyPlatform/oemetadata/pull/159) - Update resource/profile to resource/type [(#164)](https://github.com/OpenEnergyPlatform/oemetadata/pull/164) - +- Update links in context.json and example.json for all versions [(#167)](https://github.com/OpenEnergyPlatform/oemetadata/pull/167) ### Removed diff --git a/metadata/v130/schema.json b/metadata/v130/schema.json index b8e941ef..9eb82412 100644 --- a/metadata/v130/schema.json +++ b/metadata/v130/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/v130/schema.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/metadata/v130/schema.json", "description": "Contains general information", "type": "object", "properties": { diff --git a/metadata/v140/schema.json b/metadata/v140/schema.json index 8f2eac76..ca5ef004 100644 --- a/metadata/v140/schema.json +++ b/metadata/v140/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/v140/schema.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/metadata/v140/schema.json", "description": "Open Energy Plaftorm (OEP) metadata schema v1.4.0", "type": "object", "properties": { diff --git a/metadata/v141/schema.json b/metadata/v141/schema.json index 236e353e..510dd515 100644 --- a/metadata/v141/schema.json +++ b/metadata/v141/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/v141/schema.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/metadata/v141/schema.json", "description": "Open Energy Plaftorm (OEP) metadata schema v1.4.1", "type": "object", "properties": { diff --git a/metadata/v150/example.json b/metadata/v150/example.json index 07dde3c2..9bfbedb3 100644 --- a/metadata/v150/example.json +++ b/metadata/v150/example.json @@ -276,7 +276,7 @@ } ], "@id": "https://databus.dbpedia.org/kurzum/mastr/bnetza-mastr/01.04.00", - "@context": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/30887e4cd7dabc316d1ee674791f0cc815277e38/metadata/latest/context.json", + "@context": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/metadata/v150/context.json", "review": { "path": "https://github.com/OpenEnergyPlatform/data-preprocessing/issues", "badge": "platin" diff --git a/metadata/v150/schema.json b/metadata/v150/schema.json index a87f5fff..6aabfea3 100644 --- a/metadata/v150/schema.json +++ b/metadata/v150/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/v150/schema.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/metadata/v150/schema.json", "description": "Open Energy Plaftorm (OEP) metadata schema v1.5.0", "type": "object", "properties": { diff --git a/metadata/v151/example.json b/metadata/v151/example.json index 292645ea..ade29672 100644 --- a/metadata/v151/example.json +++ b/metadata/v151/example.json @@ -373,7 +373,7 @@ } ], "@id": "https://databus.dbpedia.org/kurzum/mastr/bnetza-mastr/01.04.00", - "@context": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/develop/metadata/latest/context.json", + "@context": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/metadata/v151/context.json", "review": { "path": "https://github.com/OpenEnergyPlatform/data-preprocessing/issues", "badge": "Platinum" diff --git a/metadata/v152/example.json b/metadata/v152/example.json index 6ad273de..2a77c829 100644 --- a/metadata/v152/example.json +++ b/metadata/v152/example.json @@ -380,7 +380,7 @@ } ], "@id": "https://databus.dbpedia.org/kurzum/mastr/bnetza-mastr/01.04.00", - "@context": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/develop/metadata/latest/context.json", + "@context": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/metadata/v152/context.json", "review": { "path": "https://github.com/OpenEnergyPlatform/data-preprocessing/issues", "badge": "Platinum" diff --git a/metadata/v160/example.json b/metadata/v160/example.json index 5211d193..e3d83590 100644 --- a/metadata/v160/example.json +++ b/metadata/v160/example.json @@ -387,7 +387,7 @@ } ], "@id": "https://databus.dbpedia.org/kurzum/mastr/bnetza-mastr/01.04.00", - "@context": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/develop/metadata/latest/context.json", + "@context": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/metadata/v160/context.json", "review": { "path": "https://github.com/OpenEnergyPlatform/data-preprocessing/issues", "badge": "Platinum" diff --git a/metadata/v160/schema.json b/metadata/v160/schema.json index 2537debe..e04b7a0d 100644 --- a/metadata/v160/schema.json +++ b/metadata/v160/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/latest/schema.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/metadata/v160/schema.json", "description": "Open Energy Plaftorm (OEP) metadata schema latest", "type": "object", "properties": { diff --git a/metadata/v200_draft/schema.json b/metadata/v200_draft/schema.json index ffbe46f8..9856ea22 100644 --- a/metadata/v200_draft/schema.json +++ b/metadata/v200_draft/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/v200_draft/schema.json", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/develop/metadata/v200_draft/schema.json", "description": "Open Energy Plaftorm (OEP) metadata schema latest", "type": "object", "properties": { diff --git a/tests/metadata/v130/test_schema.py b/tests/metadata/v130/test_schema.py index 5296feb0..062cf3cc 100644 --- a/tests/metadata/v130/test_schema.py +++ b/tests/metadata/v130/test_schema.py @@ -15,7 +15,7 @@ def get_string(s): assert get_string(OEMETADATA_V130_SCHEMA["$schema"]) == get_string("http://json-schema.org/draft-07/schema#") assert get_string(OEMETADATA_V130_SCHEMA["$id"]) == get_string( - "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/v130/schema.json" + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/metadata/v130/schema.json" ) diff --git a/tests/metadata/v140/test_schema.py b/tests/metadata/v140/test_schema.py index 3cbda521..35698fbb 100644 --- a/tests/metadata/v140/test_schema.py +++ b/tests/metadata/v140/test_schema.py @@ -15,7 +15,7 @@ def get_string(s): assert get_string(OEMETADATA_V140_SCHEMA["$schema"]) == get_string("http://json-schema.org/draft-07/schema#") assert get_string(OEMETADATA_V140_SCHEMA["$id"]) == get_string( - "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/v140/schema.json" + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/metadata/v140/schema.json" ) diff --git a/tests/metadata/v141/test_schema.py b/tests/metadata/v141/test_schema.py index 3f2de63c..db0d037a 100644 --- a/tests/metadata/v141/test_schema.py +++ b/tests/metadata/v141/test_schema.py @@ -15,7 +15,7 @@ def get_string(s): assert get_string(OEMETADATA_V141_SCHEMA["$schema"]) == get_string("http://json-schema.org/draft-07/schema#") assert get_string(OEMETADATA_V141_SCHEMA["$id"]) == get_string( - "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/v141/schema.json" + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/metadata/v141/schema.json" ) diff --git a/tests/metadata/v150/test_schema.py b/tests/metadata/v150/test_schema.py index e0155f8e..2ffc7c87 100644 --- a/tests/metadata/v150/test_schema.py +++ b/tests/metadata/v150/test_schema.py @@ -16,7 +16,7 @@ def get_string(s): # https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/v150/schema.json assert get_string(OEMETADATA_V150_SCHEMA["$id"]) == get_string( - "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/v150/schema.json" + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/metadata/v150/schema.json" ) diff --git a/tests/metadata/v160/test_schema.py b/tests/metadata/v160/test_schema.py index 41eb4bbe..0fa15658 100644 --- a/tests/metadata/v160/test_schema.py +++ b/tests/metadata/v160/test_schema.py @@ -2,7 +2,7 @@ def test_if_schema_json_loads_successfully(): try: from metadata.v160.schema import OEMETADATA_V160_SCHEMA except Warning: - print("Metadata Schema v1.5.2 cant load. Check if the files are missing!") + print("Metadata Schema v1.6.0 cant load. Check if the files are missing!") def test_if_schema_json_has_correct_schema_and_id_set(): @@ -14,9 +14,9 @@ def get_string(s): assert get_string(OEMETADATA_V160_SCHEMA["$schema"]) == get_string("http://json-schema.org/draft-07/schema#") - # assert get_string(OEMETADATA_V160_SCHEMA["$id"]) == get_string( - # "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/metadata/latest/schema.json" - # ) + assert get_string(OEMETADATA_V160_SCHEMA["$id"]) == get_string( + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/metadata/v160/schema.json" + ) def test_schema_against_metaschema_which_should_succeed(): diff --git a/tests/metadata/v200/test_schema.py b/tests/metadata/v200/test_schema.py index c2f117b2..f3d6e671 100644 --- a/tests/metadata/v200/test_schema.py +++ b/tests/metadata/v200/test_schema.py @@ -16,9 +16,9 @@ def get_string(s): "http://json-schema.org/draft-07/schema#" ) - # assert get_string(OEMETADATA_V160_SCHEMA["$id"]) == get_string( - # "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/metadata/latest/schema.json" - # ) + assert get_string(OEMETADATA_V200_SCHEMA["$id"]) == get_string( + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/develop/metadata/v200_draft/schema.json" + ) def test_schema_against_metaschema_which_should_succeed():