Skip to content

Commit

Permalink
Merge pull request #256 from OpenEnergyPlatform/feature-145-git
Browse files Browse the repository at this point in the history
Include GitHub Features, update procedures and rename tests
  • Loading branch information
Ludee authored Feb 6, 2025
2 parents 1dd9f56 + 60f673d commit b8bbb14
Show file tree
Hide file tree
Showing 155 changed files with 1,386 additions and 585 deletions.
34 changes: 34 additions & 0 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# SPDX-FileCopyrightText: : 2024 Ludwig Hülk <https://github.com/Ludee> © Reiner Lemoine Institut
# SPDX-FileCopyrightText: super-repo v0.5.0 <https://github.com/rl-institut/super-repo>
# SPDX-License-Identifier: MIT

[tool.bumpversion]
current_version = "2.0.2"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "{current_version}"
replace = "{new_version}"
regex = false
ignore_missing_version = false
ignore_missing_files = false
tag = false
sign_tags = false
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
allow_dirty = false
commit = true
message = "Bump version: {current_version} → {new_version}"
commit_args = ""

[tool.bumpversion.parts.pre_l]
values = ["dev", "rc", "final"]
optional_value = "final"

[[tool.bumpversion.files]]
filename = "pyproject.toml"

[[tool.bumpversion.files]]
filename = "CITATION.cff"

[[tool.bumpversion.files]]
filename = "uv.lock"
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/issue_template_bug.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug Issue
about: For bugs and errors
about: For bugs and errors
title: Your title should make sense if said after "The issue is <your issue title>"
labels: ["status: active :construction:", "type: bug :bug:"]
assignees: ""
Expand All @@ -9,7 +9,7 @@ assignees: ""
## Description of the issue

Describe the problem in as much detail as possible.
Focus on the expected and current behavior.
Focus on the expected and current behavior.
If necessary, create a screenshot and insert below.

## Steps to Reproduce
Expand All @@ -24,10 +24,10 @@ Describe possible ideas for solution and evaluate advantages and disadvantages.

## Context and Environment

- Version used:
- Operating system:
- Environment setup and (python) version:
- Version used:
- Operating system:
- Environment setup and (python) version:

## Workflow checklist

- [ ] I am aware of the workflow in [CONTRIBUTING.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/CONTRIBUTING.md)
- [ ] I am aware of the workflow in [CONTRIBUTING.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CONTRIBUTING.md)
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/issue_template_enhance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Enhance Issue
about: For enhancements or improvements
title: Your title should make sense if said after "The issue is <your issue title>"
labels: ["status: active :construction:", "type: enhancement :gear:"]
assignees: ""
---

## Description of the issue

Describe the problem in as much detail as possible.

## Ideas of solution

Describe possible ideas for solution and evaluate advantages and disadvantages.

## Workflow checklist

- [ ] I am aware of the workflow in [CONTRIBUTING.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CONTRIBUTING.md)
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/issue_template_feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ name: Feature Issue
about: For new ideas, developments and features
title: Your title should make sense if said after "The issue is <your issue title>"
labels: ["status: active :construction:", "type: feature :hammer_and_wrench:"]
assignees: ''
assignees: ""
---

## Description of the issue

Describe the problem in as much detail as possible.
Describe the problem in as much detail as possible.

## Ideas of solution

Describe possible ideas for solution and evaluate advantages and disadvantages.

## Workflow checklist

- [ ] I am aware of the workflow in [CONTRIBUTING.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/CONTRIBUTING.md)
- [ ] I am aware of the workflow in [CONTRIBUTING.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CONTRIBUTING.md)
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/issue_template_release.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ assignees: 'Ludee'

## Description of the release

Describe the release in as much detail as possible.
Describe the release in as much detail as possible.

## Details of the release

**Name:** Find an appropriate and memorable name for the release that will help it be remembered.
**Git tag:** v2.1.0 "OEMetadata Minor Release v2.1.0"
**Release Manager:** Choose a responsible person.
**Release Manager:** Choose a responsible person
**Date:** Arrange a convenient date

## Workflow checklist

- [ ] I am aware of the workflow in [RELEASE_PROCEDURE.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/RELEASE_PROCEDURE.md)
- [ ] 4. 🐙 Create a `Draft GitHub Release`
- [ ] 5. 💠 Create a `release` branch
- [ ] 6. 📝 Update the version files (CHANGELOG.md, CITATION.cff)
- [ ] 6. 📝 Update the version files (bump version number)
- [ ] 7. 🐙 Create a Release Pull Request
- [ ] 8. 💠 Set the `Git Tag`
- [ ] 9. 🐙 Publish `GitHub Release`
- [ ] 10. 💻 Update the documentation
- [ ] 10. 💻 Update the documentation with mike
- [ ] 11. 🐙 Set up new development
13 changes: 8 additions & 5 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,31 @@ Describe the findings of the discussion in the issue or meeting.
## Type of change (CHANGELOG.md)

### Added

- Add a new class [(#)](https://github.com/OpenEnergyPlatform/oemetadata/pull/)

### Changed

- Update a definition [(#)](https://github.com/OpenEnergyPlatform/oemetadata/pull/)

### Removed
- Remove a broken link [(#)](https://github.com/OpenEnergyPlatform/oemetadata/pull/)

- Remove a broken link [(#)](https://github.com/OpenEnergyPlatform/oemetadata/pull/)

## Workflow checklist

### Automation
Part of # / Closes #

Closes # / Part of #

### PR-Assignee

- [ ] 🐙 Follow the workflow in [CONTRIBUTING.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/CONTRIBUTING.md)
- [ ] 📝 Update the [CHANGELOG.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/CHANGELOG.md)
- [ ] 🐙 Follow the workflow in [CONTRIBUTING.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CONTRIBUTING.md)
- [ ] 📝 Update the [CHANGELOG.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CHANGELOG.md)
- [ ] 📙 Update the documentation
- [ ] 🐙 Assign a reviewer to the PR

### Reviewer

- [ ] 🐙 Follow the [Reviewer Guidelines](https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/CONTRIBUTING.md#40-let-someone-else-review-your-pr)
- [ ] 🐙 Follow the [Reviewer Guidelines](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/CONTRIBUTING.md#40--let-someone-else-review-your-pr)
- [ ] 🐙 Provided feedback and show sufficient appreciation for the work done
35 changes: 35 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# SPDX-FileCopyrightText: 2024 Ludwig Hülk <https://github.com/Ludee> © Reiner Lemoine Institut
# SPDX-FileCopyrightText: super-repo v0.5.0 <https://github.com/rl-institut/super-repo>
# SPDX-License-Identifier: MIT

name: 🐍 Coverage tests with codecov

on:
push:
branches:
- production
- develop

jobs:
test:
name: Run coverage test and create codecov
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4

- name: Install dependencies
run: pip install pytest pytest-cov

- name: Run coverage test
run: pytest --cov --cov-report=xml

- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut
# SPDX-FileCopyrightText: 2024 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut
# SPDX-FileCopyrightText: oemetadata <https://github.com/OpenEnergyPlatform/oemetadata/>
# SPDX-License-Identifier: MIT

name: Documentation (develop branch)
name: 📝 Documentation (develop branch)
on:
push:
branches:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut
# SPDX-FileCopyrightText: 2024 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut
# SPDX-FileCopyrightText: oemetadata <https://github.com/OpenEnergyPlatform/oemetadata/>
# SPDX-License-Identifier: MIT

name: Build and publish on PyPI
name: 📦 Build and publish on PyPI

on:
release:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/publish_testpypi.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut
# SPDX-FileCopyrightText: 2024 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut
# SPDX-FileCopyrightText: oemetadata <https://github.com/OpenEnergyPlatform/oemetadata/>
# SPDX-License-Identifier: MIT

name: Build and publish on Test PyPI
name: 📦 Build and publish on Test PyPI

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

jobs:
build-n-publish:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut
# SPDX-FileCopyrightText: oemetadata <https://github.com/OpenEnergyPlatform/oemetadata/>
# SPDX-License-Identifier: MIT

name: REUSE Compliance Check
name: 📝 REUSE Compliance Check

on: [push, pull_request]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut
# SPDX-FileCopyrightText: 2024 Jonas Huber <@jh-RLI> © Reiner Lemoine Institut
# SPDX-FileCopyrightText: oemetadata <https://github.com/OpenEnergyPlatform/oemetadata/>
# SPDX-License-Identifier: MIT

# https://github.com/actions/runner
Expand All @@ -9,7 +10,8 @@
# ubuntu-latest, ubuntu-18.04, or ubuntu-16.04
# windows-latest or windows-2019
# macos-latest or macos-10.15
name: Automated tests

name: 🐍 Automated test

on:
push:
Expand All @@ -22,7 +24,7 @@ jobs:
runs-on: ubuntu-20.04
env:
TOXENV: py3
name: metadata-tests
name: metadata-test
strategy:
matrix:
python-version:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-FileCopyrightText: 2019 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut
#
# SPDX-FileCopyrightText: oemetadata <https://github.com/OpenEnergyPlatform/oemetadata/>
# SPDX-License-Identifier: CC0-1.0

# IDEs
Expand Down
58 changes: 58 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# SPDX-FileCopyrightText: 2024 Ludwig Hülk <https://github.com/Ludee> © Reiner Lemoine Institut
# SPDX-FileCopyrightText: super-repo v0.5.0 <https://github.com/rl-institut/super-repo>
# SPDX-License-Identifier: MIT

# exclude webdevelopement build artefacts
exclude: ^.*(.min.js|.min.css)$

repos:
# Pre-commit-hooks - Out-of-the-box hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
- id: check-json
- id: check-toml
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: pretty-format-json
args:
[
"--autofix", # Autofix JSONs
"--no-ensure-ascii", # Preserve unicode characters
"--no-sort-keys" # Retain the original key ordering
]
- id: check-added-large-files
args: [ "--maxkb=1500" ]
# - id: check-docstring-first
- id: detect-private-key

- repo: https://github.com/google/pre-commit-tool-hooks
rev: v1.2.5
hooks:
# - id: check-google-doc-style
- id: check-links

# Ruff - Fast Python linter, written in Rust
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.8.1'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
- id: ruff-format

# mypy mirror - Added static types to Python (Python is dynamically typed)
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.13.0'
hooks:
- id: mypy
additional_dependencies:
- 'sqlalchemy'
- 'types-requests'

# REUSE Software - Make licensing easy for humans and machines alike
- repo: https://github.com/fsfe/reuse-tool
rev: v5.0.2
hooks:
- id: reuse
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit b8bbb14

Please sign in to comment.