Skip to content

Commit

Permalink
Merge pull request #165 from OpenEnergyPlatform/bugfix-152-duplicate-…
Browse files Browse the repository at this point in the history
…names

Bugfix duplicate names in resources #152
  • Loading branch information
jh-RLI authored Oct 16, 2024
2 parents e77e6e1 + 580d328 commit 6674cc6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 30 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Here is a template for new release sections

- Remove email from contributors [(#157)](https://github.com/OpenEnergyPlatform/oemetadata/pull/157)
- Remove all additionalProperties is false [(#163)](https://github.com/OpenEnergyPlatform/oemetadata/pull/163)
- Remove duplicate keys from resources [(#165)](https://github.com/OpenEnergyPlatform/oemetadata/pull/165)

## [1.6.0] - Release - Introduce badges in json schema - 2023-05-30

Expand Down
6 changes: 3 additions & 3 deletions metadata/v200_draft/build_source/schemas/general.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"properties": {
"name": {
"description": "A filename or database conform table name.",
"example": "oemetadata_table_example_v20",
"example": "model_draft.oemetadata_table_example_v20",
"type": [
"string",
"null"
Expand All @@ -23,15 +23,15 @@
"badge": "Silver",
"title": "Title"
},
"id": {
"path": {
"description": "A unique identifier (URI/UUID/DOI) for the table or file.",
"example": "http://openenergyplatform.org/dataedit/view/model_draft/oemetadata_table_example_v20",
"type": [
"string",
"null"
],
"badge": "Bronze",
"title": "ID",
"title": "Path",
"readonly": true
},
"description": {
Expand Down
29 changes: 3 additions & 26 deletions metadata/v200_draft/build_source/schemas/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,9 @@
"hidden": true
}
},
"name": {
"description": "A resource MUST contain a name unique to amongst all resources in this data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus \".\", \"-\" and \"_\". It may not start with a number. In a database this will be the name of the table within its containing schema. It would be usual for the name to correspond to the file name (minus the file-extension) of the data file the resource describes. Example:",
"example": "sandbox.example_table",
"type": [
"string",
"null"
],
"badge": "Iron",
"title": "Name"
},
"path": {
"description": "A URL that should be a permanent http(s) address or other path directly linking to the resource.",
"example": "https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_line",
"type": [
"string",
"null"
],
"badge": "Gold",
"title": "Path",
"options": {
"hidden": true
}
},
"format": {
"description": "The file extension. 'csv', 'xls', 'json' etc. are expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a database.",
"example": "csv",
"description": "A file extension format. Possible options are 'csv', 'xls', 'json' and other standard file extension for this type of resource. When you upload your data to the OEP, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data is stored in a relational database.",
"example": "PostgreSQL",
"type": [
"string",
"null"
Expand All @@ -66,7 +43,7 @@
}
},
"schema": {
"description": "Object containing fields, primary key and for foreign keys. Describes the structure of the present data.",
"description": "Object containing fields, primary key and for foreign keys. Describes the structure of the data.",
"type": "object",
"properties": {
"fields": {
Expand Down
2 changes: 1 addition & 1 deletion metadata/v200_draft/metadata_key_description.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ The JSON format offers different formats:
| 15.1 | type | A string that indicates that the resource is tabular as per Tabular Data definition. Use "table" for all tables. | table |
| 15.2 | name | A name for the entire data package. The name must consist of only lowercase alphanumeric characters or underscore. It must not start with a number or underscore. In a database, this will be the name of the table within the schema containing it. The name can correspond to the file name (minus the file-extension) of the data file describing the resource, if it complies with the naming convention above. Name also contains information about the shema on the OEP, use "." to seperate shema from table name. | openstreetmap.osm_deu_line |
| 15.3 | path | A URL that should be a permanent http(s) address or other path directly linking to the resource. | https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_line |
| 15.4 | format | The file extension. 'csv', 'xls', 'json' etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a database. | PostgreSQL |
| 15.4 | format | A file extension format. Possible options are 'csv', 'xls', 'json' and other standard file extension for this type of resource. When you upload your data to the OEP, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data is stored in a relational database. | PostgreSQL |
| 15.5 | encoding | Specifies the character encoding of the resource's data file. The values should be one of the ["Preferred MIME Names"](https://www.iana.org/assignments/character-sets/character-sets.xhtml) for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. | UTF-8 |

#### Resource Keys - Schema
Expand Down

0 comments on commit 6674cc6

Please sign in to comment.