Skip to content

Commit

Permalink
Merge pull request #202 from OpenEnergyPlatform/hotfix-fix-master-bra…
Browse files Browse the repository at this point in the history
…nch-renaming-artifacts

Hotfix fix master branch renaming artifacts
  • Loading branch information
jh-RLI authored Oct 31, 2024
2 parents 32e4a94 + ab4ed54 commit 82dc226
Show file tree
Hide file tree
Showing 26 changed files with 42 additions and 40 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ For each version, important additions, changes and removals are listed here.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.1] - Major Release - Refactor OEMetadata for NFDI

### Changed
- HotFix naming errors in some files related to the renaming of master to production [#202](https://github.com/OpenEnergyPlatform/oemetadata/issues/202)

## [2.0.0] - Major Release - Refactor OEMetadata for NFDI

Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ authors:
title: "Open Energy Family - Open Energy Metadata (OEMetadata)"
type: software
license: MIT
version: 2.0.0
version: 2.0.1
doi:
date-released: 2024-10-31
url: "https://github.com/OpenEnergyPlatform/oemetadata"
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ License and Citation
:target: LICENSE.txt
:alt: License

.. |badge_documentation| image:: https://img.shields.io/github/actions/workflow/status/OpenEnergyPlatform/oemetadata/gh-pages.yml?branch=release-v2.0.0
.. |badge_documentation| image:: https://img.shields.io/github/actions/workflow/status/OpenEnergyPlatform/oemetadata/gh-pages.yml?branch=release-v2.0.1
:target: https://openenergyplatform.github.io/oemetadata/
:alt: Documentation

Expand Down
2 changes: 1 addition & 1 deletion metadata/latest/build_source/schemas/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"properties": {
"metadataVersion": {
"description": "Type and version number of the metadata.",
"example": "OEMetadata-2.0.0",
"example": "OEMetadata-2.0.1",
"type": [
"string",
"null"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
requires: "pip install jsonschema referencing"
Usage: Script with additional arguments --debug for more detailed output.
Requires the folder structure introduced in oemetadata v2.0.0.
Requires the folder structure introduced in oemetadata v2.0.1.
"""

# Standard Library Imports
Expand Down
2 changes: 1 addition & 1 deletion metadata/latest/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
}
],
"metaMetadata": {
"metadataVersion": "OEMetadata-2.0.0",
"metadataVersion": "OEMetadata-2.0.1",
"metadataLicense": {
"name": "CC0-1.0",
"title": "Creative Commons Zero v1.0 Universal",
Expand Down
2 changes: 1 addition & 1 deletion metadata/latest/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,7 @@
"properties": {
"metadataVersion": {
"description": "Type and version number of the metadata.",
"example": "OEMetadata-2.0.0",
"example": "OEMetadata-2.0.1",
"type": [
"string",
"null"
Expand Down
2 changes: 1 addition & 1 deletion metadata/latest/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
}
],
"metaMetadata": {
"metadataVersion": "OEMetadata-2.0.0",
"metadataVersion": "OEMetadata-2.0.1",
"metadataLicense": {
"name": "CC0-1.0",
"title": "Creative Commons Zero v1.0 Universal",
Expand Down
2 changes: 1 addition & 1 deletion metadata/v151/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a href="https://github.com/OpenEnergyPlatform/oemetadata/"><img align="right" width="100" height="100" src="https://raw.githubusercontent.com/OpenEnergyPlatform/organisation/productiontion/logo/OpenEnergyFamily_Logo_OEMetadata.png" alt="OpenEnergyMetadata"></a>
<a href="https://github.com/OpenEnergyPlatform/oemetadata/"><img align="right" width="100" height="100" src="https://raw.githubusercontent.com/OpenEnergyPlatform/organisation/production/logo/OpenEnergyFamily_Logo_OEMetadata.png" alt="OpenEnergyMetadata"></a>
<a href="https://openenergy-platform.org/"><img align="right" width="100" height="100" src="https://avatars2.githubusercontent.com/u/37101913?s=400&u=9b593cfdb6048a05ea6e72d333169a65e7c922be&v=4" alt="OpenEnergyPlatform"></a>


Expand Down
2 changes: 1 addition & 1 deletion metadata/v151/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/productiontion/metadata/v151/schema.json",
"$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v151/schema.json",
"description": "Open Energy Plaftorm (OEP) metadata schema v1.5.1",
"type": "object",
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion metadata/v151/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
"units": "Use a space between numbers and units (100 m)",
"languages": "Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE)",
"licenses": "License name must follow the SPDX License List (https://spdx.org/licenses/)",
"review": "Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/blob/productiontion/data-review/manual/review_manual.md)",
"review": "Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/blob/production/data-review/manual/review_manual.md)",
"null": "If not applicable use: null",
"todo": "If a value is not yet available, use: todo"
}
Expand Down
2 changes: 1 addition & 1 deletion metadata/v152/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/productiontiontion/metadata/v152/schema.json",
"$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v152/schema.json",
"description": "Open Energy Plaftorm (OEP) metadata schema v1.5.2",
"type": "object",
"properties": {
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/productiontion/metadata/v160/schema.json",
"$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/v160/schema.json",
"description": "Open Energy Plaftorm (OEP) metadata schema latest",
"type": "object",
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion metadata/v20/build_source/schemas/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"properties": {
"metadataVersion": {
"description": "Type and version number of the metadata.",
"example": "OEMetadata-2.0.0",
"example": "OEMetadata-2.0.1",
"type": [
"string",
"null"
Expand Down
2 changes: 1 addition & 1 deletion metadata/v20/build_source/scripts/resolve_schema_refs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
requires: "pip install jsonschema referencing"
Usage: Script with additional arguments --debug for more detailed output.
Requires the folder structure introduced in oemetadata v2.0.0.
Requires the folder structure introduced in oemetadata v2.0.1.
"""

# Standard Library Imports
Expand Down
2 changes: 1 addition & 1 deletion metadata/v20/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
}
],
"metaMetadata": {
"metadataVersion": "OEMetadata-2.0.0",
"metadataVersion": "OEMetadata-2.0.1",
"metadataLicense": {
"name": "CC0-1.0",
"title": "Creative Commons Zero v1.0 Universal",
Expand Down
2 changes: 1 addition & 1 deletion metadata/v20/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
import os

with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f:
OEMETADATA_V200_EXAMPLE = json.loads(f.read())
OEMETADATA_V20_EXAMPLE = json.loads(f.read())
2 changes: 1 addition & 1 deletion metadata/v20/metadata_key_description.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# OEMetadata - Key Description

This pages describes the key of **OEMetadata version 2.0 .** <br>
You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/oemetadata/blob/productiontion/metadata/latest/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/example.json) of the metadata string.
You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/example.json) of the metadata string.


## JSON Format
Expand Down
4 changes: 2 additions & 2 deletions metadata/v20/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
},
"@context": {
"description": "Explanation of metadata keys in ontology terms.",
"example": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/productiontiontiontion/metadata/latest/context.json",
"example": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/context.json",
"type": [
"string",
"null"
Expand Down Expand Up @@ -1255,7 +1255,7 @@
"properties": {
"metadataVersion": {
"description": "Type and version number of the metadata.",
"example": "OEMetadata-2.0.0",
"example": "OEMetadata-2.0.1",
"type": [
"string",
"null"
Expand Down
2 changes: 1 addition & 1 deletion metadata/v20/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
import os

with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f:
OEMETADATA_V200_SCHEMA = json.loads(f.read())
OEMETADATA_V20_SCHEMA = json.loads(f.read())
2 changes: 1 addition & 1 deletion metadata/v20/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
}
],
"metaMetadata": {
"metadataVersion": "OEMetadata-2.0.0",
"metadataVersion": "OEMetadata-2.0.1",
"metadataLicense": {
"name": "CC0-1.0",
"title": "Creative Commons Zero v1.0 Universal",
Expand Down
2 changes: 1 addition & 1 deletion metadata/v20/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
import os

with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f:
OEMETADATA_V200_TEMPLATE = json.loads(f.read())
OEMETADATA_V20_TEMPLATE = json.loads(f.read())
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name="oemetadata",
version="2.0.0",
version="2.0.1",
description="Open Energy Metadata (OEMetadata) - The energy metadata standard",
long_description=long_description,
long_description_content_type="text/x-rst",
Expand Down
8 changes: 4 additions & 4 deletions tests/metadata/v20/test_example.py
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
16 changes: 7 additions & 9 deletions tests/metadata/v20/test_schema.py
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
)
8 changes: 4 additions & 4 deletions tests/metadata/v20/test_template.py
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

0 comments on commit 82dc226

Please sign in to comment.