OpenEnergyPlatform / omi

Repository for the Open Metadata Integration (OMI). For metadata definition see metadata repo:
https://github.com/OpenEnergyPlatform/metadata
GNU Affero General Public License v3.0
7 stars 4 forks source link

The metadata generated by the omi compiler has a modified key sequence #59

Closed jh-RLI closed 1 year ago

jh-RLI commented 1 year ago

The meta fields in the metadata JSON do not maintain their order when using the conversion. This originally is caused by the OEMetadata object that is created by omi´s compiler.

Example: _comment is originally the last key in the oemetadata.

caused by this compiler method: https://github.com/OpenEnergyPlatform/omi/blob/27305e9a29d928f9802e37d83aeb6a7ac5a5956a/src/omi/dialects/oep/compiler.py#L339-L370

"_comment": {
    "metadata": "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)",
    "dates": "Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh)",
    "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/wiki)",
    "null": "If not applicable use: null",
    "todo": "If a value is not yet available, use: todo"
},
"metaMetadata": {
    "metadataVersion": "OEP-1.5.1",
    "metadataLicense": {
        "name": "CC0-1.0",
        "title": "Creative Commons Zero v1.0 Universal",
        "path": "https://creativecommons.org/publicdomain/zero/1.0/"
    }
}
jh-RLI commented 1 year ago

This was fixed by #61