Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production back to develop #201

Merged
merged 22 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: gh-pages
on:
push:
branches:
- feature-120-repo
- production
permissions:
contents: write
jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/metadata-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ name: Automated tests

on:
push:
branches: [ develop, master]
branches: [ develop, production]
pull_request:
branches: [ develop, master ]
branches: [ develop, production ]

jobs:
test:
Expand Down
28 changes: 4 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,11 @@
# Changelog

All notable changes to this project will be documented in this file.
All notable changes to this project will be documented in this file. <br>
For each version, important additions, changes and removals are listed here.

The format is inspired from [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and the versioning aim to respect [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Here is a template for new release sections

```
## Current

### Added
-
### Changed
-
### Removed
-

## [0.0.0] - Release - Name of Release - 20YY-MM-DD

### Added
-
### Changed
-
### Removed
-
```

## [2.0.0] - Major Release - Refactor OEMetadata for NFDI

Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ authors:
title: "Open Energy Family - Open Energy Metadata (OEMetadata)"
type: software
license: MIT
version: 1.5.2
version: 2.0.0
doi:
date-released: 2022-11-18
date-released: 2024-10-31
url: "https://github.com/OpenEnergyPlatform/oemetadata"
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Open Energy Metadata (OEMetadata)
=================================

**An energy metadata standard including a metadata schema, templates, and examples.**
**The energy metadata standard including a metadata schema, templates, and examples.**

.. list-table::
:widths: auto
Expand Down Expand Up @@ -69,7 +69,7 @@ License and Citation
:target: LICENSE.txt
:alt: License

.. |badge_documentation| image:: https://img.shields.io/github/actions/workflow/status/OpenEnergyPlatform/oemetadata/gh-pages.yml?branch=feature-120-repo
.. |badge_documentation| image:: https://img.shields.io/github/actions/workflow/status/OpenEnergyPlatform/oemetadata/gh-pages.yml?branch=release-v2.0.0
:target: https://openenergyplatform.github.io/oemetadata/
:alt: Documentation

Expand Down
6 changes: 4 additions & 2 deletions RELEASE_PROCEDURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ For a **Patch Release** (Hotfix), start at [section 3](https://github.com/OpenEn
* `📝setup.py`
* Update `version`
* Update `download_url` (.../v0.1.0.tar.gz)
* `📝metadata/latest`
* Update the folder `metadata/latest`

▶️ Increase version numbers!

Expand Down Expand Up @@ -171,7 +173,7 @@ If you messed up, remove tags and start again
### 🐙 GitHub workflows for automated release

* The automation workflow will build and upload the PyPi Package.
* Note: Each package version (as specified in the [setup.py](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/setup.py#L13)) can only be released once.
* Note: Each package version (as specified in the [setup.py](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/setup.py#L13)) can only be released once.

* [Test Workflows](https://github.com/OpenEnergyPlatform/oemetadata/actions/workflows/test-pypi-publish.yml): Update the PyPi Test Package [oemetadata pypi test](https://test.pypi.org/project/oemetadata/)
* Note: The Test Workflows are triggered when pushing to the branch `deployment-test`.
Expand All @@ -181,4 +183,4 @@ If you messed up, remove tags and start again


## Sources:
* https://raw.githubusercontent.com/folio-org/stripes/master/doc/release-procedure.md
* https://raw.githubusercontent.com/folio-org/stripes/production/doc/release-procedure.md
2 changes: 1 addition & 1 deletion docs/development/collaboration/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
This software is licensed under an open-source license and can be downloaded,
executed and modified. <br>
To contribute to the collaborative development follow the workflow described in
[CONTRIBUTING.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/CONTRIBUTING.md).
[CONTRIBUTING.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CONTRIBUTING.md).

4 changes: 2 additions & 2 deletions docs/metadata/metadata_key_description.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# OEMetadata - Key Description

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


## JSON Format
Expand Down Expand Up @@ -46,7 +46,7 @@ If a value is not yet available, use: 'ToDo'.
| # | Key | Description | Example | Badge |
|---|----------|----------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|----------|
| 1 | @id | A Uniform Resource Identifier (URI) that links the resource via the OpenEnergyDatabus (DBpedia Databus). | https://databus.openenergyplatform.org/oeplatform/supply/wri_global_power_plant_database/2022-11-07 | Platinum |
| 2 | @context | Explanation of metadata keys in ontology terms. | https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/metadata/latest/context.json | Platinum |
| 2 | @context | Explanation of metadata keys in ontology terms. | https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/production/metadata/latest/context.json | Platinum |

### Resource - General Keys
| # | Key | Description | Example | Badge |
Expand Down
20 changes: 11 additions & 9 deletions metadata/latest/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<a href="https://github.com/OpenEnergyPlatform/oemetadata/"><img align="right" width="100" height="100" src="https://raw.githubusercontent.com/OpenEnergyPlatform/organisation/master/logo/OpenEnergyFamily_Logo_OEMetadata.png" alt="OpenEnergyMetadata"></a>
<a href="https://github.com/OpenEnergyPlatform/oemetadata/"><img align="right" width="100" height="100" src="https://raw.githubusercontent.com/OpenEnergyPlatform/organisation/production/logo/OpenEnergyFamily_Logo_OEMetadata.png" alt="OpenEnergyMetadata"></a>
<a href="https://openenergy-platform.org/"><img align="right" width="100" height="100" src="https://avatars2.githubusercontent.com/u/37101913?s=400&u=9b593cfdb6048a05ea6e72d333169a65e7c922be&v=4" alt="OpenEnergyPlatform"></a>


# Open Energy Metadata (OEM) - Latest-Release
# Open Energy Metadata (OEMetadata) - Latest-Release

This version of the OEM represents the latest released version. This release is fully integrated
into the OEP.
This version of the OEMetadata represents the latest released version.
This release is fully integrated into the OEP.

The OEM contains the following files:
The OEMetadata contains the following files:

* [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/metadata/latest/template.json) contains an empty metadata string with all fields.
* [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/metadata/latest/metadata_key_description.md) contains a full description of each metadata key and an example.
* [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/metadata/latest/example.json) contains a basic metadata example.
* [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/template.json) contains an empty metadata string with all fields.
* [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/example.json) contains a basic metadata example.
* [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/metadata_key_description.md) contains a full description of each metadata key and an example.
* [context.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/context.json) contains the references of metadata keys in ontology terms.
* [schema.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/schema.json) contains the json schema for the metadata.

For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/CHANGELOG.md).
For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CHANGELOG.md).
39 changes: 39 additions & 0 deletions metadata/latest/build_source/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Oemetadata build tooling

The OEMetaData uses the json schema specification to define the structure of the metadata. This specification is quite extensive and includes a lot of fields its development had to be supported by a simple tooling. It offers developers the possibility to edit the schema.json and its field groups in a more modular manner. This helps to keep an overview and to focus discussions on certain aspects of the OEMetData specification.

Over the years it also became an constant issue to keep all parts of the release consistent with all changes made to the schema.json. The tooling enables developers to only edit the schema.json and then generate the relevant example and template JSON files based on the OEMetaData specification and the example values available as part of the schema.json.

## Structure

The structure of the OEMetaData release contents changed a bit. While the known schema, example and template json and python files are still available the new directory 'build_source' is now also part of each release. It contains two sub directories: `build_source/schemas/` includes the schema parts, if you want to extend the OEMetaData specification this is the directory you should maintain. The `build_source/scripts/` implements the tooling. There are 3 scripts for schema ref resolve and schema, example and template JSON file generation. The settings script is used to share common information across python modules, in this case it includes mainly the path´s.

## Usage

Using bash terminal on wsl ubuntu distribution with Python >3.8 installed

Create a python3 environment.

#assuming you are currently in the oemetadata base directory.
python3 -m venv env

Install the requirements.

source env/bin/activate
pip install -r requirements.txt

Navigate to the tooling directory to ease usage and run the tooling as python script.

#assuming you are currently in the oemetadata base directory.
cd metadata/v20/build_source/scripts/
# generate the oemetadata json schema based on json schemas in the schemas directory
python metadata/v20/build_source/scripts/resolve_schema_refs.py
# use option --debug to show additional logging information
python metadata/v20/build_source/scripts/resolve_schema_refs.py --debug

Generate the example and template

python metadata/v20/build_source/scripts/generate_example_from_schema.py
python metadata/v20/build_source/scripts/generate_template_from_schema.py


42 changes: 0 additions & 42 deletions metadata/latest/build_source/main_schema.json

This file was deleted.

58 changes: 58 additions & 0 deletions metadata/latest/build_source/schema_structure.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/develop/metadata/v20/schema.json",
"description": "Open Energy Platform (OEP) metadata schema latest",
"type": "object",
"required": [
"resources"
],
"properties": {
"collection": {
"$ref": "collection.json#"
},
"resources": {
"description": "A collection of related data resource descriptions and metadata. This may include relational data models which are technically related",
"type": "array",
"items": {
"type": "object",
"properties": {
"linkedData": {
"$ref": "linked_data.json#"
},
"general": {
"$ref": "general.json#"
},
"context": {
"$ref": "context.json#"
},
"spatial": {
"$ref": "spatial.json#"
},
"temporal": {
"$ref": "temporal.json#"
},
"sources": {
"$ref": "sources.json#"
},
"licenses": {
"$ref": "licenses.json#"
},
"provenance": {
"$ref": "provenance.json#"
},
"resource": {
"$ref": "fields.json#"
},
"review": {
"$ref": "review.json#"
}
}
},
"title": "Resources"
},
"meta": {
"$ref": "meta.json#"
}
},
"additionalProperties": true
}
50 changes: 50 additions & 0 deletions metadata/latest/build_source/schemas/collection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "general.json#metadata/v20/schemas/collection.json",
"type": "object",
"properties": {
"name": {
"description": "A filename or database conform collection name.",
"example": "oep_oemetadata",
"type": [
"string",
"null"
],
"badge": "Iron",
"title": "Collection Name"
},
"title": {
"description": "A human readable collection name.",
"example": "OEP OEMetadata",
"type": [
"string",
"null"
],
"badge": "Bronze",
"title": "Collection Title"
},
"description": {
"description": "A free text description of the collection.",
"example": "A collection of tables for the OEMetadata examples.",
"type": [
"string",
"null"
],
"badge": "Bronze",
"title": "Collection Description"
},
"id": {
"description": "A unique identifier (UUID/DOI) for the collection.",
"example": "https://databus.openenergyplatform.org/oeplatform/reference",
"type": [
"string",
"null"
],
"badge": "Silver",
"title": "Collection Identifier",
"format": "uri",
"readonly": true
}
},
"required": ["name"]
}
Loading
Loading