Contributing
Requirements
ridbPy uses Poetry to manage its Python environment.
To get started first install poetry
:
pipx install poetry
pipx is preferred, but you can also install with pip install --user
.
Coding
ridbPy makes use of a couple tools to help with contributing via
pre-commit. pre-commit
is a tool to manage git-hooks scripts, which are useful
for identifying simple issues before submission to code review.
pipx install pre-commit
pre-commit install
Running
Run the command-line interface from the source tree:
poetry install
poetry run ridbpy
Run an interactive Python session:
poetry install
poetry run python
Testing
tox is a tool to standardize and manage testing and routines using Python virtual environments
ridbPy
’s instance oftox
runs Python unit tests, and uses tools like mypy and flake8 to format.To run all
tox
tests (which get run as part of GitHub Actions) locally, just entertox
into your command line or use poetry.
Run the Full Test Suite:
poetry run tox
Run Just One Testing Tool:
poetry run tox -e mypy
Releasing
Releases are triggered entirely by CI/CD via Pull requests being merged into the main branch.
The version bump on each release is decided by the labels placed on the Pull Requests.
There must be one, and only one, of the following labels on each pull request to the main branch:
BUMP_MAJOR
, BUMP_MINOR
, BUMP_PATCH
. Pull Requests will be un-mergeable unless the version on
your pyproject.toml
matches the main branch and the proper version labels are applied.
The Release workflow performs the following automated steps:
Publish a GitHub Release.
Apply a version tag to the repository.
Release notes are populated with the titles and authors of merged pull requests. You can group the pull requests into separate sections by applying labels to them, like this:
Pull Request Label |
Section in Release Notes |
---|---|
|
💥 Breaking Changes |
|
🚀 Features |
|
🔥 Removals and Deprecations |
|
🐞 Fixes |
|
🐎 Performance |
|
🚨 Testing |
|
👷 Continuous Integration |
|
📚 Documentation |
|
🔨 Refactoring |
|
💄 Style |
|
📦 Dependencies |