From d71115d6ae994f400f5cf2b4ca37888e14b8423e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 10:30:51 +0100 Subject: [PATCH 01/30] Update documentation #34 --- docs/user_documentation/install/index.md | 38 ++++++++++++++++++++++-- requirements.txt | 3 +- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/docs/user_documentation/install/index.md b/docs/user_documentation/install/index.md index b988f00..9a9fe52 100644 --- a/docs/user_documentation/install/index.md +++ b/docs/user_documentation/install/index.md @@ -5,7 +5,7 @@ With conda, you can create, export, list, remove, and update environments that have different versions of Python and/or packages installed in them.
Switching or moving between environments is called activating the environment. -You can also share an environment file and import from `requirements.txt`. +You can also share an environment file and import from πŸ“ `requirements.txt`. πŸ’» `conda env create -f environment.yml` Create conda environment
πŸ’» `activate py310` Activate environment
@@ -13,12 +13,12 @@ You can also share an environment file and import from `requirements.txt`. ## Requirements -In Python the `requirements.txt` file helps manage dependencies. +In Python the πŸ“ `requirements.txt` file helps manage dependencies. It's a text file that lists the packages that the Python project depends on. πŸ’» `pip install -r requirements.txt` Install from file -## Pyproject +## PyProject This python package contains a `pyproject.toml` file that contains build system requirements and information, which are @@ -26,5 +26,37 @@ build system requirements and information, which are to build the package. It contains the metadata of the software project. +## astral-uv + +Astral UV is a modern Python package manager designed for flexibility and speed. +Efficient package management is crucial for maintaining consistency and +compatibility in Python projects. +Tools like `pip` and `virtual environments` help manage dependencies, +while advanced tools like `astral-uv` streamline package management workflows further. +It focuses on optimizing dependency resolution, improving installation times, +and ensuring reproducible builds. + +Its key features include: + +- **Fast Dependency Resolution**: Reduces conflicts and speeds up package resolution. +- **Reproducibility**: Ensures consistent environments across different machines or deployments. +- **Integration with CI/CD Pipelines**: Tailored for seamless integration into automated workflows. + +Install:
+πŸ’» `pip install uv` install package +πŸ’» `uv` check package + +Use:
+πŸ’» `uv python list` view available Python versions +πŸ’» `uv run` run a command in the project environment + +Build and publish:
+πŸ’» `uv build` build the project into distribution archives +πŸ’» `ls dist/` view created distribution +πŸ’» `uv publish` build the project into distribution archives + + +See the official documentation at [astral.sh](https://docs.astral.sh/uv/getting-started/features/#features) + !!! note "Used Icons" πŸ™ GitHub | πŸ’  git | πŸ“ File | πŸ’» Command Line diff --git a/requirements.txt b/requirements.txt index 20dc30a..fd95412 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,5 +10,6 @@ mike pre-commit pytest pytest-cov -tox ruff +tox +uv From 4959e10f378e6d784882ed7e07118dfa93e0d719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 10:32:13 +0100 Subject: [PATCH 02/30] Add uv package #24 --- .github/workflows/publish_testpypi.yml | 37 ++++++++++++++++++++++++++ uv.lock | 22 +++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 .github/workflows/publish_testpypi.yml create mode 100644 uv.lock diff --git a/.github/workflows/publish_testpypi.yml b/.github/workflows/publish_testpypi.yml new file mode 100644 index 0000000..b0812d1 --- /dev/null +++ b/.github/workflows/publish_testpypi.yml @@ -0,0 +1,37 @@ +# 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 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + + - name: Install + run: >- + python -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: >- + python -m + uv build + ls dist/ + - name: Publish distribution to Test PyPI + run: >- + uv publish diff --git a/uv.lock b/uv.lock new file mode 100644 index 0000000..3c829eb --- /dev/null +++ b/uv.lock @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2024 Ludwig HΓΌlk Β© Reiner Lemoine Institut +# SPDX-License-Identifier: MIT + +version = 1 +requires-python = ">=3.10" + +[[package]] +name = "stringcase" +version = "1.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f3/1f/1241aa3d66e8dc1612427b17885f5fcd9c9ee3079fc0d28e9a3aeeb36fa3/stringcase-1.2.0.tar.gz", hash = "sha256:48a06980661908efe8d9d34eab2b6c13aefa2163b3ced26972902e3bdfd87008", size = 2958 } + +[[package]] +name = "super-repo" +version = "0.2.0" +source = { editable = "." } +dependencies = [ + { name = "stringcase" }, +] + +[package.metadata] +requires-dist = [{ name = "stringcase", specifier = "~=1.2.0" }] From 577d8e379cf399e247cba0281b39f867dbc2faac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 14:11:17 +0100 Subject: [PATCH 03/30] Add bumpversion #24 --- .bumpversion.toml | 26 ++++++++++++++++++++++++++ docs/development/release/index.md | 13 +++++++++++++ requirements.txt | 1 + 3 files changed, 40 insertions(+) create mode 100644 .bumpversion.toml diff --git a/.bumpversion.toml b/.bumpversion.toml new file mode 100644 index 0000000..79ad09b --- /dev/null +++ b/.bumpversion.toml @@ -0,0 +1,26 @@ +# SPDX-FileCopyrightText: : 2024 Ludwig HΓΌlk Β© Reiner Lemoine Institut +# SPDX-License-Identifier: MIT + +[tool.bumpversion] +current_version = "0.2.0" +parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\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.files]] +filename = "pyproject.toml" + +[[tool.bumpversion.files]] +filename = "CITATION.cff" diff --git a/docs/development/release/index.md b/docs/development/release/index.md index 5925b70..c15430a 100644 --- a/docs/development/release/index.md +++ b/docs/development/release/index.md @@ -9,3 +9,16 @@ The software release has four main goals: The [RELEASE_PROCEDURE.md](https://github.com/rl-institut/super-repository/blob/production/RELEASE_PROCEDURE.md) contain detailed instructions to do a release. + +## Automated Versioning with Bumpversion + +**Bumpversion** is a tool for automated version management in software projects.
+It ensures consistent version updates across files and documentation.
+By specifying a part to increment (major, minor, or patch), Bumpversion updates +the version number and creates a Git commit or tag automatically. +This streamlines release workflows, reduces human error, and keeps project versioning synchronized. + +Install package: +πŸ’» `pip install --upgrade bumpversion` + +For configuration, create a `.bumpversion.toml` file to specify versioning rules and affected files. diff --git a/requirements.txt b/requirements.txt index fd95412..2a7e4f9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,7 @@ # SPDX-FileCopyrightText: 2023 Jonas Huber Β© Reiner Lemoine Institut # SPDX-License-Identifier: MIT +bumpversion mkdocs mkdocs-material mkdocstrings From bfb374ef1578f151e42b2fab25fd124d33f251f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 14:17:44 +0100 Subject: [PATCH 04/30] Update docs for bumpversion #24 --- .bumpversion.toml | 3 +++ docs/development/release/index.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.bumpversion.toml b/.bumpversion.toml index 79ad09b..246499c 100644 --- a/.bumpversion.toml +++ b/.bumpversion.toml @@ -24,3 +24,6 @@ filename = "pyproject.toml" [[tool.bumpversion.files]] filename = "CITATION.cff" + +[[tool.bumpversion.files]] +filename = "uv.lock" diff --git a/docs/development/release/index.md b/docs/development/release/index.md index c15430a..84aeb37 100644 --- a/docs/development/release/index.md +++ b/docs/development/release/index.md @@ -22,3 +22,6 @@ Install package: πŸ’» `pip install --upgrade bumpversion` For configuration, create a `.bumpversion.toml` file to specify versioning rules and affected files. + +Use bumpversion: +πŸ’» `bumpversion --current-version 0.2.0 minor` From f33e616533a30326fe8b2ef9e8ddc6122f3c52e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 14:24:53 +0100 Subject: [PATCH 05/30] Update to bump-my-version #24 --- .bumpversion.toml | 4 ++++ requirements.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.bumpversion.toml b/.bumpversion.toml index 246499c..5c34aba 100644 --- a/.bumpversion.toml +++ b/.bumpversion.toml @@ -19,6 +19,10 @@ 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" diff --git a/requirements.txt b/requirements.txt index 2a7e4f9..7e74a6a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ # SPDX-FileCopyrightText: 2023 Jonas Huber Β© Reiner Lemoine Institut # SPDX-License-Identifier: MIT -bumpversion +bump-my-version mkdocs mkdocs-material mkdocstrings From 21428b1aeaaa88c6bcf2c298729065bf501d2543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 14:49:47 +0100 Subject: [PATCH 06/30] Update install environment #24 --- docs/user_documentation/install/index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/user_documentation/install/index.md b/docs/user_documentation/install/index.md index 9a9fe52..650c15a 100644 --- a/docs/user_documentation/install/index.md +++ b/docs/user_documentation/install/index.md @@ -11,6 +11,10 @@ You can also share an environment file and import from πŸ“ `requirements.txt`. πŸ’» `activate py310` Activate environment
πŸ’» `python --version` Check python version +Delete existing environment:
+ πŸ’» `conda deactivate`
+ πŸ’» `conda remove --name py310 --all` + ## Requirements In Python the πŸ“ `requirements.txt` file helps manage dependencies. From 417bd66bcd83737a860bd3fc04da857b308cd58a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 14:51:27 +0100 Subject: [PATCH 07/30] Update install environment #24 --- docs/user_documentation/install/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user_documentation/install/index.md b/docs/user_documentation/install/index.md index 650c15a..8f78f01 100644 --- a/docs/user_documentation/install/index.md +++ b/docs/user_documentation/install/index.md @@ -7,7 +7,7 @@ that have different versions of Python and/or packages installed in them.
Switching or moving between environments is called activating the environment. You can also share an environment file and import from πŸ“ `requirements.txt`. -πŸ’» `conda env create -f environment.yml` Create conda environment
+πŸ’» `conda env create -f environment.yaml` Create conda environment
πŸ’» `activate py310` Activate environment
πŸ’» `python --version` Check python version From 3d94719a6c838a3814915c45d96abf9adeaef350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 15:18:06 +0100 Subject: [PATCH 08/30] Update environment #24 --- environment.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/environment.yaml b/environment.yaml index 1cce54c..26e9f6e 100644 --- a/environment.yaml +++ b/environment.yaml @@ -7,7 +7,6 @@ channels: - conda-forge dependencies: - python=3.10 - - anaconda - pip - pip: - - -r file:requirements.txt + - -r requirements.txt From 83dde010bf4c9c427eb48e47ede5eb2a06c3edc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 15:20:28 +0100 Subject: [PATCH 09/30] Update conda docs #24 --- docs/user_documentation/install/index.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/user_documentation/install/index.md b/docs/user_documentation/install/index.md index 8f78f01..17c7e3a 100644 --- a/docs/user_documentation/install/index.md +++ b/docs/user_documentation/install/index.md @@ -8,7 +8,7 @@ Switching or moving between environments is called activating the environment. You can also share an environment file and import from πŸ“ `requirements.txt`. πŸ’» `conda env create -f environment.yaml` Create conda environment
-πŸ’» `activate py310` Activate environment
+πŸ’» `conda activate py310` Activate environment
πŸ’» `python --version` Check python version Delete existing environment:
@@ -17,8 +17,9 @@ Delete existing environment:
## Requirements -In Python the πŸ“ `requirements.txt` file helps manage dependencies. -It's a text file that lists the packages that the Python project depends on. +In Python the πŸ“ `requirements.txt` file helps manage dependencies.
+It's a text file that lists the packages that the Python project depends on.
+All listed packages will be installed in the conda environment. πŸ’» `pip install -r requirements.txt` Install from file From 94486753de48c96aeb7ae802789d91f1508857fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 15:29:22 +0100 Subject: [PATCH 10/30] Update bumpversion docs #24 --- docs/development/release/index.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/development/release/index.md b/docs/development/release/index.md index 84aeb37..3f735e4 100644 --- a/docs/development/release/index.md +++ b/docs/development/release/index.md @@ -19,9 +19,14 @@ the version number and creates a Git commit or tag automatically. This streamlines release workflows, reduces human error, and keeps project versioning synchronized. Install package: -πŸ’» `pip install --upgrade bumpversion` +πŸ’» `pip install --upgrade bump-my-version` For configuration, create a `.bumpversion.toml` file to specify versioning rules and affected files. -Use bumpversion: -πŸ’» `bumpversion --current-version 0.2.0 minor` +Test bumpversion:
+πŸ’» `bump-my-version show-bump` Preview next possible versions
+πŸ’» `bump-my-version bump minor --dry-run -vv` Sandbox bump + +Use bumpversion:
+πŸ’» `rbump-my-version --current-version 0.2.0 mino` +πŸ’  `git commit file -am "Bumpversion #IssueNr"` to commit bump From 454e61b25981982810bd68139be207ebf47fbd02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 15:31:04 +0100 Subject: [PATCH 11/30] Update bumpversion docs #24 --- docs/development/release/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/release/index.md b/docs/development/release/index.md index 3f735e4..4b87d32 100644 --- a/docs/development/release/index.md +++ b/docs/development/release/index.md @@ -28,5 +28,5 @@ Test bumpversion:
πŸ’» `bump-my-version bump minor --dry-run -vv` Sandbox bump Use bumpversion:
-πŸ’» `rbump-my-version --current-version 0.2.0 mino` +πŸ’» `bump-my-version --current-version 0.2.0 mino` πŸ’  `git commit file -am "Bumpversion #IssueNr"` to commit bump From a954a0ab76d03caea1fbee84004c2dbd6b503c49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 15:45:35 +0100 Subject: [PATCH 12/30] Update code format in docs #24 --- docs/development/best-practice/code_style.md | 3 ++ .../best-practice/continuous_integration.md | 4 +- docs/development/best-practice/index.md | 3 ++ .../best-practice/test_driven_development.md | 4 +- docs/development/collaboration/chat.md | 9 +++-- .../collaboration/code_of_conduct.md | 7 +++- docs/development/collaboration/git.md | 18 ++++----- docs/development/collaboration/index.md | 13 ++++--- .../collaboration/license_and_citation.md | 15 +++++--- docs/development/collaboration/meeting.md | 7 +++- docs/development/collaboration/users.md | 4 +- docs/development/documentation/index.md | 38 +++++++++---------- docs/development/release/index.md | 25 ++++++------ docs/index.md | 20 +++++----- docs/user_documentation/install/index.md | 20 +++++----- 15 files changed, 104 insertions(+), 86 deletions(-) diff --git a/docs/development/best-practice/code_style.md b/docs/development/best-practice/code_style.md index 58c1525..e7e9a0b 100644 --- a/docs/development/best-practice/code_style.md +++ b/docs/development/best-practice/code_style.md @@ -49,3 +49,6 @@ Following good documentation practices ensures code is understandable to others. Maintain a logical structure within files, grouping related functions and classes. Consider the readability of your code and strive for modular, well-organized files. + +!!! note "Used Icons" + πŸ™ GitHub | πŸ’  git | πŸ“ File | πŸ’» Command Line diff --git a/docs/development/best-practice/continuous_integration.md b/docs/development/best-practice/continuous_integration.md index 2246916..3094e51 100644 --- a/docs/development/best-practice/continuous_integration.md +++ b/docs/development/best-practice/continuous_integration.md @@ -45,8 +45,8 @@ for testing: ### Install Install the required package in a python environment.
-πŸ’» `pip install tox` install tox
-πŸ’» `tox` run tox locally + πŸ’» `pip install tox` Install tox
+ πŸ’» `tox` Run tox locally ## Adding and Managing Tests diff --git a/docs/development/best-practice/index.md b/docs/development/best-practice/index.md index 58bd154..ae9dfb9 100644 --- a/docs/development/best-practice/index.md +++ b/docs/development/best-practice/index.md @@ -21,3 +21,6 @@ high standards in a collaborative scientific software environment: Following these practices will streamline development, reduce bugs, and foster a productive, collaborative coding environment. + +!!! note "Used Icons" + πŸ™ GitHub | πŸ’  git | πŸ“ File | πŸ’» Command Line diff --git a/docs/development/best-practice/test_driven_development.md b/docs/development/best-practice/test_driven_development.md index bd14cbe..94b61d6 100644 --- a/docs/development/best-practice/test_driven_development.md +++ b/docs/development/best-practice/test_driven_development.md @@ -57,11 +57,11 @@ of testing, such as edge cases and integration scenarios. This example demonstrates the TDD approach within a Django app.
You can run all tests in Django using the following command: -πŸ’» `python manage.py test` + πŸ’» `python manage.py test` To run specific test cases, you can provide the app name and the test case: -πŸ’» `python manage.py test app.MyModelViewTestCase` + πŸ’» `python manage.py test app.MyModelViewTestCase` This is a Step-by-Step Guide to TDD in Django: diff --git a/docs/development/collaboration/chat.md b/docs/development/collaboration/chat.md index 9e67f50..e4f613d 100644 --- a/docs/development/collaboration/chat.md +++ b/docs/development/collaboration/chat.md @@ -1,12 +1,15 @@ # Chat -For direct communication, this repo uses a public [Element](https://element.io/) room.
+For direct communication, this repository uses a public [Element](https://element.io/) room.
This messenger platform is based on the [[matrix]](https://en.wikipedia.org/wiki/Matrix_(protocol)) communication protocol
and can be accessed without a mobile phone. To engage with the developer and user community,
-login with an existing account (e.g. GitHub) or register a new account. +login with an existing account (for example GitHub) or register a new account. The room name is: -[Super-Repo:matrix.org](https://app.element.io/#/room/#super-repo:matrix.org).
+[Super-Repository:matrix.org](https://app.element.io/#/room/#super-repository:matrix.org).
+ +!!! note "Used Icons" + πŸ™ GitHub | πŸ’  git | πŸ“ File | πŸ’» Command Line diff --git a/docs/development/collaboration/code_of_conduct.md b/docs/development/collaboration/code_of_conduct.md index 8db39fe..32bc7fc 100644 --- a/docs/development/collaboration/code_of_conduct.md +++ b/docs/development/collaboration/code_of_conduct.md @@ -1,7 +1,10 @@ # Code of Conduct -This repository is following the [Contributor Covenant Code of Conduct](https://github.com/rl-institut/super-repo/blob/production/CODE_OF_CONDUCT.md).
+This repository is following the [Contributor Covenant Code of Conduct](https://github.com/rl-institut/super-repository/blob/production/CODE_OF_CONDUCT.md).
Everyone is asked to be self-reflective and always maintain a good culture of discussion and active participation. -This includes written communication in this repo and direct encounters in meetings and events. +This includes written communication in this repository and direct encounters in meetings and events. + +!!! note "Used Icons" + πŸ™ GitHub | πŸ’  git | πŸ“ File | πŸ’» Command Line diff --git a/docs/development/collaboration/git.md b/docs/development/collaboration/git.md index 8fb5c67..707191b 100644 --- a/docs/development/collaboration/git.md +++ b/docs/development/collaboration/git.md @@ -44,7 +44,7 @@ It includes all needed information to merge branches and release new versions. GitHub Labels are used to organize Issues and PR.
Colours and emoticons improve presentation, see:
-πŸ“ [github-labels.json](https://github.com/rl-institut/super-repository/blob/develop/docs/development/git/github-labels.json) + πŸ“ [github-labels.json](https://github.com/rl-institut/super-repository/blob/develop/docs/development/git/github-labels.json) ## GitHub Workflows (Actions) @@ -62,8 +62,8 @@ It is used to improve auto-format code, do linting and run tests before every co ### Install Install the required package in a python environment.
-πŸ’» `pip install pre-commit` install pre-commit
-πŸ’» `pre-commit install` install pre-commit + πŸ’» `pip install pre-commit` Install pre-commit
+ πŸ’» `pre-commit install` Install pre-commit ### Setup @@ -81,17 +81,17 @@ List of implemented hooks: ### Use -All commits will trigger the hooks automatically.
-πŸ’  `git commit file -m "Commit message #IssueNr"` to commit +All commits will trigger the hooks automatically.
+ πŸ’  `git commit file -m "Commit message #IssueNr"` Commit with message -Commit without running the hooks.
-πŸ’  `git commit --no-verify file` to commit without hooks +Commit without running the hooks.
+ πŸ’  `git commit --no-verify file` Commit without hooks !!! note "Line endings" There can be problems with file line endings on Windows, `CRLF` is used on Windows and `LF` is used on Linux. -To run the hooks on all files in your repository use:
-πŸ’» `pre-commit run --all-files` +To run the hooks on all files in your repository use:
+ πŸ’» `pre-commit run --all-files` Run pre-commit hooks !!! warning "Markdown files / Admonitions" If the hook is applied to markdown files that include special formatting, diff --git a/docs/development/collaboration/index.md b/docs/development/collaboration/index.md index a99b939..649cb6c 100644 --- a/docs/development/collaboration/index.md +++ b/docs/development/collaboration/index.md @@ -5,8 +5,11 @@ The repository has several elements to provide necessary functions. To participate in the development you can do the following: -- Contribute to the [GitHub Discussions](https://github.com/rl-institut/super-repo/discussions) -- Contribute to the [GitHub Issues](https://github.com/rl-institut/super-repo/issues) -- Follow the [workflow for collaborative development](https://github.com/rl-institut/super-repo/blob/production/CONTRIBUTING.md) -- Get in touch with the community on the [Element Chat](https://rl-institut.github.io/super-repo/develop/development/collaboration/chat/) -- Meet the developers in one of the [regular meetings](https://rl-institut.github.io/super-repo/develop/development/collaboration/meeting/) +- Contribute to the [GitHub Discussions](https://github.com/rl-institut/super-repository/discussions) +- Contribute to the [GitHub Issues](https://github.com/rl-institut/super-repository/issues) +- Follow the [workflow for collaborative development](https://github.com/rl-institut/super-repository/blob/production/CONTRIBUTING.md) +- Get in touch with the community on the [Element Chat](https://rl-institut.github.io/super-repository/develop/development/collaboration/chat/) +- Meet the developers in one of the [regular meetings](https://rl-institut.github.io/super-repository/develop/development/collaboration/meeting/) + +!!! note "Used Icons" + πŸ™ GitHub | πŸ’  git | πŸ“ File | πŸ’» Command Line diff --git a/docs/development/collaboration/license_and_citation.md b/docs/development/collaboration/license_and_citation.md index 176ff99..aee42bf 100644 --- a/docs/development/collaboration/license_and_citation.md +++ b/docs/development/collaboration/license_and_citation.md @@ -5,7 +5,7 @@ This software is developed under an [open-source license](https://en.wikipedia.org/wiki/Open-source_license).
The selected license can be read in the -[LICENSE.txt](https://github.com/rl-institut/super-repo/blob/production/LICENSE.txt). +[LICENSE.txt](https://github.com/rl-institut/super-repository/blob/production/LICENSE.txt). The users have permission to [run and use, modify, distribute the program, and release the improvements](https://www.gnu.de/free-software/index.de.html) @@ -14,7 +14,7 @@ include the license text. Please attribute as: -**"Super-Repo" Β© Reiner Lemoine Institut | MIT License** +**"Super-Repository" Β© Reiner Lemoine Institut | MIT License** ### REUSE @@ -23,8 +23,8 @@ specification. All files are explicitly stating the corresponding license and copyright information. It is implemented as GitHub workflow and pre-commit hook: -- GitHub workflow: [reuse.yml](https://github.com/rl-institut/super-repo/blob/feature-7-REUSE/.github/workflows/reuse.yml) -- [Pre-commit hook](https://github.com/rl-institut/super-repo/blob/feature-7-REUSE/.pre-commit-config.yaml#L66) +- GitHub workflow: [reuse.yml](https://github.com/rl-institut/super-repository/blob/feature-7-REUSE/.github/workflows/reuse.yml) +- [Pre-commit hook](https://github.com/rl-institut/super-repository/blob/feature-7-REUSE/.pre-commit-config.yaml#L66) All copyright information should follow this example: @@ -39,11 +39,14 @@ SPDX-License-Identifier: {$SPDX_license_name} To [scientifically cite](https://en.wikipedia.org/wiki/Quotation) this repository, see the **_Cite this repository_** function or the file -[CITATION.cff](https://github.com/rl-institut/super-repo/blob/production/CITATION.cff). +[CITATION.cff](https://github.com/rl-institut/super-repository/blob/production/CITATION.cff). ## Contributing Since this software is under an open source license and can be downloaded, run and modified, you are invited to comment, improve and develop the program as you wish.
To contribute to the **collaborative development** follow the workflow described in -[CONTRIBUTING.md](https://github.com/rl-institut/super-repo/blob/production/CONTRIBUTING.md). +[CONTRIBUTING.md](https://github.com/rl-institut/super-repository/blob/production/CONTRIBUTING.md). + +!!! note "Used Icons" + πŸ™ GitHub | πŸ’  git | πŸ“ File | πŸ’» Command Line diff --git a/docs/development/collaboration/meeting.md b/docs/development/collaboration/meeting.md index 896119c..488a454 100644 --- a/docs/development/collaboration/meeting.md +++ b/docs/development/collaboration/meeting.md @@ -4,7 +4,7 @@ In order to develop a program collaboratively, it is helpful to regularly exchange information about the current status and to discuss open questions and make decisions.
If you want to join the meetings, please use the -[GitHub Discussions](https://github.com/rl-institut/super-repo/discussions). +[GitHub Discussions](https://github.com/rl-institut/super-repository/discussions). ## Developer Meetings @@ -14,7 +14,7 @@ the general vision of software development. The regular developer meeting takes place on
**the first Wednesday of the month between 9 and 9:30 am**.
-The meeting room is: [meet.jit.si/super-repo-dev](https://meet.jit.si/super-repo-dev) +The meeting room is: [meet.jit.si/super-repository-dev](https://meet.jit.si/super-repository-dev) ## User Meetings @@ -25,3 +25,6 @@ or give general feedback. The regular user meeting takes place after the developer meeting in the same room on the
**first Wednesday of the month between 9:30 and 10 am**. + +!!! note "Used Icons" + πŸ™ GitHub | πŸ’  git | πŸ“ File | πŸ’» Command Line diff --git a/docs/development/collaboration/users.md b/docs/development/collaboration/users.md index 22139bc..f1a9c18 100644 --- a/docs/development/collaboration/users.md +++ b/docs/development/collaboration/users.md @@ -3,9 +3,7 @@ Known user of this software can be added to πŸ“ [USERS.cff](https://github.com/rl-institut/super-repository/blob/production/USERS.cff) for reference.
-Please use the πŸ“ `issue_template_user_kudos.md`. - - +Please use the issue template: πŸ“ `issue_template_user_kudos.md` !!! note "Used Icons" πŸ™ GitHub | πŸ’  git | πŸ“ File | πŸ’» Command Line diff --git a/docs/development/documentation/index.md b/docs/development/documentation/index.md index 6a448e9..58f0d72 100644 --- a/docs/development/documentation/index.md +++ b/docs/development/documentation/index.md @@ -20,21 +20,21 @@ additional features and an elegant design.
### Install Install the required packages in a python environment.
-πŸ’» `pip install mkdocs` install MkDocs
-πŸ’» `pip install mkdocs-material` install the material theme + πŸ’» `pip install mkdocs` Install MkDocs
+ πŸ’» `pip install mkdocs-material` Install the material theme ### Build Generate the documentation locally.
-πŸ’» `mkdocs serve` start the local live version of the documentation
-πŸ’» `mkdocs build` create a folder `site` with the documentation + πŸ’» `mkdocs serve` Start the local live version of the documentation
+ πŸ’» `mkdocs build` Create a folder `site` with the documentation ### Publish #### Manually Publish documentation on **GitHub Pages**.
-πŸ’» `mkdocs gh-deploy` manually deploys the documentation files + πŸ’» `mkdocs gh-deploy` Manually deploys the documentation files !!! warning "Manually deploy documentation" This command overrides all manually deployed versions (mike).
@@ -49,34 +49,34 @@ A commit on the `develop` branch starts the workflow. #### Mike The package [mike](https://github.com/jimporter/mike) is used to deploy [multiple versions](https://squidfunk.github.io/mkdocs-material/setup/setting-up-versioning/?h=versioning) of the documentation.
-πŸ’» `pip install mike` install mike
-πŸ’» `mike deploy --push --update-aliases 0.1 latest` deploys the latest version
-πŸ’» `mike set-default --push latest` Set the default version to latest
-πŸ’» `mike deploy develop --push` deploys the develop branch + πŸ’» `pip install mike` Install mike
+ πŸ’» `mike deploy --push --update-aliases 0.1 latest` Deploys the latest version
+ πŸ’» `mike set-default --push latest` Set the default version to latest
+ πŸ’» `mike deploy develop --push` Deploys the develop branch !!! note "Mike Versions" It is recommended to use only the **Minor Versions** (for example 0.1) and exclude the **Patch Version** (for example 0.1.1)! Other useful commands are:
-πŸ’» `mike serve` test mike on [`http://localhost:8000`](http://localhost:8000)
-πŸ’» `mike list` list all versions
-πŸ’» `mike retitle 1.0.0 1.0.1 --push` rename a version
-πŸ’» `mike delete 0.1 --push` deletes a specific versions
-πŸ’» `mike delete --all --push` deletes all versions + πŸ’» `mike serve` Test mike on [`http://localhost:8000`](http://localhost:8000)
+ πŸ’» `mike list` List all versions
+ πŸ’» `mike retitle 1.0.0 1.0.1 --push` Rename a version
+ πŸ’» `mike delete 0.1 --push` Deletes a specific versions
+ πŸ’» `mike delete --all --push` Deletes all versions When adding older versions, load the `Git Tags` used for the releases:
-πŸ’  `git checkout v0.1.1`
-πŸ’» `mike deploy 0.1 --push` deploys the old version 0.1 + πŸ’  `git checkout v0.1.1`
+ πŸ’» `mike deploy 0.1 --push` Deploys the old version 0.1 When building mike locally, the branch `gh-pages` is modified locally.
-πŸ’» `error: gh-pages is unrelated to origin/gh-pages`
-πŸ’  `git branch -D gh-pages` delete the local documentation branch + πŸ’» `error: gh-pages is unrelated to origin/gh-pages`
+ πŸ’  `git branch -D gh-pages` Delete the local documentation branch ## mkdocstrings [mkdocstrings](https://mkdocstrings.github.io/) generates automatic documentation (autodocs) from [Google style docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html).
-πŸ’» `pip install mkdocstrings` install mkdocstrings + πŸ’» `pip install mkdocstrings` Install mkdocstrings !!! note "Used Icons" πŸ™ GitHub | πŸ’  git | πŸ“ File | πŸ’» Command Line diff --git a/docs/development/release/index.md b/docs/development/release/index.md index 4b87d32..5a104b6 100644 --- a/docs/development/release/index.md +++ b/docs/development/release/index.md @@ -7,26 +7,27 @@ The software release has four main goals: 3. Update the documentation 4. Publish a new version of the package at PyPI -The [RELEASE_PROCEDURE.md](https://github.com/rl-institut/super-repository/blob/production/RELEASE_PROCEDURE.md) +The πŸ“ [RELEASE_PROCEDURE.md](https://github.com/rl-institut/super-repository/blob/production/RELEASE_PROCEDURE.md) contain detailed instructions to do a release. ## Automated Versioning with Bumpversion **Bumpversion** is a tool for automated version management in software projects.
-It ensures consistent version updates across files and documentation.
-By specifying a part to increment (major, minor, or patch), Bumpversion updates -the version number and creates a Git commit or tag automatically. -This streamlines release workflows, reduces human error, and keeps project versioning synchronized. +It ensures consistent version updates across files and documentation
+by specifying a part to increment (major, minor, or patch).
+This streamlines release workflows and keeps project versioning synchronized. Install package: -πŸ’» `pip install --upgrade bump-my-version` - -For configuration, create a `.bumpversion.toml` file to specify versioning rules and affected files. + πŸ’» `pip install --upgrade bump-my-version`
+ πŸ“ `.bumpversion.toml` Configuration file for versioning rules and affected files Test bumpversion:
-πŸ’» `bump-my-version show-bump` Preview next possible versions
-πŸ’» `bump-my-version bump minor --dry-run -vv` Sandbox bump + πŸ’» `bump-my-version show-bump` Preview next possible versions
+ πŸ’» `bump-my-version bump minor --dry-run -vv` Sandbox bump Use bumpversion:
-πŸ’» `bump-my-version --current-version 0.2.0 mino` -πŸ’  `git commit file -am "Bumpversion #IssueNr"` to commit bump + πŸ’» `bump-my-version --current-version 0.2.0 mino`
Run bumpversion + πŸ’  `git commit file -am "Bumpversion #IssueNr"` Commit bumpversion changes + +!!! note "Used Icons" + πŸ™ GitHub | πŸ’  git | πŸ“ File | πŸ’» Command Line diff --git a/docs/index.md b/docs/index.md index e7171e6..58cf81b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,9 +4,9 @@ hide: - toc --- -# Welcome to the Super-Repo Documentation +# Welcome to the Super-Repository Documentation -A template repo to test and document elements and features for research software.
+A template repository to test and document elements and features for research software.
It implements the collection of repository elements and files.
The goal is to simplify and standardise the creation of software in GitHub repositories. @@ -20,17 +20,15 @@ The documentation is separated into two main sections: Files and structures related to collaborative development, community processes, and documentation. -- COLLABORATION -- GIT -- CODE-STYLE -- DOCUMENTATION -- RELEASE +- [Collaboration](https://rl-institut.github.io/super-repository/develop/development/collaboration/) +- [Best-Practices](https://rl-institut.github.io/super-repository/develop/development/best-practice/) +- [Documentation](https://rl-institut.github.io/super-repository/develop/development/documentation/) +- [Release](https://rl-institut.github.io/super-repository/develop/development/release/) ### Fields for code documentation Methods and functions of the module. -- INSTALL -- FUNCTIONS -- TESTS -- LOGGING +- [Install](https://rl-institut.github.io/super-repository/develop/user_documentation/install/) +- [Functions](https://rl-institut.github.io/super-repository/develop/user_documentation/) +- [Code Example](https://rl-institut.github.io/super-repository/develop/user_documentation/code_example/) diff --git a/docs/user_documentation/install/index.md b/docs/user_documentation/install/index.md index 17c7e3a..5916ff1 100644 --- a/docs/user_documentation/install/index.md +++ b/docs/user_documentation/install/index.md @@ -7,9 +7,9 @@ that have different versions of Python and/or packages installed in them.
Switching or moving between environments is called activating the environment. You can also share an environment file and import from πŸ“ `requirements.txt`. -πŸ’» `conda env create -f environment.yaml` Create conda environment
-πŸ’» `conda activate py310` Activate environment
-πŸ’» `python --version` Check python version + πŸ’» `conda env create -f environment.yaml` Create conda environment
+ πŸ’» `conda activate py310` Activate environment
+ πŸ’» `python --version` Check python version Delete existing environment:
πŸ’» `conda deactivate`
@@ -48,17 +48,17 @@ Its key features include: - **Integration with CI/CD Pipelines**: Tailored for seamless integration into automated workflows. Install:
-πŸ’» `pip install uv` install package -πŸ’» `uv` check package + πŸ’» `pip install uv` Install package + πŸ’» `uv` Check package Use:
-πŸ’» `uv python list` view available Python versions -πŸ’» `uv run` run a command in the project environment + πŸ’» `uv python list` View available Python versions + πŸ’» `uv run` Run a command in the project environment Build and publish:
-πŸ’» `uv build` build the project into distribution archives -πŸ’» `ls dist/` view created distribution -πŸ’» `uv publish` build the project into distribution archives + πŸ’» `uv build` Build the project into distribution archives + πŸ’» `ls dist/` View created distribution + πŸ’» `uv publish` Build the project into distribution archives See the official documentation at [astral.sh](https://docs.astral.sh/uv/getting-started/features/#features) From fe30aea7e7138cf9dd6d7cb3fa70af6f43359090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 20:29:54 +0100 Subject: [PATCH 13/30] Fix pre-commit #24 --- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 98 +++++++++---------- CONTRIBUTING.md | 8 +- RELEASE_PROCEDURE.md | 18 ++-- docs/development/best-practice/code_style.md | 4 +- docs/development/best-practice/index.md | 6 +- docs/development/collaboration/chat.md | 2 +- .../collaboration/code_of_conduct.md | 2 +- docs/development/collaboration/git.md | 12 +-- docs/development/collaboration/index.md | 10 +- .../collaboration/license_and_citation.md | 10 +- docs/development/collaboration/meeting.md | 4 +- docs/development/collaboration/users.md | 2 +- docs/development/release/index.md | 4 +- docs/index.md | 14 +-- 15 files changed, 98 insertions(+), 98 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 29e7317..0d2074e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: - 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 diff --git a/CHANGELOG.md b/CHANGELOG.md index c8f39ac..395e7bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,87 +15,87 @@ 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) ### 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 `src` folder [(#26)](https://github.com/rl-institut/super-repo/pull/26) ## [0.0.0] Initial Release - Hello Super-Repository - 2022-03-03 @@ -104,4 +104,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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 05cfa00..6639026 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,8 +2,8 @@ SPDX-FileCopyrightText: 2022 Ludwig HΓΌlk Β© 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 @@ -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).
+This repository is following the [Contributor Covenant Code of Conduct](https://github.com/rl-institut/super-repo/blob/main/CODE_OF_CONDUCT.md).
Please be self-reflective and always maintain a good culture of discussion and active participation. ### A. Use @@ -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.
-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.
Update the `GitHub Labels` and assign to a `GitHub Project` and `Milestone`
diff --git a/RELEASE_PROCEDURE.md b/RELEASE_PROCEDURE.md index dc7be1e..9469313 100644 --- a/RELEASE_PROCEDURE.md +++ b/RELEASE_PROCEDURE.md @@ -2,8 +2,8 @@ SPDX-FileCopyrightText: 2022 Ludwig HΓΌlk Β© 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) --> # Release Procedure @@ -29,13 +29,13 @@ It always has the format `YYYY-MM-DD`, for example `2022-05-16`. Following the Semantic Versioning, different workflows for Major, Minor, or Patch releases are possible.
For Major and Minor releases, follow the complete workflow.
-For a **Patch Release** (Hotfix), start at [section 3](https://github.com/rl-institut/super-repository/blob/production/RELEASE_PROCEDURE.md#4--create-a-draft-github-release). +For a **Patch Release** (Hotfix), start at [section 3](https://github.com/rl-institut/super-repo/blob/production/RELEASE_PROCEDURE.md#4--create-a-draft-github-release). ### 1. πŸ™ Create a `GitHub Project` -- Create [New classic project](https://github.com/rl-institut/super-repository/projects?type=classic) +- Create [New classic project](https://github.com/rl-institut/super-repo/projects?type=classic) - Use the project template _Automated kanban with reviews_ -- Named `super-repository-v0.1.0` +- Named `super-repo-v0.1.0` - Add a meaningful description - Track project progress @@ -61,7 +61,7 @@ For a **Patch Release** (Hotfix), start at [section 3](https://github.com/rl-ins ### 4. πŸ™ Create a `Draft GitHub Release` - Start here for a **Patch Release** (Hotfix) -- [Draft a new release](https://github.com/rl-institut/super-repository/releases/new) +- [Draft a new release](https://github.com/rl-institut/super-repo/releases/new) - Enter the release version number `0.1.0` as title - Summarize key changes from changelog in the description @@ -73,9 +73,9 @@ For a **Patch Release** (Hotfix), start at [section 3](https://github.com/rl-ins ``` - Add a link to the `πŸ“CHANGELOG.md` - - `**Complete changelog:** [CHANGELOG.md](https://github.com/rl-institut/super-repository/blob/production/CHANGELOG.md)` + - `**Complete changelog:** [CHANGELOG.md](https://github.com/rl-institut/super-repo/blob/production/CHANGELOG.md)` - Add a link to compare versions - - `**Compare versions:** [0.1.0 - 0.2.0](https://github.com/rl-institut/super-repository/compare/v0.1.0...v0.2.0)` + - `**Compare versions:** [0.1.0 - 0.2.0](https://github.com/rl-institut/super-repo/compare/v0.1.0...v0.2.0)` - **Save draft** ### 5. πŸ’  Create a `release` branch @@ -115,7 +115,7 @@ For a **Patch Release** (Hotfix), start at [section 3](https://github.com/rl-ins - Checkout `production` branch and pull - Check existing tags `git tag -n` -- Create new tag: `git tag -a v0.1.0 -m "super-repository Minor Release v0.1.0"` +- Create new tag: `git tag -a v0.1.0 -m "super-repo Minor Release v0.1.0"` - This commit will be the final version for the release, breath three times and check again - Push tag: `git push --tags` diff --git a/docs/development/best-practice/code_style.md b/docs/development/best-practice/code_style.md index e7e9a0b..5d44202 100644 --- a/docs/development/best-practice/code_style.md +++ b/docs/development/best-practice/code_style.md @@ -8,14 +8,14 @@ Maintaining a consistent code style is crucial for the readability and maintainability of a Python project. We enforce most of the following guidelines in our -[Continuous-Integration pipeline](https://rl-institut.github.io/super-repository/develop/development/continuous-integration/) +[Continuous-Integration pipeline](https://rl-institut.github.io/super-repo/develop/development/continuous-integration/) that check the code automatically. ## 1. Installation Before contributing to the project, make sure you have the necessary tools installed for code style enforcement. -We utilize [pre-commit](https://rl-institut.github.io/super-repository/develop/development/continuous-integration/) +We utilize [pre-commit](https://rl-institut.github.io/super-repo/develop/development/continuous-integration/) to automate code checks before committing changes. ## 2. Code Formatting diff --git a/docs/development/best-practice/index.md b/docs/development/best-practice/index.md index ae9dfb9..7509664 100644 --- a/docs/development/best-practice/index.md +++ b/docs/development/best-practice/index.md @@ -5,16 +5,16 @@ maintains consistency, and ensures reliability.
This section focuses on three key methodologies essential for maintaining high standards in a collaborative scientific software environment: -- [**Continuous Integration (CI)**](https://rl-institut.github.io/super-repository/develop/development/continuous-integration/):
+- [**Continuous Integration (CI)**](https://rl-institut.github.io/super-repo/develop/development/continuous-integration/):
Automating the integration of code changes to catch errors early and maintain a stable codebase. CI ensures that all contributions are rigorously tested and integrated seamlessly into the project. -- [**Test-Driven Development (TDD)**](https://rl-institut.github.io/super-repository/develop/development/continuous-integration/):
+- [**Test-Driven Development (TDD)**](https://rl-institut.github.io/super-repo/develop/development/continuous-integration/):
A methodology where tests are written before the actual code implementation.
TDD promotes robust and well-designed code by enforcing that each feature is accompanied by thorough testing from the outset. -- [**Pre-commit Hooks (PCH)**](https://rl-institut.github.io/super-repository/develop/development/continuous-integration/):
+- [**Pre-commit Hooks (PCH)**](https://rl-institut.github.io/super-repo/develop/development/continuous-integration/):
Tools to enforce code quality and consistency by running checks or scripts before changes are committed.
These hooks help identify issues early, improving code hygiene and reducing technical debt. diff --git a/docs/development/collaboration/chat.md b/docs/development/collaboration/chat.md index e4f613d..e664088 100644 --- a/docs/development/collaboration/chat.md +++ b/docs/development/collaboration/chat.md @@ -9,7 +9,7 @@ To engage with the developer and user community,
login with an existing account (for example GitHub) or register a new account. The room name is: -[Super-Repository:matrix.org](https://app.element.io/#/room/#super-repository:matrix.org).
+[Super-Repository:matrix.org](https://app.element.io/#/room/#super-repo:matrix.org).
!!! note "Used Icons" πŸ™ GitHub | πŸ’  git | πŸ“ File | πŸ’» Command Line diff --git a/docs/development/collaboration/code_of_conduct.md b/docs/development/collaboration/code_of_conduct.md index 32bc7fc..87bd481 100644 --- a/docs/development/collaboration/code_of_conduct.md +++ b/docs/development/collaboration/code_of_conduct.md @@ -1,6 +1,6 @@ # Code of Conduct -This repository is following the [Contributor Covenant Code of Conduct](https://github.com/rl-institut/super-repository/blob/production/CODE_OF_CONDUCT.md).
+This repository is following the [Contributor Covenant Code of Conduct](https://github.com/rl-institut/super-repo/blob/production/CODE_OF_CONDUCT.md).
Everyone is asked to be self-reflective and always maintain a good culture of discussion and active participation. diff --git a/docs/development/collaboration/git.md b/docs/development/collaboration/git.md index 707191b..0388819 100644 --- a/docs/development/collaboration/git.md +++ b/docs/development/collaboration/git.md @@ -29,10 +29,10 @@ For more information about how πŸ“ `.gitignore` files work, see the [Ignoring F [Issue Templates](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository) offer specific functions and default configurations for new issues. -- [Feature Issue](https://github.com/rl-institut/super-repository/blob/production/.github/ISSUE_TEMPLATE/issue_template_feature.md) -- [Bug Issue](https://github.com/rl-institut/super-repository/blob/production/.github/ISSUE_TEMPLATE/issue_template_bug.md) -- [Release Issue](https://github.com/rl-institut/super-repository/blob/production/.github/ISSUE_TEMPLATE/issue_template_release.md) -- [User Kudos Issue](https://github.com/rl-institut/super-repository/blob/production/.github/ISSUE_TEMPLATE/issue_template_user_kudos.md) +- [Feature Issue](https://github.com/rl-institut/super-repo/blob/production/.github/ISSUE_TEMPLATE/issue_template_feature.md) +- [Bug Issue](https://github.com/rl-institut/super-repo/blob/production/.github/ISSUE_TEMPLATE/issue_template_bug.md) +- [Release Issue](https://github.com/rl-institut/super-repo/blob/production/.github/ISSUE_TEMPLATE/issue_template_release.md) +- [User Kudos Issue](https://github.com/rl-institut/super-repo/blob/production/.github/ISSUE_TEMPLATE/issue_template_user_kudos.md) ## Pull Request (PR) Template @@ -44,11 +44,11 @@ It includes all needed information to merge branches and release new versions. GitHub Labels are used to organize Issues and PR.
Colours and emoticons improve presentation, see:
- πŸ“ [github-labels.json](https://github.com/rl-institut/super-repository/blob/develop/docs/development/git/github-labels.json) + πŸ“ [github-labels.json](https://github.com/rl-institut/super-repo/blob/develop/docs/development/git/github-labels.json) ## GitHub Workflows (Actions) -[GitHub Actions](https://github.com/rl-institut/super-repository/actions) +[GitHub Actions](https://github.com/rl-institut/super-repo/actions) are used to automate processes of the repository.
Main use-cases are building and publishing the documentation and run automated tests. diff --git a/docs/development/collaboration/index.md b/docs/development/collaboration/index.md index 649cb6c..33e2c2b 100644 --- a/docs/development/collaboration/index.md +++ b/docs/development/collaboration/index.md @@ -5,11 +5,11 @@ The repository has several elements to provide necessary functions. To participate in the development you can do the following: -- Contribute to the [GitHub Discussions](https://github.com/rl-institut/super-repository/discussions) -- Contribute to the [GitHub Issues](https://github.com/rl-institut/super-repository/issues) -- Follow the [workflow for collaborative development](https://github.com/rl-institut/super-repository/blob/production/CONTRIBUTING.md) -- Get in touch with the community on the [Element Chat](https://rl-institut.github.io/super-repository/develop/development/collaboration/chat/) -- Meet the developers in one of the [regular meetings](https://rl-institut.github.io/super-repository/develop/development/collaboration/meeting/) +- Contribute to the [GitHub Discussions](https://github.com/rl-institut/super-repo/discussions) +- Contribute to the [GitHub Issues](https://github.com/rl-institut/super-repo/issues) +- Follow the [workflow for collaborative development](https://github.com/rl-institut/super-repo/blob/production/CONTRIBUTING.md) +- Get in touch with the community on the [Element Chat](https://rl-institut.github.io/super-repo/develop/development/collaboration/chat/) +- Meet the developers in one of the [regular meetings](https://rl-institut.github.io/super-repo/develop/development/collaboration/meeting/) !!! note "Used Icons" πŸ™ GitHub | πŸ’  git | πŸ“ File | πŸ’» Command Line diff --git a/docs/development/collaboration/license_and_citation.md b/docs/development/collaboration/license_and_citation.md index aee42bf..d57f7bd 100644 --- a/docs/development/collaboration/license_and_citation.md +++ b/docs/development/collaboration/license_and_citation.md @@ -5,7 +5,7 @@ This software is developed under an [open-source license](https://en.wikipedia.org/wiki/Open-source_license).
The selected license can be read in the -[LICENSE.txt](https://github.com/rl-institut/super-repository/blob/production/LICENSE.txt). +[LICENSE.txt](https://github.com/rl-institut/super-repo/blob/production/LICENSE.txt). The users have permission to [run and use, modify, distribute the program, and release the improvements](https://www.gnu.de/free-software/index.de.html) @@ -23,8 +23,8 @@ specification. All files are explicitly stating the corresponding license and copyright information. It is implemented as GitHub workflow and pre-commit hook: -- GitHub workflow: [reuse.yml](https://github.com/rl-institut/super-repository/blob/feature-7-REUSE/.github/workflows/reuse.yml) -- [Pre-commit hook](https://github.com/rl-institut/super-repository/blob/feature-7-REUSE/.pre-commit-config.yaml#L66) +- GitHub workflow: [reuse.yml](https://github.com/rl-institut/super-repo/blob/feature-7-REUSE/.github/workflows/reuse.yml) +- [Pre-commit hook](https://github.com/rl-institut/super-repo/blob/feature-7-REUSE/.pre-commit-config.yaml#L66) All copyright information should follow this example: @@ -39,14 +39,14 @@ SPDX-License-Identifier: {$SPDX_license_name} To [scientifically cite](https://en.wikipedia.org/wiki/Quotation) this repository, see the **_Cite this repository_** function or the file -[CITATION.cff](https://github.com/rl-institut/super-repository/blob/production/CITATION.cff). +[CITATION.cff](https://github.com/rl-institut/super-repo/blob/production/CITATION.cff). ## Contributing Since this software is under an open source license and can be downloaded, run and modified, you are invited to comment, improve and develop the program as you wish.
To contribute to the **collaborative development** follow the workflow described in -[CONTRIBUTING.md](https://github.com/rl-institut/super-repository/blob/production/CONTRIBUTING.md). +[CONTRIBUTING.md](https://github.com/rl-institut/super-repo/blob/production/CONTRIBUTING.md). !!! note "Used Icons" πŸ™ GitHub | πŸ’  git | πŸ“ File | πŸ’» Command Line diff --git a/docs/development/collaboration/meeting.md b/docs/development/collaboration/meeting.md index 488a454..21b35d4 100644 --- a/docs/development/collaboration/meeting.md +++ b/docs/development/collaboration/meeting.md @@ -4,7 +4,7 @@ In order to develop a program collaboratively, it is helpful to regularly exchange information about the current status and to discuss open questions and make decisions.
If you want to join the meetings, please use the -[GitHub Discussions](https://github.com/rl-institut/super-repository/discussions). +[GitHub Discussions](https://github.com/rl-institut/super-repo/discussions). ## Developer Meetings @@ -14,7 +14,7 @@ the general vision of software development. The regular developer meeting takes place on
**the first Wednesday of the month between 9 and 9:30 am**.
-The meeting room is: [meet.jit.si/super-repository-dev](https://meet.jit.si/super-repository-dev) +The meeting room is: [meet.jit.si/super-repo-dev](https://meet.jit.si/super-repo-dev) ## User Meetings diff --git a/docs/development/collaboration/users.md b/docs/development/collaboration/users.md index f1a9c18..ead8687 100644 --- a/docs/development/collaboration/users.md +++ b/docs/development/collaboration/users.md @@ -1,7 +1,7 @@ # Users Known user of this software can be added to -πŸ“ [USERS.cff](https://github.com/rl-institut/super-repository/blob/production/USERS.cff) +πŸ“ [USERS.cff](https://github.com/rl-institut/super-repo/blob/production/USERS.cff) for reference.
Please use the issue template: πŸ“ `issue_template_user_kudos.md` diff --git a/docs/development/release/index.md b/docs/development/release/index.md index 5a104b6..ce82668 100644 --- a/docs/development/release/index.md +++ b/docs/development/release/index.md @@ -3,11 +3,11 @@ The software release has four main goals: 1. Merge the new features to the `production` branch -2. Create a [GitHub Release](https://github.com/rl-institut/super-repository/releases) +2. Create a [GitHub Release](https://github.com/rl-institut/super-repo/releases) 3. Update the documentation 4. Publish a new version of the package at PyPI -The πŸ“ [RELEASE_PROCEDURE.md](https://github.com/rl-institut/super-repository/blob/production/RELEASE_PROCEDURE.md) +The πŸ“ [RELEASE_PROCEDURE.md](https://github.com/rl-institut/super-repo/blob/production/RELEASE_PROCEDURE.md) contain detailed instructions to do a release. ## Automated Versioning with Bumpversion diff --git a/docs/index.md b/docs/index.md index 58cf81b..a52accc 100644 --- a/docs/index.md +++ b/docs/index.md @@ -20,15 +20,15 @@ The documentation is separated into two main sections: Files and structures related to collaborative development, community processes, and documentation. -- [Collaboration](https://rl-institut.github.io/super-repository/develop/development/collaboration/) -- [Best-Practices](https://rl-institut.github.io/super-repository/develop/development/best-practice/) -- [Documentation](https://rl-institut.github.io/super-repository/develop/development/documentation/) -- [Release](https://rl-institut.github.io/super-repository/develop/development/release/) +- [Collaboration](https://rl-institut.github.io/super-repo/develop/development/collaboration/) +- [Best-Practices](https://rl-institut.github.io/super-repo/develop/development/best-practice/) +- [Documentation](https://rl-institut.github.io/super-repo/develop/development/documentation/) +- [Release](https://rl-institut.github.io/super-repo/develop/development/release/) ### Fields for code documentation Methods and functions of the module. -- [Install](https://rl-institut.github.io/super-repository/develop/user_documentation/install/) -- [Functions](https://rl-institut.github.io/super-repository/develop/user_documentation/) -- [Code Example](https://rl-institut.github.io/super-repository/develop/user_documentation/code_example/) +- [Install](https://rl-institut.github.io/super-repo/develop/user_documentation/install/) +- [Functions](https://rl-institut.github.io/super-repo/develop/user_documentation/) +- [Code Example](https://rl-institut.github.io/super-repo/develop/user_documentation/code_example/) From fad2f04b715be1cf41b0aac4eaa65f890e39138c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 20:40:46 +0100 Subject: [PATCH 14/30] Update tox workflow #24 --- .github/workflows/codecov.yml | 4 ++-- .github/workflows/{automated-testing.yml => tox.yml} | 5 ++--- CONTRIBUTING.md | 1 + README.rst | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) rename .github/workflows/{automated-testing.yml => tox.yml} (93%) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index cd23f33..d9b5e38 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -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 @@ -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 diff --git a/.github/workflows/automated-testing.yml b/.github/workflows/tox.yml similarity index 93% rename from .github/workflows/automated-testing.yml rename to .github/workflows/tox.yml index 2527af7..767c770 100644 --- a/.github/workflows/automated-testing.yml +++ b/.github/workflows/tox.yml @@ -2,7 +2,7 @@ # SPDX-FileCopyrightText: 2023 Jonas Huber Β© Reiner Lemoine Institut # SPDX-License-Identifier: MIT -name: automated-testing +name: tox on: push: @@ -13,7 +13,6 @@ on: jobs: test: strategy: - # fail-fast: false matrix: platform: [ubuntu-latest, windows-latest] python-version: ['3.10'] @@ -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 tests run: tox -e ${{ matrix.tox-envs }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6639026..aa115a6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/README.rst b/README.rst index c59fcf4..8f93525 100644 --- a/README.rst +++ b/README.rst @@ -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 @@ -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 From 8168758f8a846f24562e44d8acea705520e00042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 20:45:17 +0100 Subject: [PATCH 15/30] Update changelog and fix import #24 --- .github/workflows/publish_testpypi.yml | 1 + CHANGELOG.md | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/publish_testpypi.yml b/.github/workflows/publish_testpypi.yml index b0812d1..ab2ee12 100644 --- a/.github/workflows/publish_testpypi.yml +++ b/.github/workflows/publish_testpypi.yml @@ -26,6 +26,7 @@ jobs: python -m pip install build + uv --user - name: Build a binary wheel and a source tarball run: >- diff --git a/CHANGELOG.md b/CHANGELOG.md index 395e7bb..e884039 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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 From 244f2551453e83bbecb0c99a895731105a0d0e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 20:46:46 +0100 Subject: [PATCH 16/30] Fix uv workflow #24 --- .github/workflows/publish_testpypi.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/publish_testpypi.yml b/.github/workflows/publish_testpypi.yml index ab2ee12..826bf19 100644 --- a/.github/workflows/publish_testpypi.yml +++ b/.github/workflows/publish_testpypi.yml @@ -32,7 +32,6 @@ jobs: run: >- python -m uv build - ls dist/ - name: Publish distribution to Test PyPI run: >- uv publish From 4df73c6c3c145ac854e8450c6d41ae8bbad4c826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 21:56:42 +0100 Subject: [PATCH 17/30] Update pypi test action #24 --- .github/workflows/publish_testpypi.yml | 16 ++++++++++------ requirements.txt | 5 ++++- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish_testpypi.yml b/.github/workflows/publish_testpypi.yml index 826bf19..548162c 100644 --- a/.github/workflows/publish_testpypi.yml +++ b/.github/workflows/publish_testpypi.yml @@ -21,17 +21,21 @@ jobs: with: python-version: "3.10" - - name: Install + - name: Install pypa/build run: >- python -m pip install build - uv --user - - name: Build a binary wheel and a source tarball + - name: Build binary wheel and source tarball run: >- python -m - uv build + build + --sdist + --wheel + --outdir dist/ - name: Publish distribution to Test PyPI - run: >- - uv publish + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_TEST }} + repository_url: https://test.pypi.org/legacy/ diff --git a/requirements.txt b/requirements.txt index 7e74a6a..637e0ed 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,15 +2,18 @@ # SPDX-FileCopyrightText: 2023 Jonas Huber Β© Reiner Lemoine Institut # SPDX-License-Identifier: MIT +build bump-my-version +mike mkdocs mkdocs-material mkdocstrings mkdocstrings-python-legacy -mike pre-commit pytest pytest-cov ruff tox +twine uv +wheel From e31195ab2dff385ab7d17ed305d041ac89555a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 21:59:46 +0100 Subject: [PATCH 18/30] Update pypi test action #24 --- .github/workflows/publish_testpypi.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish_testpypi.yml b/.github/workflows/publish_testpypi.yml index 548162c..e8f1ef6 100644 --- a/.github/workflows/publish_testpypi.yml +++ b/.github/workflows/publish_testpypi.yml @@ -31,9 +31,9 @@ jobs: run: >- python -m build - --sdist - --wheel - --outdir dist/ + --sdist + --wheel + --outdir dist/ - name: Publish distribution to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: From 020ad03e05950861446c633018ce3519fcf903ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 22:04:15 +0100 Subject: [PATCH 19/30] Update bumpversion docs #24 --- docs/development/release/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/release/index.md b/docs/development/release/index.md index ce82668..d201a9f 100644 --- a/docs/development/release/index.md +++ b/docs/development/release/index.md @@ -26,7 +26,7 @@ Test bumpversion:
πŸ’» `bump-my-version bump minor --dry-run -vv` Sandbox bump Use bumpversion:
- πŸ’» `bump-my-version --current-version 0.2.0 mino`
Run bumpversion + πŸ’» `bump-my-version bump --current-version 0.2.0 minor`
Run bumpversion πŸ’  `git commit file -am "Bumpversion #IssueNr"` Commit bumpversion changes !!! note "Used Icons" From 4f182ce4b608f472bb65ca4e9912b6051b8ce996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 22:04:26 +0100 Subject: [PATCH 20/30] =?UTF-8?q?Bump=20version:=200.2.0=20=E2=86=92=200.3?= =?UTF-8?q?.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.toml | 2 +- CITATION.cff | 2 +- pyproject.toml | 2 +- uv.lock | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.bumpversion.toml b/.bumpversion.toml index 5c34aba..27ae531 100644 --- a/.bumpversion.toml +++ b/.bumpversion.toml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MIT [tool.bumpversion] -current_version = "0.2.0" +current_version = "0.3.0" parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)" serialize = ["{major}.{minor}.{patch}"] search = "{current_version}" diff --git a/CITATION.cff b/CITATION.cff index a35af5c..7966e3f 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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/" diff --git a/pyproject.toml b/pyproject.toml index 29b112c..8a81b64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ requires = ["flit_core >=3.8.0,<4"] [project] name = "super-repo" -version = "0.2.0" +version = "0.3.0" authors = [ {name = "Ludwig HΓΌlk", email = "datenzentrum@rl-institut.de"}] description = "A template repo for research software." diff --git a/uv.lock b/uv.lock index 3c829eb..c229f30 100644 --- a/uv.lock +++ b/uv.lock @@ -12,7 +12,7 @@ sdist = { url = "https://files.pythonhosted.org/packages/f3/1f/1241aa3d66e8dc161 [[package]] name = "super-repo" -version = "0.2.0" +version = "0.3.0" source = { editable = "." } dependencies = [ { name = "stringcase" }, From 7b217d19e8eb44cb3f6fe168b1c681e7f29f5b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 22:28:10 +0100 Subject: [PATCH 21/30] Fix workflow #24 --- .github/workflows/publish_testpypi.yml | 2 +- docs/development/release/index.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish_testpypi.yml b/.github/workflows/publish_testpypi.yml index e8f1ef6..4b3c11b 100644 --- a/.github/workflows/publish_testpypi.yml +++ b/.github/workflows/publish_testpypi.yml @@ -38,4 +38,4 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_TEST }} - repository_url: https://test.pypi.org/legacy/ + repository-url: https://test.pypi.org/legacy/ diff --git a/docs/development/release/index.md b/docs/development/release/index.md index d201a9f..a2895cf 100644 --- a/docs/development/release/index.md +++ b/docs/development/release/index.md @@ -27,7 +27,7 @@ Test bumpversion:
Use bumpversion:
πŸ’» `bump-my-version bump --current-version 0.2.0 minor`
Run bumpversion - πŸ’  `git commit file -am "Bumpversion #IssueNr"` Commit bumpversion changes + πŸ’  `git push` Push bumpversion changes !!! note "Used Icons" πŸ™ GitHub | πŸ’  git | πŸ“ File | πŸ’» Command Line From cca95e5733a706c0e69844e7b679f93f36d0f03f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 22:48:31 +0100 Subject: [PATCH 22/30] Test PyPI #24 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8a81b64..9aad0fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ dependencies = [ license = {text = "MIT"} [project.urls] -Homepage = "https://github.com/rl-institut/super-repo" +Source = "https://github.com/rl-institut/super-repo" Documentation = "https://rl-institut.github.io/super-repo/latest/" Changelog = "https://github.com/rl-institut/super-repo/blob/production/CHANGELOG.md" "Issue Tracker" = "https://github.com/rl-institut/super-repo/issues" From 223dc5072c588bad8f21112f3aaee5c787e1a58e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 23:05:55 +0100 Subject: [PATCH 23/30] Test PyPI #24 --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9aad0fe..5544b97 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,10 +17,6 @@ requires-python = ">=3.10" classifiers = [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", - "Topic :: Scientific/Engineering", - "Topic :: Software Development", - "Intended Audience :: Science/Research", - "Intended Audience :: Developers", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3", From 4b53823b362485c595f3c3c9fe3779b71ec61133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 23:16:12 +0100 Subject: [PATCH 24/30] Test PyPI #24 --- .github/workflows/publish_testpypi.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish_testpypi.yml b/.github/workflows/publish_testpypi.yml index 4b3c11b..5a38cb5 100644 --- a/.github/workflows/publish_testpypi.yml +++ b/.github/workflows/publish_testpypi.yml @@ -33,9 +33,10 @@ jobs: build --sdist --wheel - --outdir dist/ +# --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/ + repository-url: + verbose: true From b6bee5a02245967b16efcf7f467c3851e2bb9102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 23:23:31 +0100 Subject: [PATCH 25/30] Test PyPI #24 --- .github/workflows/publish_testpypi.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish_testpypi.yml b/.github/workflows/publish_testpypi.yml index 5a38cb5..f68dd64 100644 --- a/.github/workflows/publish_testpypi.yml +++ b/.github/workflows/publish_testpypi.yml @@ -16,20 +16,19 @@ jobs: environment: pypi-publish steps: - uses: actions/checkout@master - - name: Set up Python 3.10 - uses: actions/setup-python@v3 + - name: Set up Python + uses: actions/setup-python@v5 with: python-version: "3.10" - - name: Install pypa/build run: >- - python -m + python3 -m pip install build --user - name: Build binary wheel and source tarball run: >- - python -m + python3 -m build --sdist --wheel @@ -38,5 +37,5 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_TEST }} - repository-url: + repository-url: https://test.pypi.org/legacy/ verbose: true From 05dff27195124c3d162af19c21e660dee43a8546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Fri, 6 Dec 2024 23:43:52 +0100 Subject: [PATCH 26/30] Rename src #24 --- .github/workflows/publish_testpypi.yml | 5 +++++ .pre-commit-config.yaml | 2 +- REUSE.toml | 2 +- docs/development/best-practice/continuous_integration.md | 2 +- docs/user_documentation/code_example.md | 4 ++-- {super_repo => src}/__init__.py | 0 {super_repo => src}/example.json | 0 {super_repo => src}/example_calculator.py | 0 {super_repo => src}/example_google.py | 3 +-- tests/test_example.py | 2 +- tox.ini | 4 ++-- 11 files changed, 14 insertions(+), 10 deletions(-) rename {super_repo => src}/__init__.py (100%) rename {super_repo => src}/example.json (100%) rename {super_repo => src}/example_calculator.py (100%) rename {super_repo => src}/example_google.py (99%) diff --git a/.github/workflows/publish_testpypi.yml b/.github/workflows/publish_testpypi.yml index f68dd64..65df4d0 100644 --- a/.github/workflows/publish_testpypi.yml +++ b/.github/workflows/publish_testpypi.yml @@ -33,6 +33,11 @@ jobs: --sdist --wheel # --outdir dist/ + - name: Store the distribution packages + uses: actions/upload-artifact@v4 + with: + name: python-package-distributions + path: dist/ - name: Publish distribution to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0d2074e..dd7ecbd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ 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 diff --git a/REUSE.toml b/REUSE.toml index 7f09365..4fce508 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -28,7 +28,7 @@ SPDX-FileCopyrightText = "2023 Ludwig HΓΌlk Β© Reiner SPDX-License-Identifier = "CC0-1.0" [[annotations]] -path = "super_repo/example.json" +path = "src/example.json" precedence = "override" SPDX-FileCopyrightText = "2023 Ludwig HΓΌlk Β© Reiner Lemoine Institut" SPDX-License-Identifier = "CC0-1.0" diff --git a/docs/development/best-practice/continuous_integration.md b/docs/development/best-practice/continuous_integration.md index 3094e51..6765ec8 100644 --- a/docs/development/best-practice/continuous_integration.md +++ b/docs/development/best-practice/continuous_integration.md @@ -103,7 +103,7 @@ reproducible, and scalable testing workflows. ### Examples The file πŸ“ `tests/test_example.py` contains basic examples for the functions in
-πŸ“ `super_repo/test_calculator.py`. +πŸ“ `src/test_calculator.py`. In Python, the `assert` statement is used to test if a condition is true.
If the condition is false, an AssertionError is raised, indicating the test failed. diff --git a/docs/user_documentation/code_example.md b/docs/user_documentation/code_example.md index b8ba156..bbe3693 100644 --- a/docs/user_documentation/code_example.md +++ b/docs/user_documentation/code_example.md @@ -2,6 +2,6 @@ !!! note "About the example" Below you see the rendered version of the example module - `super_repo\example_google.py` + `src\example_google.py` -::: super_repo.example_google +::: src.example_google diff --git a/super_repo/__init__.py b/src/__init__.py similarity index 100% rename from super_repo/__init__.py rename to src/__init__.py diff --git a/super_repo/example.json b/src/example.json similarity index 100% rename from super_repo/example.json rename to src/example.json diff --git a/super_repo/example_calculator.py b/src/example_calculator.py similarity index 100% rename from super_repo/example_calculator.py rename to src/example_calculator.py diff --git a/super_repo/example_google.py b/src/example_google.py similarity index 99% rename from super_repo/example_google.py rename to src/example_google.py index a70b560..f646f1a 100644 --- a/super_repo/example_google.py +++ b/src/example_google.py @@ -1,5 +1,4 @@ -""" -Example Google style docstrings. +"""Example Google style docstrings. SPDX-FileCopyrightText: Copyright (c) 2007-2023 by the Sphinx team SPDX-License-Identifier: BSD-2-Clause diff --git a/tests/test_example.py b/tests/test_example.py index cae7c78..2cdbeb4 100644 --- a/tests/test_example.py +++ b/tests/test_example.py @@ -10,7 +10,7 @@ from pytest import raises -from super_repo.example_calculator import add, divide, multiply, subtract +from src.example_calculator import add, divide, multiply, subtract def test_addition(): diff --git a/tox.ini b/tox.ini index d40e04d..5db2c85 100644 --- a/tox.ini +++ b/tox.ini @@ -60,8 +60,8 @@ deps = ruff skip_install = true commands = - ruff format --check --diff {posargs:super_repo tests} - ruff check --diff {posargs:super_repo tests docs} + ruff format --check --diff {posargs:src tests} + ruff check --diff {posargs:src tests docs} [tool:pytest] # If a pytest section is found in one of the possible config files From abbf8c1cb7a6c510f909685928f4c16e4b928a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Sat, 7 Dec 2024 00:25:34 +0100 Subject: [PATCH 27/30] Rename src #24 --- .github/workflows/tox.yml | 2 +- .pre-commit-config.yaml | 2 +- CHANGELOG.md | 2 +- REUSE.toml | 2 +- docs/development/best-practice/continuous_integration.md | 2 +- docs/user_documentation/code_example.md | 4 ++-- pyproject.toml | 3 +-- {src => super_repo}/__init__.py | 0 {src => super_repo}/example.json | 0 {src => super_repo}/example_calculator.py | 0 {src => super_repo}/example_google.py | 0 {tests => test}/__init__.py | 2 +- {tests => test}/test_example.py | 2 +- tox.ini | 4 ++-- 14 files changed, 12 insertions(+), 13 deletions(-) rename {src => super_repo}/__init__.py (100%) rename {src => super_repo}/example.json (100%) rename {src => super_repo}/example_calculator.py (100%) rename {src => super_repo}/example_google.py (100%) rename {tests => test}/__init__.py (94%) rename {tests => test}/test_example.py (93%) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 767c770..4fdb1e5 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -38,5 +38,5 @@ jobs: python -m pip install --upgrade pip setuptools wheel pip install tox tox-gh-actions - - name: Run tox unit tests + - name: Run tox unit test run: tox -e ${{ matrix.tox-envs }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dd7ecbd..8ca1713 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index e884039..3897d30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -96,7 +96,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed -- Remove the `src` folder [(#26)](https://github.com/rl-institut/super-repo/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 diff --git a/REUSE.toml b/REUSE.toml index 4fce508..7f09365 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -28,7 +28,7 @@ SPDX-FileCopyrightText = "2023 Ludwig HΓΌlk Β© Reiner SPDX-License-Identifier = "CC0-1.0" [[annotations]] -path = "src/example.json" +path = "super_repo/example.json" precedence = "override" SPDX-FileCopyrightText = "2023 Ludwig HΓΌlk Β© Reiner Lemoine Institut" SPDX-License-Identifier = "CC0-1.0" diff --git a/docs/development/best-practice/continuous_integration.md b/docs/development/best-practice/continuous_integration.md index 6765ec8..3094e51 100644 --- a/docs/development/best-practice/continuous_integration.md +++ b/docs/development/best-practice/continuous_integration.md @@ -103,7 +103,7 @@ reproducible, and scalable testing workflows. ### Examples The file πŸ“ `tests/test_example.py` contains basic examples for the functions in
-πŸ“ `src/test_calculator.py`. +πŸ“ `super_repo/test_calculator.py`. In Python, the `assert` statement is used to test if a condition is true.
If the condition is false, an AssertionError is raised, indicating the test failed. diff --git a/docs/user_documentation/code_example.md b/docs/user_documentation/code_example.md index bbe3693..b8ba156 100644 --- a/docs/user_documentation/code_example.md +++ b/docs/user_documentation/code_example.md @@ -2,6 +2,6 @@ !!! note "About the example" Below you see the rendered version of the example module - `src\example_google.py` + `super_repo\example_google.py` -::: src.example_google +::: super_repo.example_google diff --git a/pyproject.toml b/pyproject.toml index 5544b97..c36a327 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,10 +28,9 @@ dependencies = [ license = {text = "MIT"} [project.urls] +Homepage = "https://github.com/rl-institut/super-repo" Source = "https://github.com/rl-institut/super-repo" Documentation = "https://rl-institut.github.io/super-repo/latest/" -Changelog = "https://github.com/rl-institut/super-repo/blob/production/CHANGELOG.md" -"Issue Tracker" = "https://github.com/rl-institut/super-repo/issues" lint = [ "ruff", diff --git a/src/__init__.py b/super_repo/__init__.py similarity index 100% rename from src/__init__.py rename to super_repo/__init__.py diff --git a/src/example.json b/super_repo/example.json similarity index 100% rename from src/example.json rename to super_repo/example.json diff --git a/src/example_calculator.py b/super_repo/example_calculator.py similarity index 100% rename from src/example_calculator.py rename to super_repo/example_calculator.py diff --git a/src/example_google.py b/super_repo/example_google.py similarity index 100% rename from src/example_google.py rename to super_repo/example_google.py diff --git a/tests/__init__.py b/test/__init__.py similarity index 94% rename from tests/__init__.py rename to test/__init__.py index 4f6dc76..cd2a32a 100644 --- a/tests/__init__.py +++ b/test/__init__.py @@ -1,4 +1,4 @@ -"""Example tests +"""Example test Examples test for the calculater functionality. diff --git a/tests/test_example.py b/test/test_example.py similarity index 93% rename from tests/test_example.py rename to test/test_example.py index 2cdbeb4..cae7c78 100644 --- a/tests/test_example.py +++ b/test/test_example.py @@ -10,7 +10,7 @@ from pytest import raises -from src.example_calculator import add, divide, multiply, subtract +from super_repo.example_calculator import add, divide, multiply, subtract def test_addition(): diff --git a/tox.ini b/tox.ini index 5db2c85..d40e04d 100644 --- a/tox.ini +++ b/tox.ini @@ -60,8 +60,8 @@ deps = ruff skip_install = true commands = - ruff format --check --diff {posargs:src tests} - ruff check --diff {posargs:src tests docs} + ruff format --check --diff {posargs:super_repo tests} + ruff check --diff {posargs:super_repo tests docs} [tool:pytest] # If a pytest section is found in one of the possible config files From 950d57f19f29b7c8bbba5e527d8dcc2c2923032c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Sat, 7 Dec 2024 00:35:30 +0100 Subject: [PATCH 28/30] Rename test #24 --- docs/development/best-practice/continuous_integration.md | 4 ++-- docs/development/best-practice/test_driven_development.md | 2 +- tox.ini | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/development/best-practice/continuous_integration.md b/docs/development/best-practice/continuous_integration.md index 3094e51..7d35f94 100644 --- a/docs/development/best-practice/continuous_integration.md +++ b/docs/development/best-practice/continuous_integration.md @@ -51,7 +51,7 @@ Install the required package in a python environment.
## Adding and Managing Tests -New tests should be placed in the πŸ“ `tests/` directory. For example: +New tests should be placed in the πŸ“ `test/` directory. For example: - Add a test to validate new functionality. - Use `pytest` for unit tests, or extend πŸ“ `tox.ini` for additional test configurations. @@ -102,7 +102,7 @@ reproducible, and scalable testing workflows. ### Examples -The file πŸ“ `tests/test_example.py` contains basic examples for the functions in
+The file πŸ“ `test/test_example.py` contains basic examples for the functions in
πŸ“ `super_repo/test_calculator.py`. In Python, the `assert` statement is used to test if a condition is true.
diff --git a/docs/development/best-practice/test_driven_development.md b/docs/development/best-practice/test_driven_development.md index 94b61d6..1214a84 100644 --- a/docs/development/best-practice/test_driven_development.md +++ b/docs/development/best-practice/test_driven_development.md @@ -75,7 +75,7 @@ Begin by writing a test for the functionality you intend to implement. For example, if you need to create a view that returns a list of objects from the database, and a corresponding model to represent the database table, your test might look like this:
- πŸ“ `app/tests/my_test.py`: + πŸ“ `app/test/my_test.py`: ```python from django.test import TestCase diff --git a/tox.ini b/tox.ini index d40e04d..18cd4cd 100644 --- a/tox.ini +++ b/tox.ini @@ -25,7 +25,7 @@ passenv = * # configures the unittest environment for python 3.6 [testenv:test] setenv = - PYTHONPATH={toxinidir}/tests + PYTHONPATH={toxinidir}/test PYTHONUNBUFFERED=yes usedevelop = true # installs dependencies we need for testing @@ -60,8 +60,8 @@ deps = ruff skip_install = true commands = - ruff format --check --diff {posargs:super_repo tests} - ruff check --diff {posargs:super_repo tests docs} + ruff format --check --diff {posargs:super_repo test} + ruff check --diff {posargs:super_repo test docs} [tool:pytest] # If a pytest section is found in one of the possible config files @@ -82,4 +82,4 @@ python_files = # --doctest-glob=\*.rst # --tb=short testpaths = - tests + test From 20fcf6a4fb476223d8cf7c1e3a15a55fdcec5dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Mon, 9 Dec 2024 11:12:38 +0100 Subject: [PATCH 29/30] Update pyproject #24 --- .github/workflows/publish_testpypi.yml | 7 +------ pyproject.toml | 3 ++- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish_testpypi.yml b/.github/workflows/publish_testpypi.yml index 65df4d0..83c4ffe 100644 --- a/.github/workflows/publish_testpypi.yml +++ b/.github/workflows/publish_testpypi.yml @@ -32,12 +32,7 @@ jobs: build --sdist --wheel -# --outdir dist/ - - name: Store the distribution packages - uses: actions/upload-artifact@v4 - with: - name: python-package-distributions - path: dist/ + --outdir dist/ - name: Publish distribution to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: diff --git a/pyproject.toml b/pyproject.toml index c36a327..1edb19b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,7 @@ authors = [ {name = "Ludwig HΓΌlk", email = "datenzentrum@rl-institut.de"}] description = "A template repo for research software." readme = "README.rst" +license = {file = "LICENSE.txt"} requires-python = ">=3.10" classifiers = [ "Development Status :: 4 - Beta", @@ -25,7 +26,7 @@ classifiers = [ dependencies = [ "stringcase ~=1.2.0", ] -license = {text = "MIT"} + [project.urls] Homepage = "https://github.com/rl-institut/super-repo" From 6ce480047762e58882dcefab87df1e5af06adf43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludwig=20H=C3=BClk?= Date: Mon, 9 Dec 2024 11:40:26 +0100 Subject: [PATCH 30/30] Update pyproject #24 --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1edb19b..285632b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,10 +33,6 @@ Homepage = "https://github.com/rl-institut/super-repo" Source = "https://github.com/rl-institut/super-repo" Documentation = "https://rl-institut.github.io/super-repo/latest/" -lint = [ - "ruff", -] - [tool.ruff] builtins = ["ellipsis"] target-version = "py38"