Skip to content

Commit

Permalink
Merge pull request #102 from OpenEnergyPlatform/release/v152
Browse files Browse the repository at this point in the history
release v 1.5.2
  • Loading branch information
jh-RLI authored Nov 18, 2022
2 parents 2ac7599 + 3690788 commit c1ed1e2
Show file tree
Hide file tree
Showing 30 changed files with 2,075 additions and 43 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build 📦 and release on pypi

on:
release:
types: [published]

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
environment: pypi-publish
steps:
- uses: actions/checkout@master
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI }}
38 changes: 38 additions & 0 deletions .github/workflows/test-pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and release on pypi tests

on:
push:
branches:
- deployment-test
- 'release/*'

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to TestPyPI
runs-on: ubuntu-latest
environment: pypi-publish
steps:
- uses: actions/checkout@master
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TEST }}
repository_url: https://test.pypi.org/legacy/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ celerybeat-schedule
.env
.venv
env/
/env
/envs
venv/
ENV/
env.bak/
Expand Down
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,25 @@ Here is a template for new release sections
### Removed
-
```

## Current

### Added

-
### Changed
-
### Removed
-

## [1.5.2] - Release - Fix missing json files in pypi package, Improve context.jsonld - 2022-11-18

- Fix missing json files in pypi oemetadata package
- Add github actions/workflwos to automate package build and upload process on test and production pypi index

### Added

### Changed
- Update context.json in latest & v151 to ensure ontologically annotated metadata can be sparqled #99

## [1.5.1] - Release - Ontology-Ready - 2022-02-21

Expand Down
13 changes: 12 additions & 1 deletion RELEASE_PROCEDURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,15 @@ test directory.
- 4 Create the Pull Request via the GitHub website and merge changes to
develop then merge develop in master branch.
- 5 Create a new release via the GitHub website and tag the master branch.
- 6 Update the PyPi (pip) Package [oep-metadata](https://pypi.org/project/oep-metadata/)

# Publish and Deploy Release automation
We provide automation workflows that will build and upload PyPi Packages.

Keep in mind that specific package versions (as specified in the [setup.py](https://github.com/OpenEnergyPlatform/oemetadata/blob/5fc02df0a5efeb01cc8d9b78929c3dfe9eebd8cb/setup.py#L13)) can only be release once. This stands for test and official PyPi package index.

**Test workflows** are triggered when pushing commits to the permanent branch called `deployment-test`.

**Release Deployment Workflow** is triggered as soon as one publishes a new github release.

- [Test Workflow](https://github.com/OpenEnergyPlatform/oemetadata/actions/workflows/test-pypi-publish.yml): Update test PyPi (pip) Package [oemetadata pypi test](https://test.pypi.org/project/oemetadata/)
- [Release Deployment Workflow](https://github.com/OpenEnergyPlatform/oemetadata/actions/workflows/pypi-publish.yml) Update the PyPi (pip) Package [oemetadata](https://pypi.org/project/oemetadata/)
43 changes: 35 additions & 8 deletions metadata/latest/context.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"xsd": "http://www.w3.org/2001/XMLSchema#",
"oeo": "http://openenergy-platform.org/ontology/oeo/",
"csvw": "http://www.w3.org/ns/csvw#",
"obo": "http://purl.obolibrary.org/obo/",
"obo":"http://purl.obolibrary.org/obo/",
"time":"http://www.w3.org/2006/time#",
"dbo": "http://dbpedia.org/ontology/",
"saref": "https://saref.etsi.org/core/",
"title": {
"@id": "dct:title",
"@type": "xsd:string"
Expand All @@ -20,6 +23,30 @@
"@id": "rdfs:comment",
"@type": "xsd:string"
},
"subject": {
"@id": "dc:subject",
"@type": "@id"
},
"keywords": {
"@id": "dc:subject",
"@type": "xsd:string"
},
"temporal": {
"@id": "time:hasTemporalDuration",
"@type": "@id"
},
"timeseries": {
"@id": "time:hasDateTimeDescription",
"@type": "@id"
},
"start": {
"@id": "dbo:startDateTime",
"@type": "xsd:dateTime"
},
"end": {
"@id": "dbo:endDateTime",
"@type": "xsd:dateTime"
},
"fields": {
"@id": "csvw:column",
"@type": "@id"
Expand All @@ -32,10 +59,6 @@
"@id": "csvw:tableSchema",
"@type": "@id"
},
"subject": {
"@id": "dc:subject",
"@type": "@id"
},
"name": {
"@id": "rdfs:label",
"@type": "xsd:string"
Expand All @@ -48,9 +71,13 @@
"@id": "oeo:OEO_00040010",
"@type": "xsd:string"
},
"about": {
"@id": "obo:IAO_0000136",
"isAbout": {
"@id": "saref:isAbout",
"@type": "@id"
},
"valueReference": {
"@id": "http://purl.org/goodrelations/v1#valueReference",
"@type": "@id"
}
}
}
}
19 changes: 13 additions & 6 deletions metadata/latest/example.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "oep_metadata_table_example_v151",
"title": "Example title for metadata example - Version 1.5.1",
"id": "http://openenergyplatform.org/dataedit/view/model_draft/oep_metadata_table_example_v151",
"name": "oep_metadata_table_example_v152",
"title": "Example title for metadata example - Version 1.5.2",
"id": "http://openenergyplatform.org/dataedit/view/model_draft/oep_metadata_table_example_v152",
"description": "This is an metadata example for example data. There is a corresponding table on the OEP for each metadata version.",
"language": [
"en-GB",
Expand Down Expand Up @@ -218,13 +218,20 @@
"date": "2022-02-15",
"object": "metadata",
"comment": "Release metadata version OEP-1.5.1"
},
{
"title": "jh-RLI",
"email": null,
"date": "2022-11-18",
"object": "metadata",
"comment": "Release metadata version OEP-1.5.2"
}
],
"resources": [
{
"profile": "tabular-data-resource",
"name": "model_draft.oep_metadata_table_example_v151",
"path": "http://openenergyplatform.org/dataedit/view/model_draft/oep_metadata_table_example_v151",
"name": "model_draft.oep_metadata_table_example_v152",
"path": "http://openenergyplatform.org/dataedit/view/model_draft/oep_metadata_table_example_v152",
"format": "PostgreSQL",
"encoding": "UTF-8",
"schema": {
Expand Down Expand Up @@ -379,7 +386,7 @@
"badge": "Platinum"
},
"metaMetadata": {
"metadataVersion": "OEP-1.5.1",
"metadataVersion": "OEP-1.5.2",
"metadataLicense": {
"name": "CC0-1.0",
"title": "Creative Commons Zero v1.0 Universal",
Expand Down
4 changes: 2 additions & 2 deletions metadata/latest/metadata_key_description.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OEMetadata - Key Description

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


Expand Down Expand Up @@ -162,7 +162,7 @@ The JSON format offers different formats:
|#|Key |Description |Example |
|---|---|---|---|
| 19 | **metaMetadata** | An object that describes the metadata themselves, their format, version and license. These fields should already be provided when you are filling out your metadata. | |
| 19.1 | metadataVersion | The type and version number of the metadata. | OEP-1.5.1 |
| 19.1 | metadataVersion | The type and version number of the metadata. | OEP-1.5.2 |
| 19.2 | **metadataLicense** | The license of the provided metadata. | |
| 19.2.1 | name | The [SPDX](https://spdx.org/licenses/) identifier. | CC0-1.0 |
| 19.2.2 | title | The official (human readable) title of the license. | Creative Commons Zero v1.0 Universal |
Expand Down
9 changes: 4 additions & 5 deletions metadata/latest/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -614,9 +614,9 @@
}
},
"additionalProperties": false,
"title": "IsAbout"
"title": "isAbout"
},
"title": "IsAbout"
"title": "isAbout"
},
"valueReference": {
"description": "Ontology URI for an extended description of the values in the column",
Expand All @@ -638,8 +638,7 @@
"string",
"null"
],
"title": "Name",
"format": "uri"
"title": "Name"
},
"path": {
"description": "Path to the OEO",
Expand All @@ -652,7 +651,7 @@
}
},
"additionalProperties": false,
"title": "Value reference"
"title": "valueReference"
},
"title": "valueReference"
},
Expand Down
2 changes: 1 addition & 1 deletion metadata/latest/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
"badge": null
},
"metaMetadata": {
"metadataVersion": "OEP-1.5.0",
"metadataVersion": "OEP-1.5.2",
"metadataLicense": {
"name": "CC0-1.0",
"title": "Creative Commons Zero v1.0 Universal",
Expand Down
43 changes: 35 additions & 8 deletions metadata/v151/context.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"xsd": "http://www.w3.org/2001/XMLSchema#",
"oeo": "http://openenergy-platform.org/ontology/oeo/",
"csvw": "http://www.w3.org/ns/csvw#",
"obo": "http://purl.obolibrary.org/obo/",
"obo":"http://purl.obolibrary.org/obo/",
"time":"http://www.w3.org/2006/time#",
"dbo": "http://dbpedia.org/ontology/",
"saref": "https://saref.etsi.org/core/",
"title": {
"@id": "dct:title",
"@type": "xsd:string"
Expand All @@ -20,6 +23,30 @@
"@id": "rdfs:comment",
"@type": "xsd:string"
},
"subject": {
"@id": "dc:subject",
"@type": "@id"
},
"keywords": {
"@id": "dc:subject",
"@type": "xsd:string"
},
"temporal": {
"@id": "time:hasTemporalDuration",
"@type": "@id"
},
"timeseries": {
"@id": "time:hasDateTimeDescription",
"@type": "@id"
},
"start": {
"@id": "dbo:startDateTime",
"@type": "xsd:dateTime"
},
"end": {
"@id": "dbo:endDateTime",
"@type": "xsd:dateTime"
},
"fields": {
"@id": "csvw:column",
"@type": "@id"
Expand All @@ -32,10 +59,6 @@
"@id": "csvw:tableSchema",
"@type": "@id"
},
"subject": {
"@id": "dc:subject",
"@type": "@id"
},
"name": {
"@id": "rdfs:label",
"@type": "xsd:string"
Expand All @@ -48,9 +71,13 @@
"@id": "oeo:OEO_00040010",
"@type": "xsd:string"
},
"about": {
"@id": "obo:IAO_0000136",
"isAbout": {
"@id": "saref:isAbout",
"@type": "@id"
},
"valueReference": {
"@id": "http://purl.org/goodrelations/v1#valueReference",
"@type": "@id"
}
}
}
}
Loading

0 comments on commit c1ed1e2

Please sign in to comment.