Skip to content

Commit bb65550

Browse files
authored
Merge pull request #305 from OpenEnergyPlatform/feature-290-frictionless-test
Add test for example and template to be valid frictionless datapackage
2 parents 92b9093 + 49f856b commit bb65550

14 files changed

Lines changed: 197 additions & 86 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
### Added
2020
- Start new version 2.1. [(#)](https://github.com/OpenEnergyPlatform/oemetadata/pull/)
2121
- Add badges for Zenodo publication, FAIRsharing DOI and RDA MSC [(#273)](https://github.com/OpenEnergyPlatform/oemetadata/pull/273)
22+
- Dataset creator to contributors [(#304)](https://github.com/OpenEnergyPlatform/oemetadata/pull/304)
2223
- Add `mappingRelation` to `isAbout` [(#307)](https://github.com/OpenEnergyPlatform/oemetadata/pull/307)
2324
- Add `mappingRelation` to `valueReference` [(#307)](https://github.com/OpenEnergyPlatform/oemetadata/pull/307)
25+
- Tests for example and template to be valid frictionless datapackage [(#305)](https://github.com/OpenEnergyPlatform/oemetadata/pull/305)
2426

2527
### Changed
2628
- Update TLDR URL in example sourceLicenses [(#275)](https://github.com/OpenEnergyPlatform/oemetadata/pull/275)

REUSE.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@ SPDX-FileCopyrightText = ["2026 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut
118118
"oemetadata <https://github.com/OpenEnergyPlatform/oemetadata/>"]
119119
SPDX-License-Identifier = "MIT"
120120

121+
[[annotations]]
122+
path = "oemetadata/v2/v21/*.csv"
123+
precedence = "override"
124+
SPDX-FileCopyrightText = ["2026 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut",
125+
"2026 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut",
126+
"oemetadata <https://github.com/OpenEnergyPlatform/oemetadata/>"]
127+
SPDX-License-Identifier = "CC0-1.0"
128+
121129
[[annotations]]
122130
path = "oemetadata/v2/v21/build_source/schemas/*.json"
123131
precedence = "override"
@@ -141,3 +149,19 @@ SPDX-FileCopyrightText = ["2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut
141149
"2024 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut",
142150
"oemetadata <https://github.com/OpenEnergyPlatform/oemetadata/>"]
143151
SPDX-License-Identifier = "MIT"
152+
153+
[[annotations]]
154+
path = "test/oemetadata/v2/v21/example/*.csv"
155+
precedence = "override"
156+
SPDX-FileCopyrightText = ["2026 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut",
157+
"2026 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut",
158+
"oemetadata <https://github.com/OpenEnergyPlatform/oemetadata/>"]
159+
SPDX-License-Identifier = "CC0-1.0"
160+
161+
[[annotations]]
162+
path = "test/oemetadata/v2/v21/example/*.json"
163+
precedence = "override"
164+
SPDX-FileCopyrightText = ["2026 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut",
165+
"2024 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut",
166+
"oemetadata <https://github.com/OpenEnergyPlatform/oemetadata/>"]
167+
SPDX-License-Identifier = "CC0-1.0"

oemetadata/v2/v21/build_source/schemas/fields.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"null"
2626
],
2727
"examples": [
28-
"CSV"
28+
"csv"
2929
],
3030
"badge": "Gold",
3131
"title": "Format",
@@ -278,7 +278,6 @@
278278
"null"
279279
],
280280
"examples": [
281-
"id",
282281
"version"
283282
],
284283
"badge": "Iron",
@@ -298,7 +297,7 @@
298297
"null"
299298
],
300299
"examples": [
301-
"model_draft.oep_oemetadata_table_example_version"
300+
"example_version.csv"
302301
],
303302
"badge": "Iron",
304303
"title": "Foreign Resource"
@@ -313,7 +312,6 @@
313312
"null"
314313
],
315314
"examples": [
316-
"id",
317315
"version"
318316
],
319317
"badge": "Iron",

oemetadata/v2/v21/build_source/schemas/general.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"null"
2424
],
2525
"examples": [
26-
"http://openenergyplatform.org/dataedit/view/model_draft/oemetadata_table_template"
26+
"example.csv"
2727
],
2828
"badge": "Bronze",
2929
"title": "Path",
@@ -36,7 +36,7 @@
3636
"null"
3737
],
3838
"examples": [
39-
"oemetadata_table_template"
39+
"example.csv"
4040
],
4141
"badge": "Iron",
4242
"title": "Name"
@@ -48,7 +48,7 @@
4848
"null"
4949
],
5050
"examples": [
51-
"OEMetadata Table Template"
51+
"OEMetadata Table Example"
5252
],
5353
"badge": "Silver",
5454
"title": "Title"
@@ -60,7 +60,7 @@
6060
"null"
6161
],
6262
"examples": [
63-
"Example table used to illustrate the OEMetadata structure and features."
63+
"Example metadata and table used to illustrate the OEMetadata structure and features."
6464
],
6565
"badge": "Silver",
6666
"title": "Description"

oemetadata/v2/v21/build_source/schemas/provenance.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,12 @@
102102
"title": "Comment"
103103
}
104104
},
105+
"required": [
106+
"title"
107+
],
105108
"badge": "Bronze",
106109
"title": "Contributor"
107-
},
108-
"badge": "Bronze",
109-
"title": "Contributors"
110+
}
110111
}
111-
},
112-
"required": [
113-
"contributors"
114-
]
112+
}
115113
}

oemetadata/v2/v21/build_source/scripts/example/fields.json

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,65 +2,72 @@
22
{
33
"name": "id",
44
"description": "Unique identifier",
5-
"type": "serial",
5+
"type": "integer",
66
"nullable": false,
77
"unit": null,
88
"isAbout": [
99
{
1010
"name": "identifier",
11-
"@id": "http://purl.obolibrary.org/obo/IAO_0020000"
11+
"@id": "http://purl.obolibrary.org/obo/IAO_0020000",
12+
"mappingRelation": "skos:exactMatch"
1213
}
1314
],
1415
"valueReference": [
1516
{
1617
"value": null,
1718
"name": null,
18-
"@id": null
19+
"@id": null,
20+
"mappingRelation": null
1921
}
2022
]
2123
},
2224
{
2325
"name": "name",
2426
"description": "Technology Name",
25-
"type": "text",
27+
"type": "string",
2628
"nullable": true,
2729
"unit": null,
2830
"isAbout": [
2931
{
3032
"name": "power generation technology",
31-
"@id": "http://openenergy-platform.org/ontology/oeo/OEO_00010423"
33+
"@id": "http://openenergy-platform.org/ontology/oeo/OEO_00010423",
34+
"mappingRelation": "skos:exactMatch"
3235
}
3336
],
3437
"valueReference": [
3538
{
3639
"value": "wind",
3740
"name": "wind power technology",
38-
"@id": "http://openenergyplatform.org/ontology/oeo/OEO_00010424"
41+
"@id": "http://openenergyplatform.org/ontology/oeo/OEO_00010424",
42+
"mappingRelation": "skos:exactMatch"
3943
}
4044
]
4145
},
4246
{
4347
"name": "type",
4448
"description": "Type of wind farm",
45-
"type": "text",
49+
"type": "string",
4650
"nullable": true,
4751
"unit": null,
4852
"isAbout": [
4953
{
5054
"name": "wind farm",
51-
"@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000447/"
55+
"@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000447/",
56+
"mappingRelation": "skos:exactMatch"
5257
}
5358
],
5459
"valueReference": [
5560
{
5661
"value": "onshore",
5762
"name": "onshore wind farm",
58-
"@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000311/"
63+
"@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000311/",
64+
"mappingRelation": "skos:exactMatch"
5965
},
6066
{
6167
"value": "offshore",
6268
"name": "offshore wind farm",
63-
"@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000308/"
69+
"@id": "https://openenergyplatform.org/ontology/oeo/OEO_00000308/",
70+
"mappingRelation": "skos:exactMatch"
6471
}
6572
]
6673
},
@@ -73,34 +80,38 @@
7380
"isAbout": [
7481
{
7582
"name": "year",
76-
"@id": "https://openenergyplatform.org/ontology/oeo/UO_0000036/"
83+
"@id": "https://openenergyplatform.org/ontology/oeo/UO_0000036/",
84+
"mappingRelation": "skos:exactMatch"
7785
}
7886
],
7987
"valueReference": [
8088
{
8189
"value": null,
8290
"name": null,
83-
"@id": null
91+
"@id": null,
92+
"mappingRelation": null
8493
}
8594
]
8695
},
8796
{
8897
"name": "value",
8998
"description": "Bruttoleistung",
90-
"type": "decimal",
99+
"type": "number",
91100
"nullable": true,
92101
"unit": "MW",
93102
"isAbout": [
94103
{
95104
"name": "nameplate capacity",
96-
"@id": "https://openenergyplatform.org/ontology/oeo/OEO_00230003/"
105+
"@id": "https://openenergyplatform.org/ontology/oeo/OEO_00230003/",
106+
"mappingRelation": "skos:exactMatch"
97107
}
98108
],
99109
"valueReference": [
100110
{
101111
"value": null,
102112
"name": null,
103-
"@id": null
113+
"@id": null,
114+
"mappingRelation": null
104115
}
105116
]
106117
},
@@ -113,54 +124,60 @@
113124
"isAbout": [
114125
{
115126
"name": "Operating Mode Status",
116-
"@id": "https://ontology.brickschema.org/brick/Operating_Mode_Status"
127+
"@id": "https://ontology.brickschema.org/brick/Operating_Mode_Status",
128+
"mappingRelation": "skos:exactMatch"
117129
}
118130
],
119131
"valueReference": [
120132
{
121133
"value": null,
122134
"name": null,
123-
"@id": null
135+
"@id": null,
136+
"mappingRelation": null
124137
}
125138
]
126139
},
127140
{
128141
"name": "version",
129142
"description": "Version",
130-
"type": "integer",
143+
"type": "string",
131144
"nullable": true,
132145
"unit": null,
133146
"isAbout": [
134147
{
135148
"name": "version number",
136-
"@id": "http://purl.obolibrary.org/obo/IAO_0000129"
149+
"@id": "http://purl.obolibrary.org/obo/IAO_0000129",
150+
"mappingRelation": "skos:exactMatch"
137151
}
138152
],
139153
"valueReference": [
140154
{
141155
"value": null,
142156
"name": null,
143-
"@id": null
157+
"@id": null,
158+
"mappingRelation": null
144159
}
145160
]
146161
},
147162
{
148163
"name": "comment",
149164
"description": "",
150-
"type": "text",
165+
"type": "string",
151166
"nullable": true,
152167
"unit": null,
153168
"isAbout": [
154169
{
155170
"name": "comment",
156-
"@id": "http://semanticscience.org/resource/SIO_001167"
171+
"@id": "http://semanticscience.org/resource/SIO_001167",
172+
"mappingRelation": "skos:exactMatch"
157173
}
158174
],
159175
"valueReference": [
160176
{
161177
"value": null,
162178
"name": null,
163-
"@id": null
179+
"@id": null,
180+
"mappingRelation": null
164181
}
165182
]
166183
}

oemetadata/v2/v21/example.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"id","name","type","year","value","is_active","version","comment"
2+
1,"wind","onshore",2021,55.93,true,"0.1.0",""
3+
2,"wind","offshore",2021,7.79,true,"0.1.0",""
4+
3,"wind","onshore",2022,58.05,true,"0.1.1",""
5+
4,"wind","offshore",2022,8.13,true,"0.1.1",""

0 commit comments

Comments
 (0)