Contributing¶
Setup¶
git clone https://github.com/open-energy-transition/osm-powerplants.git
cd osm-powerplants
pip install -e ".[dev]"
pre-commit install
Workflow¶
Single long-lived branch: main. Features, fixes and docs go in via
pull request from a topic branch.
Code style & tests¶
CI runs lint (ruff check + ruff format --check), docs build, and
the test suite on Python 3.10 / 3.11 / 3.12. All must pass before
merge.
Commit messages¶
Conventional Commits — used as hints for the changelog, not enforced by automation:
feat:new featurefix:bug fixdocs:documentation onlytest:tests onlyrefactor:internal restructuringchore:maintenance / toolingfeat!:orfix!:breaking change
Bug reports¶
Please include:
- Package version (
osm-powerplants --version), Python version, OS - Steps to reproduce
- Expected vs actual behaviour
- Full error traceback
Releasing (maintainers)¶
Release is driven by pushing a vX.Y.Z tag:
- Open a
chore: release X.Y.ZPR that bumps__version__(src/osm_powerplants/__init__.py) andversioninpyproject.toml, and movesCHANGELOG.md'sUnreleasedblock into a dated## [X.Y.Z]section. - Merge the PR.
- Tag the merge commit and push:
- Approve the
pypienvironment deployment in the Actions UI when prompted.
The publish.yml workflow verifies that the tag matches both version
strings, builds the sdist + wheel, publishes to PyPI via Trusted
Publishing, and creates a GitHub Release with the matching CHANGELOG
section as the body.
PyPI Trusted Publishing (one-time)¶
Trusted Publishing is already configured:
- Project:
osm-powerplants - Repository:
open-energy-transition/osm-powerplants - Workflow:
publish.yml - Environment:
pypi(GitHub environment, approval-gated)