Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0715caf
Update CHANGELOG #293
Ludee Apr 9, 2026
e225d73
Add frictionless validate tests #290 #296
Ludee Apr 8, 2026
771eca6
Update CHANGELOG #290
Ludee Apr 9, 2026
b52dffd
Update package #290
Ludee Apr 9, 2026
79e82f5
Fix global variables #290
Ludee Apr 9, 2026
3cf6b6f
Update field type from serial to integer #290
Ludee Apr 9, 2026
7efa942
Update example #290
Ludee Apr 9, 2026
fba1dc7
Update required structure #290
Ludee Apr 9, 2026
61de9eb
Update after Merge #290
Ludee Apr 24, 2026
04d8683
Update schema and tests #290
Ludee Apr 27, 2026
331f432
Update example data type #290
Ludee Apr 27, 2026
8703499
Update example data type float #290
Ludee Apr 27, 2026
98747e6
Update example format csv #290
Ludee Apr 27, 2026
fef6dae
Update example fk #290
Ludee Apr 27, 2026
c394fa0
Update example fk #290
Ludee Apr 27, 2026
1665213
Update example for fk #290
Ludee Apr 27, 2026
a5176ce
Remove fk for test #290
Ludee Apr 27, 2026
9c4b5be
Update example file #290
Ludee Apr 27, 2026
9bf6348
Update example path #290
Ludee Apr 27, 2026
5e8aecb
Update test path #290
Ludee Apr 27, 2026
d07af3f
Update test path #290
Ludee Apr 27, 2026
4e41a88
Update example package #290
Ludee Apr 27, 2026
5acae30
Update example package #290
Ludee Apr 27, 2026
b52800b
Update example package #290
Ludee Apr 27, 2026
99188e4
Update example package #290
Ludee Apr 27, 2026
89ef56d
Update example package #290
Ludee Apr 27, 2026
23a12d3
Update example package #290
Ludee Apr 27, 2026
53c5f9f
Update example package #290
Ludee Apr 27, 2026
bbbaa6c
Update example package #290
Ludee Apr 27, 2026
8109469
Update example package #290
Ludee Apr 27, 2026
848bb19
Update fk example #290
Ludee Apr 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added
- Add badges for Zenodo publication, FAIRsharing DOI and RDA MSC [(#273)](https://github.com/OpenEnergyPlatform/oemetadata/pull/273)
- Dataset creator to contributors [(#304)](https://github.com/OpenEnergyPlatform/oemetadata/pull/304)

### Changed
- Update TLDR URL in example sourceLicenses [(#275)](https://github.com/OpenEnergyPlatform/oemetadata/pull/275)
Expand All @@ -32,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Introduce scoped context for spatial and temporal objects [(#260)](https://github.com/OpenEnergyPlatform/oemetadata/pull/260)
- Add script to manage latest folder [(#264)](https://github.com/OpenEnergyPlatform/oemetadata/pull/264)
- Tests for example and template to be valid frictionless datapackage [(#305)](https://github.com/OpenEnergyPlatform/oemetadata/pull/305)

### Changed
- Fix bugs in JSON-LD context [(#260)](https://github.com/OpenEnergyPlatform/oemetadata/pull/260)
Expand Down
17 changes: 6 additions & 11 deletions oemetadata/v2/v21/build_source/schemas/provenance.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,14 @@
],
"badge": "Bronze",
"title": "Comment"
},
"required": [
"title"
]
}
},
"required": [
"title"
],
"badge": "Bronze",
"title": "Contributor"
},
"badge": "Bronze",
"title": "Contributors"
}
}
},
"required": [
"contributors"
]
}
}
2 changes: 1 addition & 1 deletion oemetadata/v2/v21/build_source/scripts/example/fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"name": "id",
"description": "Unique identifier",
"type": "serial",
"type": "integer",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

integer is okay, most times there is something wit a range of bits. There might be infinit rows in the dataset.

I think this is not relevant for this example so just a comment.

"nullable": false,
"unit": null,
"isAbout": [
Expand Down
2 changes: 1 addition & 1 deletion oemetadata/v2/v21/build_source/scripts/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
LOG_FORMAT = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"

BASE_PATH = Path("oemetadata/v2/")
VERSION = "v20"
VERSION = "v21"
VERSION_PATH = BASE_PATH / VERSION
SCHEMA_BUILD_PATH = VERSION_PATH / "build_source"
MAIN_SCHEMA_PATH = SCHEMA_BUILD_PATH / "schema_structure.json"
Expand Down
2 changes: 1 addition & 1 deletion oemetadata/v2/v21/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
{
"name": "id",
"description": "Unique identifier",
"type": "serial",
"type": "integer",
"nullable": false,
"unit": null,
"isAbout": [
Expand Down
2 changes: 1 addition & 1 deletion oemetadata/v2/v21/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@


with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f:
OEMETADATA_V20_EXAMPLE = json.loads(f.read())
OEMETADATA_V21_EXAMPLE = json.loads(f.read())
5 changes: 4 additions & 1 deletion oemetadata/v2/v21/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,10 @@
],
"badge": "Bronze",
"title": "Comment"
}
},
"required": [
"title"
]
},
"badge": "Bronze",
"title": "Contributor"
Expand Down
2 changes: 1 addition & 1 deletion oemetadata/v2/v21/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@


with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f:
OEMETADATA_V20_SCHEMA = json.loads(f.read())
OEMETADATA_V21_SCHEMA = json.loads(f.read())
2 changes: 1 addition & 1 deletion oemetadata/v2/v21/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@


with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f:
OEMETADATA_V20_TEMPLATE = json.loads(f.read())
OEMETADATA_V21_TEMPLATE = json.loads(f.read())
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
argparse
build
bump-my-version
frictionless
jsonschema
mike
mkdocs
Expand All @@ -23,4 +24,4 @@ tox
twine
uv
wheel
-e .
-e .
33 changes: 33 additions & 0 deletions test/oemetadata/v2/v21/test_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# SPDX-FileCopyrightText: 2026 Jonas Huber <jh-RLI> © Reiner Lemoine Institut
# SPDX-FileCopyrightText: 2026 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut
# SPDX-FileCopyrightText: oemetadata <https://github.com/OpenEnergyPlatform/oemetadata/>
# SPDX-License-Identifier: MIT


def test_oemetadata_example_should_load():
try:
pass
except Warning:
print("Cannot open OEMetadata Example (v2.1)!")


def test_oemetadata_schema_should_validate_oemetadata_example():
from jsonschema import ValidationError, validate

from oemetadata.v2.v21.example import OEMETADATA_V21_EXAMPLE
from oemetadata.v2.v21.schema import OEMETADATA_V21_SCHEMA

try:
validate(OEMETADATA_V21_EXAMPLE, OEMETADATA_V21_SCHEMA)
print("OEMetadata Example is valid OEMetadata Schema (v2.1).")
except ValidationError as e:
print("Cannot validate OEMetadata Example with Schema (v2.1)!", e)


def test_oemetadata_example_is_datapackage():
from frictionless import validate

from oemetadata.v2.v21.example import OEMETADATA_V21_EXAMPLE

report = validate(OEMETADATA_V21_EXAMPLE)
assert report.valid, report.flatten(["message"])
33 changes: 33 additions & 0 deletions test/oemetadata/v2/v21/test_template.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# SPDX-FileCopyrightText: 2026 Jonas Huber <jh-RLI> © Reiner Lemoine Institut
# SPDX-FileCopyrightText: 2026 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut
# SPDX-FileCopyrightText: oemetadata <https://github.com/OpenEnergyPlatform/oemetadata/>
# SPDX-License-Identifier: MIT


def test_oemetadata_template_should_load():
try:
pass
except Warning:
print("Cannot open OEMetadata Template (v2.1)!")


def test_oemetadata_schema_should_validate_oemetadata_template():
from jsonschema import ValidationError, validate

from oemetadata.v2.v21.schema import OEMETADATA_V21_SCHEMA
from oemetadata.v2.v21.template import OEMETADATA_V21_TEMPLATE

try:
validate(OEMETADATA_V21_TEMPLATE, OEMETADATA_V21_SCHEMA)
print("OEMetadata Template is valid OEMetadata Schema (v2.1).")
except ValidationError as e:
print("Cannot validate OEMetadata Template with Schema (v2.1)!", e)


def test_oemetadata_template_is_datapackage():
from frictionless import validate

from oemetadata.v2.v21.template import OEMETADATA_V21_TEMPLATE

report = validate(OEMETADATA_V21_TEMPLATE)
assert report.valid, report.flatten(["message"])
Loading