Contributing¶
Setup¶
git clone https://github.com/open-energy-transition/osm-powerplants.git
cd osm-powerplants
git checkout dev
pip install -e ".[dev]"
pre-commit install
Branching Strategy¶
main ← stable releases only, tagged (v0.1.0, v0.2.0)
└── dev ← integration branch, PRs target here
├── feature/xyz
├── fix/abc
└── docs/...
- Daily work: Branch from
dev, create PR back todev - Releases: Managed automatically by Release Please
Code Style¶
Pull Request Process¶
- Create branch from
dev:git checkout dev && git checkout -b feature/name - Make changes with tests
- Run:
pre-commit run --all-files - Commit:
git commit -m "feat: add feature" - Push and create PR targeting
dev
Commit Messages¶
Follow Conventional Commits:
feat:New feature (bumps minor version)fix:Bug fix (bumps patch version)feat!:orfix!:Breaking change (bumps major version)docs:Documentationtest:Testsrefactor:Refactoringchore:Maintenance
Bug Reports¶
Include: - Version, Python version, OS - Steps to reproduce - Expected vs actual behavior - Error traceback
Releasing¶
Releases are automated via Release Please.
How it works¶
- Conventional commits on
maintrigger Release Please - Release Please creates/updates a "Release PR" with changelog
- Merging the Release PR creates a GitHub release and publishes to PyPI
PyPI Setup (one-time, maintainers only)¶
The package uses Trusted Publishing (OIDC).
- On PyPI, go to project publishing settings
- Add trusted publisher:
- Owner:
open-energy-transition - Repository:
osm-powerplants - Workflow:
release-please.yml - Environment:
pypi - On GitHub, create environment named
pypi(Settings → Environments)