Skip to content

Commit

Permalink
Merge pull request #167 from OpenEnergyPlatform/feature-135-fix-contexts
Browse files Browse the repository at this point in the history
Update links in context.json and example.json for all versions
  • Loading branch information
Ludee authored Oct 16, 2024
2 parents bec429a + 4b64648 commit 2b8afae
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 24 deletions.
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion metadata/v130/schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion metadata/v140/schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion metadata/v141/schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion metadata/v150/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion metadata/v150/schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion metadata/v151/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion metadata/v152/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion metadata/v160/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion metadata/v160/schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion metadata/v200_draft/schema.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion tests/metadata/v130/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)


Expand Down
2 changes: 1 addition & 1 deletion tests/metadata/v140/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)


Expand Down
2 changes: 1 addition & 1 deletion tests/metadata/v141/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)


Expand Down
2 changes: 1 addition & 1 deletion tests/metadata/v150/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)


Expand Down
8 changes: 4 additions & 4 deletions tests/metadata/v160/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand All @@ -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():
Expand Down
6 changes: 3 additions & 3 deletions tests/metadata/v200/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 2b8afae

Please sign in to comment.