Skip to content

Commit

Permalink
Merge pull request #73 from rl-institut/deployment-test
Browse files Browse the repository at this point in the history
Add workflow to publish on Test PyPI
  • Loading branch information
Ludee authored Dec 9, 2024
2 parents bfab737 + 6ce4800 commit 720cfd8
Show file tree
Hide file tree
Showing 33 changed files with 339 additions and 171 deletions.
33 changes: 33 additions & 0 deletions .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# SPDX-FileCopyrightText: : 2024 Ludwig Hülk <https://github.com/Ludee> © Reiner Lemoine Institut
# SPDX-License-Identifier: MIT

[tool.bumpversion]
current_version = "0.3.0"
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"
4 changes: 2 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
test:
name: Run tests and create codecov
name: Run coverage test and create codecov
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -23,7 +23,7 @@ jobs:
- name: Install dependencies
run: pip install pytest pytest-cov

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

- name: Upload results to Codecov
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/publish_testpypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# SPDX-FileCopyrightText: 2024 Ludwig Hülk <@Ludee> © Reiner Lemoine Institut
# SPDX-License-Identifier: MIT

name: Build and publish on Test PyPI

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

jobs:
build-n-publish:
name: Build and publish on Test PyPI
runs-on: ubuntu-latest
environment: pypi-publish
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build binary wheel and source tarball
run: >-
python3 -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/
verbose: true
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: 2023 Jonas Huber <https://github.com/jh-rli> © Reiner Lemoine Institut
# SPDX-License-Identifier: MIT

name: automated-testing
name: tox

on:
push:
Expand All @@ -13,7 +13,6 @@ on:
jobs:
test:
strategy:
# fail-fast: false
matrix:
platform: [ubuntu-latest, windows-latest]
python-version: ['3.10']
Expand All @@ -39,5 +38,5 @@ jobs:
python -m pip install --upgrade pip setuptools wheel
pip install tox tox-gh-actions
- name: tox unit tests
- name: Run tox unit test
run: tox -e ${{ matrix.tox-envs }}
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ repos:
]
- id: check-added-large-files
args: [ "--maxkb=1500" ]
- id: check-docstring-first
# - 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-google-doc-style
- id: check-links

# Ruff - Fast Python linter, written in Rust
Expand All @@ -54,7 +54,7 @@ repos:
# rev: v1.8.0
# hooks:
# - id: numpydoc-validation
# exclude: (tests|docs)/.*
# exclude: (test|docs)/.*

# REUSE Software - Make licensing easy for humans and machines alike
- repo: https://github.com/fsfe/reuse-tool
Expand Down
99 changes: 50 additions & 49 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,87 +15,88 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add a favicon for the documentation [(54#)](https://github.com/rl-institut/super-repository/pull/54)
- Add a warning for older versions that links to latest [(#54)](https://github.com/rl-institut/super-repository/pull/54)
- Add pre-commit and setup pre-commit-hooks [(#56)](https://github.com/rl-institut/super-repository/pull/56)
- Add a community chat on Element [(#59)](https://github.com/rl-institut/super-repository/pull/59)
- Add documentation on the regular community meetings [(#60)](https://github.com/rl-institut/super-repository/pull/60)
- Add CI-based automated testing and linting on commit and pull requests [(#55)](https://github.com/rl-institut/super-repository/pull/55)
- Add license files to folder LICENSES [(#64)](https://github.com/rl-institut/super-repository/pull/64)
- Add dep5 file for copyright notices [(#64)](https://github.com/rl-institut/super-repository/pull/64)
- Add pre-commit hook for REUSE [(#64)](https://github.com/rl-institut/super-repository/pull/64)
- Add copyright notice to all files [(#64)](https://github.com/rl-institut/super-repository/pull/64)
- Add first version of pyproject.toml [(#64)](https://github.com/rl-institut/super-repository/pull/64)
- Add documentation for code style [(#63)](https://github.com/rl-institut/super-repository/pull/63)
- Update REUSE [(#66)](https://github.com/rl-institut/super-repository/pull/66)
- Add workflow with codecov [(#68)](https://github.com/rl-institut/super-repository/pull/68)
- Add badges for publication section [(#69)](https://github.com/rl-institut/super-repository/pull/69)
- Add year of creation to copyright info [(#71)](https://github.com/rl-institut/super-repository/pull/71)
- Add a favicon for the documentation [(54#)](https://github.com/rl-institut/super-repo/pull/54)
- Add a warning for older versions that links to latest [(#54)](https://github.com/rl-institut/super-repo/pull/54)
- Add pre-commit and setup pre-commit-hooks [(#56)](https://github.com/rl-institut/super-repo/pull/56)
- Add a community chat on Element [(#59)](https://github.com/rl-institut/super-repo/pull/59)
- Add documentation on the regular community meetings [(#60)](https://github.com/rl-institut/super-repo/pull/60)
- Add CI-based automated testing and linting on commit and pull requests [(#55)](https://github.com/rl-institut/super-repo/pull/55)
- Add license files to folder LICENSES [(#64)](https://github.com/rl-institut/super-repo/pull/64)
- Add dep5 file for copyright notices [(#64)](https://github.com/rl-institut/super-repo/pull/64)
- Add pre-commit hook for REUSE [(#64)](https://github.com/rl-institut/super-repo/pull/64)
- Add copyright notice to all files [(#64)](https://github.com/rl-institut/super-repo/pull/64)
- Add first version of pyproject.toml [(#64)](https://github.com/rl-institut/super-repo/pull/64)
- Add documentation for code style [(#63)](https://github.com/rl-institut/super-repo/pull/63)
- Update REUSE [(#66)](https://github.com/rl-institut/super-repo/pull/66)
- Add workflow with codecov [(#68)](https://github.com/rl-institut/super-repo/pull/68)
- Add badges for publication section [(#69)](https://github.com/rl-institut/super-repo/pull/69)
- Add year of creation to copyright info [(#71)](https://github.com/rl-institut/super-repo/pull/71)

### Changed

- Update CSS to improve toc [(#54)](https://github.com/rl-institut/super-repository/pull/54)
- Update documentation for mike [(#54)](https://github.com/rl-institut/super-repository/pull/54)
- Update GitHub Action for develop branch [(#58)](https://github.com/rl-institut/super-repository/pull/58)
- Update the sections and merge subpages of the documentation [(#62)](https://github.com/rl-institut/super-repository/pull/62)
- Update documentation for release [(#69)](https://github.com/rl-institut/super-repository/pull/69)
- Update documentation best-practices [(#72)](https://github.com/rl-institut/super-repository/pull/72)
- Update CSS to improve toc [(#54)](https://github.com/rl-institut/super-repo/pull/54)
- Update documentation for mike [(#54)](https://github.com/rl-institut/super-repo/pull/54)
- Update GitHub Action for develop branch [(#58)](https://github.com/rl-institut/super-repo/pull/58)
- Update the sections and merge subpages of the documentation [(#62)](https://github.com/rl-institut/super-repo/pull/62)
- Update documentation for release [(#69)](https://github.com/rl-institut/super-repo/pull/69)
- Update documentation best-practices [(#72)](https://github.com/rl-institut/super-repo/pull/72)
- Add workflow to publish on Test PyPI [(#73)](https://github.com/rl-institut/super-repo/pull/73)

### Removed

- Disable GitHub Action for MkDocs Workflow [(#54)](https://github.com/rl-institut/super-repository/pull/54)
- Remove merged documentation files [(#62)](https://github.com/rl-institut/super-repository/pull/62)
- Remove the LICENSE.txt file [(#64)](https://github.com/rl-institut/super-repository/pull/64)
- Disable GitHub Action for MkDocs Workflow [(#54)](https://github.com/rl-institut/super-repo/pull/54)
- Remove merged documentation files [(#62)](https://github.com/rl-institut/super-repo/pull/62)
- Remove the LICENSE.txt file [(#64)](https://github.com/rl-institut/super-repo/pull/64)

## [0.2.0] Minor Release - Oh Hi Mike - 2023-08-11

### Added

- Add documentation version control with mike [(#47)](https://github.com/rl-institut/super-repository/pull/47)
- Add documentation version control with mike [(#47)](https://github.com/rl-institut/super-repo/pull/47)

### Changed

- Update issue templates and release procedure [(#47)](https://github.com/rl-institut/super-repository/pull/47)
- Update issue templates and release procedure [(#47)](https://github.com/rl-institut/super-repo/pull/47)

## [0.1.1] Patch Release - Emmy Hennings Day Patch - 2023-08-10

### Added

- Add issue template for release `issue_template_release.md` [(#43)](https://github.com/rl-institut/super-repository/pull/43)
- Add issue template for release `issue_template_release.md` [(#43)](https://github.com/rl-institut/super-repo/pull/43)

### Changed

- Update the release procedure [(#43)](https://github.com/rl-institut/super-repository/pull/43)
- Update the release procedure [(#43)](https://github.com/rl-institut/super-repo/pull/43)

## [0.1.0] Minor Release - Emmy Hennings Day - 2023-08-10

### Added

- [LICENSE.txt](https://github.com/rl-institut/super-repository/blob/main/LICENSE.txt)
- CITATION.cff [(#2)](https://github.com/rl-institut/super-repository/pull/2)
- CONTRIBUTING.md [(#2)](https://github.com/rl-institut/super-repository/pull/2)
- USERS.cff [(#2)](https://github.com/rl-institut/super-repository/pull/2)
- CODE_OF_CONDUCT.md [(#3)](https://github.com/rl-institut/super-repository/pull/3)
- CHANGELOG.md [(#6)](https://github.com/rl-institut/super-repository/pull/6)
- README.rst [(#10)](https://github.com/rl-institut/super-repository/pull/10)
- Add a logo to the README [(#18)](https://github.com/rl-institut/super-repository/pull/18)
- Add mkdocstrings [(#20)](https://github.com/rl-institut/super-repository/pull/20)
- Add example code with google docstrings [(#20)](https://github.com/rl-institut/super-repository/pull/20)
- Add `requirements.txt` for python environment dependencies [(#20)](https://github.com/rl-institut/super-repository/pull/20)
- Add templates for issues and PR [(#15)](https://github.com/rl-institut/super-repository/pull/15)
- Add a GitHub workflow to deploy documentation [(#25)](https://github.com/rl-institut/super-repository/pull/25)
- Add permanent links for documentation sections [(#28)](https://github.com/rl-institut/super-repository/pull/28)
- Add documentation on documentation files [(#35)](https://github.com/rl-institut/super-repository/pull/35
- Add `RELEASE_PROCEDURE.md` [(#37)](https://github.com/rl-institut/super-repository/pull/37)
- [LICENSE.txt](https://github.com/rl-institut/super-repo/blob/main/LICENSE.txt)
- CITATION.cff [(#2)](https://github.com/rl-institut/super-repo/pull/2)
- CONTRIBUTING.md [(#2)](https://github.com/rl-institut/super-repo/pull/2)
- USERS.cff [(#2)](https://github.com/rl-institut/super-repo/pull/2)
- CODE_OF_CONDUCT.md [(#3)](https://github.com/rl-institut/super-repo/pull/3)
- CHANGELOG.md [(#6)](https://github.com/rl-institut/super-repo/pull/6)
- README.rst [(#10)](https://github.com/rl-institut/super-repo/pull/10)
- Add a logo to the README [(#18)](https://github.com/rl-institut/super-repo/pull/18)
- Add mkdocstrings [(#20)](https://github.com/rl-institut/super-repo/pull/20)
- Add example code with google docstrings [(#20)](https://github.com/rl-institut/super-repo/pull/20)
- Add `requirements.txt` for python environment dependencies [(#20)](https://github.com/rl-institut/super-repo/pull/20)
- Add templates for issues and PR [(#15)](https://github.com/rl-institut/super-repo/pull/15)
- Add a GitHub workflow to deploy documentation [(#25)](https://github.com/rl-institut/super-repo/pull/25)
- Add permanent links for documentation sections [(#28)](https://github.com/rl-institut/super-repo/pull/28)
- Add documentation on documentation files [(#35)](https://github.com/rl-institut/super-repo/pull/35
- Add `RELEASE_PROCEDURE.md` [(#37)](https://github.com/rl-institut/super-repo/pull/37)

### Changed

- Update the .gitignore [(#19)](https://github.com/rl-institut/super-repository/pull/19)
- Update the documentation file structure [(#28)](https://github.com/rl-institut/super-repository/pull/28)
- Update the .gitignore [(#19)](https://github.com/rl-institut/super-repo/pull/19)
- Update the documentation file structure [(#28)](https://github.com/rl-institut/super-repo/pull/28)

### Removed

- Remove the `src` folder [(#26)](https://github.com/rl-institut/super-repository/pull/26)
- Remove the `super_repo` folder [(#26)](https://github.com/rl-institut/super-repo/pull/26)

## [0.0.0] Initial Release - Hello Super-Repository - 2022-03-03

Expand All @@ -104,4 +105,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- GitHub repository
- .gitignore
- LICENSE (MIT License)
- [GitHub Projects](https://github.com/rl-institut/super-repository/projects?type=classic) for software versioning
- [GitHub Projects](https://github.com/rl-institut/super-repo/projects?type=classic) for software versioning
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ authors:
title: "Super Repo"
type: software
license: MIT
version: 0.2.0
version: 0.3.0
doi: null
date-released: 2023-08-11
url: "https://github.com/rl-institut/super-repo/"
9 changes: 5 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
SPDX-FileCopyrightText: 2022 Ludwig Hülk <https://github.com/Ludee> © Reiner Lemoine Institut
SPDX-License-Identifier: MIT
[Homepage]: https://rl-institut.github.io/super-repository/
[Version]: [Super-Repository v0.2.0](https://github.com/rl-institut/super-repository/releases)
[Homepage]: https://rl-institut.github.io/super-repo/
[Version]: [Super-Repository v0.2.0](https://github.com/rl-institut/super-repo/releases)
-->

# Collaborative Development
Expand All @@ -15,7 +15,7 @@ SPDX-License-Identifier: MIT

## Types of interaction

This repository is following the [Contributor Covenant Code of Conduct](https://github.com/rl-institut/super-repository/blob/main/CODE_OF_CONDUCT.md). <br>
This repository is following the [Contributor Covenant Code of Conduct](https://github.com/rl-institut/super-repo/blob/main/CODE_OF_CONDUCT.md). <br>
Please be self-reflective and always maintain a good culture of discussion and active participation.

### A. Use
Expand Down Expand Up @@ -50,7 +50,7 @@ The workflow for contributing to this project has been inspired by the workflow

Create [an issue](https://help.github.com/en/articles/creating-an-issue)
in the GitHub repository. <br>
Choose a suitable [issue template](https://rl-institut.github.io/super-repository/develop/development/git/)
Choose a suitable [issue template](https://rl-institut.github.io/super-repo/develop/development/git/)
for a `feature` or a `bug` and fill in as much information as possible.
Most important is the `issue title`, it describes the problem you will address. <br>
Update the `GitHub Labels` and assign to a `GitHub Project` and `Milestone` <br>
Expand Down Expand Up @@ -118,6 +118,7 @@ Examples of branch names: `feature-42-add-new-ontology-class`, `feature-911-bran

- Divide your feature into small logical units
- Start to write the documentation or a docstring
- Write a unit test that covers the desired outputs and possible errors
- Don't rush, have the commit messages in mind
- Add your changes to the CHANGELOG.md

Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ super-repo
* - License
- |badge_license| |badge_reuse|
* - Documentation
- |badge_documentation| |badge_tests| |badge_codecov|
- |badge_documentation| |badge_tox| |badge_codecov|
* - Publication
- |badge_pypi| |badge_python| |badge_pypi_downloads|
* - Development
Expand Down Expand Up @@ -78,8 +78,8 @@ License and Citation
:target: https://rl-institut.github.io/super-repo/
:alt: Documentation

.. |badge_tests| image:: https://github.com/rl-institut/super-repo/actions/workflows/automated-testing.yml/badge.svg
:target: https://github.com/rl-institut/super-repo/actions/workflows/automated-testing.yml
.. |badge_tox| image:: https://github.com/rl-institut/super-repo/actions/workflows/tox.yml/badge.svg
:target: https://github.com/rl-institut/super-repo/actions/workflows/tox.yml
:alt: Documentation

.. |badge_codecov| image:: https://codecov.io/gh/rl-institut/super-repo/graph/badge.svg?token=YYCJI3D5G5
Expand Down
Loading

0 comments on commit 720cfd8

Please sign in to comment.