Skip to content

Commit

Permalink
Merge pull request #64 from OpenEnergyPlatform/develop
Browse files Browse the repository at this point in the history
Update master with latest release v1.5.0
  • Loading branch information
jh-RLI authored Nov 18, 2021
2 parents 20aacec + e860f18 commit b5e8850
Show file tree
Hide file tree
Showing 36 changed files with 1,476 additions and 761 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/metadata-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# https://github.com/actions/runner
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/introduction-to-github-actions#understanding-the-workflow-file
# https://docs.github.com/pt/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
# https://github.com/actions/virtual-environments#available-environments
# ubuntu-latest, ubuntu-18.04, or ubuntu-16.04
# windows-latest or windows-2019
# macos-latest or macos-10.15
name: Automated tests

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

jobs:
test:
runs-on: ubuntu-latest
env:
TOXENV: py3
name: metadata-tests
strategy:
matrix:
python-version:
- 3.6
- 3.7
steps:
- name: Check out source repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test metadata
run: tox -v
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,22 @@ Here is a template for new release sections

### Changed

## [1.5.0] - Release

### Added
- Add keys for linked data compatibility: ``@context``, ``@id``, ``subject``, ``is_about``, ``value_reference``
- Add context.json file

### Changed
- Delete future directory
- Clarify instructions for dealing with non-applicable keys (null) and missing values ("todo")
- Make key 13.2 ``timeseries`` a list
- Relocate development information from README.md to CONTRIBUTING.md
- Add licence information to README.md
- Update all .json files to v1.5.0
- reintroduce automated tests (CI) by switching form travis-ci to github actions [PR#63]
- Updated schema.json for v1.5.0 now includes the new key "title" which describes the title of the curent field [PR#56] adapted from [PR#43]

## [1.4.1] - Minor release 2021-01-14

### Added
Expand Down
41 changes: 38 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,43 @@ it through first).

#### Step 3: Run tests locally

To run tests locally, install the dependencies
To run tests locally,

1. create virtualenv in root folder of repo

```bash
python -m venv venv
```

2. Activate virtualenv

Linux:

```bash
. venv/bin/activate
```

Windows:

```bash
. venv/Scripts/activate
```

3. Install requirements

```bash
pip install -r requirements.txt
```

1. Integration/unit tests
4. Integration/unit tests
```bash
pytest
```
And for a complete run in different environments:
```bash
tox -v
```
2. Linting tests
5. Linting tests
```bash
flake8
```
Expand Down Expand Up @@ -98,3 +121,15 @@ In the `.travis.yml` file are many options commented out, you can have
very complexe schemes to test on many different python versions etc. For
more information look at Travis
[doc](https://docs.travis-ci.com/user/languages/python/) for python.

### If a Python interpreter version is missing:

Linux (Ubuntu):

```
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
# Install only missing interpreters:
sudo apt-get install python3.6
sudo apt-get install python3.7
```
88 changes: 25 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,93 +1,55 @@
<a href="http://oep.iks.cs.ovgu.de/"><img align="right" width="200" height="200" src="https://avatars2.githubusercontent.com/u/37101913?s=400&u=9b593cfdb6048a05ea6e72d333169a65e7c922be&v=4" alt="OpenEnergyPlatform"></a>
[![Build Status](https://travis-ci.org/OpenEnergyPlatform/oemetadata.svg?branch=develop)](https://travis-ci.org/OpenEnergyPlatform/oemetadata)

# Open Energy Family - Metadata
<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://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>

OEF metadata schemata, examples and templates package
# Open Energy Family - Open Energy Metadata (OEM)

Open Energy Metadata (OEM) is an energy metadata standard including a template, examples and a metadata schema.
It is an extensive set of metadata based on the tabular data package specifications and the FAIR principles.
The metadata contains multiple fields (keys) in a nested JSON structure.

You can find the latest version right here:
* [template.json](./metadata/latest/template.json) contains an empty metadata string
* [metadata_key_description.md](./metadata/latest/metadata_key_description.md) contains a description of each metadata key
* [example.json](./metadata/latest/example.json) contains a basic metadata example

[![Build Status](https://travis-ci.org/OpenEnergyPlatform/oemetadata.svg?branch=develop)](https://travis-ci.org/OpenEnergyPlatform/oemetadata)

## License / Copyright

This repository is licensed under [MIT License (MIT)](https://spdx.org/licenses/MIT.html)
This repository is licensed under [MIT License (MIT)](https://spdx.org/licenses/MIT.html) <br>
The oemetadata is licensed under [Creative Commons Zero v1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/) <br>
The oemetadata example and oemetadata template are licensed under [Creative Commons Zero v1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/)

## Installation

`pip install oep-oemetadata`
`pip install oep-metadata`

## Usage Examples

```
from oemetadata.v140.example import OEMETADATA_V140_EXAMPLE
print(OEMETADATA_V140_EXAMPLE)
```
from metadata.v150.example import OEMETADATA_v150_EXAMPLE
print(OEMETADATA_v150_EXAMPLE)
```
from oemetadata.v140.schema import OEMETADATA_V140_SCHEMA

print(OEMETADATA_V140_SCHEMA)
```
from metadata.v150.schema import OEMETADATA_v150_SCHEMA
print(OEMETADATA_v150_SCHEMA)
```
from oemetadata.v140.template import OEMETADATA_V140_TEMPLATE

print(OEMETADATA_V140_TEMPLATE)
```
from metadata.v150.template import OEMETADATA_v150_TEMPLATE
## Open Energy Metadata description

The OEMeta data contains multiple fields/keys in a nested JSON data structure. We [describe](https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/metadata/latest/metadata_key_description.md)
each field/key and update the description for each release if necessary!

## Development

### Example for activating virtualenv and install development dependencies:

1. Create virtualenv in root folder of repo

`python -m venv venv`

2. Activate virtualenv

Linux:

`. venv/bin/activate`

Windows:

`. venv/Scripts/activate`

3. Install requirements

`pip install -r requirements.txt`

### Run tests locally (after above steps):

Short:

`pytest`

Complete:

`tox -v`

### If a Python interpreter version is missing:

Linux (Ubuntu):

```
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
# Install only missing interpreters:
sudo apt-get install python3.6
sudo apt-get install python3.7
print(OEMETADATA_v150_TEMPLATE)
```

### Contributing
## Contributing

For further contributing infos and conventions see: [CONTRIBUTING.md](./CONTRIBUTING.md)

### Make PyPI release:
## Make PyPI release:

First bump version in setup.py, then:

Expand Down
9 changes: 0 additions & 9 deletions metadata/future/README.md

This file was deleted.

Loading

0 comments on commit b5e8850

Please sign in to comment.