PyPI Release Guide
This project is configured for Trusted Publisher uploads from GitHub Actions.
One-time setup
- Create a PyPI project named
gpmappy(and optionally TestPyPI project). - In PyPI project settings, add a Trusted Publisher:
- Owner:
MRCIEU - Repository:
gpmappy - Workflow:
.github/workflows/release.yml - Environment:
pypi - (Optional) Repeat on TestPyPI with environment
testpypi. - In GitHub repository settings, create environments:
pypitestpypi
Pre-release checklist
- Update
pyproject.tomlmetadata: project.versionproject.urls.*(confirm links still point toMRCIEU/gpmappy)- Update
CHANGELOG.md. - Run local checks:
pip install -e ".[dev]"
ruff check .
black --check .
mypy src
pytest
python -m build
twine check dist/*
Publish flow
- TestPyPI (manual):
- Run workflow
Publish - Choose input
repository=testpypi - PyPI:
- Create and push a tag like
v0.1.0 - Workflow auto-builds and publishes to PyPI
- Alternatively run manual dispatch with
repository=pypi
Install test
pip install gpmappy
pip install "gpmappy[dataframe]"