Skip to content

Commit

Permalink
Merge pull request #221 from OpenEnergyPlatform/feature-204-folder
Browse files Browse the repository at this point in the history
Refactor folder structure #204
  • Loading branch information
Ludee authored Nov 14, 2024
2 parents 8bcf4ef + 0247991 commit 6d6907e
Show file tree
Hide file tree
Showing 161 changed files with 78 additions and 77 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Rename URI from `path` to `@id` [(#214)](https://github.com/OpenEnergyPlatform/oemetadata/pull/214)
- Rename ``source``- ``licenses`` to ``sourceLicenses`` [(#215)](https://github.com/OpenEnergyPlatform/oemetadata/pull/215)
- Update create template [(#217)](https://github.com/OpenEnergyPlatform/oemetadata/pull/217)
- Update folder structure [(#221)](https://github.com/OpenEnergyPlatform/oemetadata/pull/221)

### Removed
- [(#)]()
Expand Down
2 changes: 1 addition & 1 deletion REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ SPDX-FileCopyrightText = "Ludwig Hülk <@Ludee> © Reiner Lemoine Institut"
SPDX-License-Identifier = "CC0-1.0"

[[annotations]]
path = "metadata/v20/v20/build_source/schemas/*.json"
path = "metadata/v2/v20/build_source/schemas/*.json"
precedence = "override"
SPDX-FileCopyrightText = "Ludwig Hülk <@Ludee> © Reiner Lemoine Institut; Jonas Huber <jh-RLI> © Reiner Lemoine Institut"
SPDX-License-Identifier = "MIT"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def save_json(data: Dict[str, Any], filename: Path) -> None:

def test_oemetadata_schema_should_validate_oemetadata_example(example):
from jsonschema import validate, ValidationError
from metadata.v20.v20.schema import OEMETADATA_V20_SCHEMA
from metadata.v2.v20.schema import OEMETADATA_V20_SCHEMA

try:
validate(example, OEMETADATA_V20_SCHEMA)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def main():

def test_oemetadata_schema_should_validate_oemetadata_template():
from jsonschema import validate, ValidationError
from metadata.v20.v20.template import OEMETADATA_V20_TEMPLATE
from metadata.v20.v20.schema import OEMETADATA_V20_SCHEMA
from metadata.v2.v20.template import OEMETADATA_V20_TEMPLATE
from metadata.v2.v20.schema import OEMETADATA_V20_SCHEMA

try:
validate(OEMETADATA_V20_TEMPLATE, OEMETADATA_V20_SCHEMA)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

LOG_FORMAT = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"

BASE_PATH = Path("metadata/v20/")
BASE_PATH = Path("metadata/v2/")
VERSION = "v20"
VERSION_PATH = BASE_PATH / VERSION
SCHEMA_BUILD_PATH = VERSION_PATH / "build_source"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

def test_oemetadata_example_should_load():
try:
from metadata.v10.v130.example import OEMETADATA_V130_EXAMPLE
from metadata.v1.v130.example import OEMETADATA_V130_EXAMPLE
except Warning:
print("Cannot open OEMetadata Example (v1.3.0)!")


def test_oemetadata_schema_should_validate_oemetadata_example():
from jsonschema import validate, ValidationError
from metadata.v10.v130.example import OEMETADATA_V130_EXAMPLE
from metadata.v10.v130.schema import OEMETADATA_V130_SCHEMA
from metadata.v1.v130.example import OEMETADATA_V130_EXAMPLE
from metadata.v1.v130.schema import OEMETADATA_V130_SCHEMA

try:
validate(OEMETADATA_V130_EXAMPLE, OEMETADATA_V130_SCHEMA)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

def test_oemetadata_schema_should_load():
try:
from metadata.v10.v130.schema import OEMETADATA_V130_SCHEMA
from metadata.v1.v130.schema import OEMETADATA_V130_SCHEMA
except Warning:
print("Cannot open OEMetadata Schema (v1.3.0)!")


def test_jsonschema_should_validate_oemetadata_schema():
from jsonschema import validate, ValidationError
from metadata.v10.v130.schema import OEMETADATA_V130_SCHEMA
from metadata.v1.v130.schema import OEMETADATA_V130_SCHEMA
from metadata.json_schema.draft07.schema \
import OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA

Expand All @@ -24,7 +24,7 @@ def test_jsonschema_should_validate_oemetadata_schema():


def test_oemetadata_schema_should_have_correct_path():
from metadata.v10.v130.schema import OEMETADATA_V130_SCHEMA
from metadata.v1.v130.schema import OEMETADATA_V130_SCHEMA
import string

def get_string(s):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

def test_oemetadata_template_should_load():
try:
from metadata.v10.v130.template import OEMETADATA_V130_TEMPLATE
from metadata.v1.v130.template import OEMETADATA_V130_TEMPLATE
except Warning:
print("Cannot open OEMetadata Template (v1.3.0)!")


def test_oemetadata_schema_should_validate_oemetadata_template():
from jsonschema import validate, ValidationError
from metadata.v10.v130.template import OEMETADATA_V130_TEMPLATE
from metadata.v10.v130.schema import OEMETADATA_V130_SCHEMA
from metadata.v1.v130.template import OEMETADATA_V130_TEMPLATE
from metadata.v1.v130.schema import OEMETADATA_V130_SCHEMA

try:
validate(OEMETADATA_V130_TEMPLATE, OEMETADATA_V130_SCHEMA)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

def test_oemetadata_example_should_load():
try:
from metadata.v10.v140.example import OEMETADATA_V140_EXAMPLE
from metadata.v1.v140.example import OEMETADATA_V140_EXAMPLE
except Warning:
print("Cannot open OEMetadata Example (v1.4.0)!")


def test_oemetadata_schema_should_validate_oemetadata_example():
from jsonschema import validate, ValidationError
from metadata.v10.v140.example import OEMETADATA_V140_EXAMPLE
from metadata.v10.v140.schema import OEMETADATA_V140_SCHEMA
from metadata.v1.v140.example import OEMETADATA_V140_EXAMPLE
from metadata.v1.v140.schema import OEMETADATA_V140_SCHEMA

try:
validate(OEMETADATA_V140_EXAMPLE, OEMETADATA_V140_SCHEMA)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

def test_oemetadata_schema_should_load():
try:
from metadata.v10.v140.schema import OEMETADATA_V140_SCHEMA
from metadata.v1.v140.schema import OEMETADATA_V140_SCHEMA
except Warning:
print("Cannot open OEMetadata Schema (v1.4.0)!")


def test_jsonschema_should_validate_oemetadata_schema():
from jsonschema import validate, ValidationError
from metadata.v10.v140.schema import OEMETADATA_V140_SCHEMA
from metadata.v1.v140.schema import OEMETADATA_V140_SCHEMA
from metadata.json_schema.draft07.schema \
import OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA

Expand All @@ -24,7 +24,7 @@ def test_jsonschema_should_validate_oemetadata_schema():


def test_oemetadata_schema_should_have_correct_path():
from metadata.v10.v140.schema import OEMETADATA_V140_SCHEMA
from metadata.v1.v140.schema import OEMETADATA_V140_SCHEMA
import string

def get_string(s):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

def test_oemetadata_template_should_load():
try:
from metadata.v10.v140.template import OEMETADATA_V140_TEMPLATE
from metadata.v1.v140.template import OEMETADATA_V140_TEMPLATE
except Warning:
print("Cannot open OEMetadata Template (v1.4.0)!")


def test_oemetadata_schema_should_validate_oemetadata_template():
from jsonschema import validate, ValidationError
from metadata.v10.v140.template import OEMETADATA_V140_TEMPLATE
from metadata.v10.v140.schema import OEMETADATA_V140_SCHEMA
from metadata.v1.v140.template import OEMETADATA_V140_TEMPLATE
from metadata.v1.v140.schema import OEMETADATA_V140_SCHEMA

try:
validate(OEMETADATA_V140_TEMPLATE, OEMETADATA_V140_SCHEMA)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

def test_oemetadata_example_should_load():
try:
from metadata.v10.v141.example import OEMETADATA_V141_EXAMPLE
from metadata.v1.v141.example import OEMETADATA_V141_EXAMPLE
except Warning:
print("Cannot open OEMetadata Example (v1.4.1)!")


def test_oemetadata_schema_should_validate_oemetadata_example():
from jsonschema import validate, ValidationError
from metadata.v10.v141.example import OEMETADATA_V141_EXAMPLE
from metadata.v10.v141.schema import OEMETADATA_V141_SCHEMA
from metadata.v1.v141.example import OEMETADATA_V141_EXAMPLE
from metadata.v1.v141.schema import OEMETADATA_V141_SCHEMA

try:
validate(OEMETADATA_V141_EXAMPLE, OEMETADATA_V141_SCHEMA)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

def test_oemetadata_schema_should_load():
try:
from metadata.v10.v141.schema import OEMETADATA_V141_SCHEMA
from metadata.v1.v141.schema import OEMETADATA_V141_SCHEMA
except Warning:
print("Cannot open OEMetadata Schema (v1.4.1)!")


def test_jsonschema_should_validate_oemetadata_schema():
from jsonschema import validate, ValidationError
from metadata.v10.v141.schema import OEMETADATA_V141_SCHEMA
from metadata.v1.v141.schema import OEMETADATA_V141_SCHEMA
from metadata.json_schema.draft07.schema \
import OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA

Expand All @@ -24,7 +24,7 @@ def test_jsonschema_should_validate_oemetadata_schema():


def test_oemetadata_schema_should_have_correct_path():
from metadata.v10.v141.schema import OEMETADATA_V141_SCHEMA
from metadata.v1.v141.schema import OEMETADATA_V141_SCHEMA
import string

def get_string(s):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

def test_oemetadata_template_should_load():
try:
from metadata.v10.v141.template import OEMETADATA_V141_TEMPLATE
from metadata.v1.v141.template import OEMETADATA_V141_TEMPLATE
except Warning:
print("Cannot open OEMetadata Template (v1.4.1)!")


def test_oemetadata_schema_should_validate_oemetadata_template():
from jsonschema import validate, ValidationError
from metadata.v10.v141.template import OEMETADATA_V141_TEMPLATE
from metadata.v10.v141.schema import OEMETADATA_V141_SCHEMA
from metadata.v1.v141.template import OEMETADATA_V141_TEMPLATE
from metadata.v1.v141.schema import OEMETADATA_V141_SCHEMA

try:
validate(OEMETADATA_V141_TEMPLATE, OEMETADATA_V141_SCHEMA)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

def test_oemetadata_example_should_load():
try:
from metadata.v10.v150.example import OEMETADATA_V150_EXAMPLE
from metadata.v1.v150.example import OEMETADATA_V150_EXAMPLE
except Warning:
print("Cannot open OEMetadata Example (v1.5.0)!")


def test_oemetadata_schema_should_validate_oemetadata_example():
from jsonschema import validate, ValidationError
from metadata.v10.v150.example import OEMETADATA_V150_EXAMPLE
from metadata.v10.v150.schema import OEMETADATA_V150_SCHEMA
from metadata.v1.v150.example import OEMETADATA_V150_EXAMPLE
from metadata.v1.v150.schema import OEMETADATA_V150_SCHEMA

try:
validate(OEMETADATA_V150_EXAMPLE, OEMETADATA_V150_SCHEMA)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

def test_oemetadata_schema_should_load():
try:
from metadata.v10.v150.schema import OEMETADATA_V150_SCHEMA
from metadata.v1.v150.schema import OEMETADATA_V150_SCHEMA
except Warning:
print("Cannot open OEMetadata Schema (v1.5.0)!")


def test_jsonschema_should_validate_oemetadata_schema():
from jsonschema import validate, ValidationError
from metadata.v10.v150.schema import OEMETADATA_V150_SCHEMA
from metadata.v1.v150.schema import OEMETADATA_V150_SCHEMA
from metadata.json_schema.draft07.schema \
import OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA

Expand All @@ -24,7 +24,7 @@ def test_jsonschema_should_validate_oemetadata_schema():


def test_oemetadata_schema_should_have_correct_path():
from metadata.v10.v150.schema import OEMETADATA_V150_SCHEMA
from metadata.v1.v150.schema import OEMETADATA_V150_SCHEMA
import string

def get_string(s):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

def test_oemetadata_template_should_load():
try:
from metadata.v10.v150.template import OEMETADATA_V150_TEMPLATE
from metadata.v1.v150.template import OEMETADATA_V150_TEMPLATE
except Warning:
print("Cannot open OEMetadata Template (v1.5.0)!")


def test_oemetadata_schema_should_validate_oemetadata_template():
from jsonschema import validate, ValidationError
from metadata.v10.v150.template import OEMETADATA_V150_TEMPLATE
from metadata.v10.v150.schema import OEMETADATA_V150_SCHEMA
from metadata.v1.v150.template import OEMETADATA_V150_TEMPLATE
from metadata.v1.v150.schema import OEMETADATA_V150_SCHEMA

try:
validate(OEMETADATA_V150_TEMPLATE, OEMETADATA_V150_SCHEMA)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

def test_oemetadata_example_should_load():
try:
from metadata.v10.v151.example import OEMETADATA_V151_EXAMPLE
from metadata.v1.v151.example import OEMETADATA_V151_EXAMPLE
except Warning:
print("Cannot open OEMetadata Example (v1.5.1)!")


def test_oemetadata_schema_should_validate_oemetadata_example():
from jsonschema import validate, ValidationError
from metadata.v10.v151.example import OEMETADATA_V151_EXAMPLE
from metadata.v10.v151.schema import OEMETADATA_V151_SCHEMA
from metadata.v1.v151.example import OEMETADATA_V151_EXAMPLE
from metadata.v1.v151.schema import OEMETADATA_V151_SCHEMA

try:
validate(OEMETADATA_V151_EXAMPLE, OEMETADATA_V151_SCHEMA)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

def test_oemetadata_schema_should_load():
try:
from metadata.v10.v151.schema import OEMETADATA_V151_SCHEMA
from metadata.v1.v151.schema import OEMETADATA_V151_SCHEMA
except Warning:
print("Cannot open OEMetadata Schema (v1.5.1)!")


def test_jsonschema_should_validate_oemetadata_schema():
from jsonschema import validate, ValidationError
from metadata.v10.v151.schema import OEMETADATA_V151_SCHEMA
from metadata.v1.v151.schema import OEMETADATA_V151_SCHEMA
from metadata.json_schema.draft07.schema \
import OEMETADATA_JSONSCHEMA_DRAFT07_SCHEMA

Expand All @@ -24,7 +24,7 @@ def test_jsonschema_should_validate_oemetadata_schema():


def test_oemetadata_schema_should_have_correct_path():
from metadata.v10.v151.schema import OEMETADATA_V151_SCHEMA
from metadata.v1.v151.schema import OEMETADATA_V151_SCHEMA
import string

def get_string(s):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

def test_oemetadata_template_should_load():
try:
from metadata.v10.v151.template import OEMETADATA_V151_TEMPLATE
from metadata.v1.v151.template import OEMETADATA_V151_TEMPLATE
except Warning:
print("Cannot open OEMetadata Template (v1.5.1)!")


def test_oemetadata_schema_should_validate_oemetadata_template():
from jsonschema import validate, ValidationError
from metadata.v10.v151.template import OEMETADATA_V151_TEMPLATE
from metadata.v10.v151.schema import OEMETADATA_V151_SCHEMA
from metadata.v1.v151.template import OEMETADATA_V151_TEMPLATE
from metadata.v1.v151.schema import OEMETADATA_V151_SCHEMA

try:
validate(OEMETADATA_V151_TEMPLATE, OEMETADATA_V151_SCHEMA)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

def test_oemetadata_example_should_load():
try:
from metadata.v10.v152.example import OEMETADATA_V152_EXAMPLE
from metadata.v1.v152.example import OEMETADATA_V152_EXAMPLE
except Warning:
print("Cannot open OEMetadata Example (v1.5.2)!")


def test_oemetadata_schema_should_validate_oemetadata_example():
from jsonschema import validate, ValidationError
from metadata.v10.v152.example import OEMETADATA_V152_EXAMPLE
from metadata.v10.v152.schema import OEMETADATA_V152_SCHEMA
from metadata.v1.v152.example import OEMETADATA_V152_EXAMPLE
from metadata.v1.v152.schema import OEMETADATA_V152_SCHEMA

try:
validate(OEMETADATA_V152_EXAMPLE, OEMETADATA_V152_SCHEMA)
Expand Down
Loading

0 comments on commit 6d6907e

Please sign in to comment.