Release process
Status: implemented unless marked planned.
How a release happens today
- Land changes on
mainthrough normal commits (CI must be green: ruff, mypy, pytest on 3 OSes x Python 3.10-3.13, plus the clean-venv install smoke test). - Bump
__version__inisoline/__init__.py(single source of truth) and add aCHANGELOG.mdentry. - Create a GitHub release/tag
vX.Y.Zpointing at that commit. publish.ymlruns:- build job: tag must equal the package version; the version must not already exist on PyPI; ruff, tests,
python -m build,twine check. - publish job (environment
pypi): uploads with Trusted Publishing (OIDC) whenPYPI_API_TOKENis unset, otherwise with that secret; then creates the GitHub release assets. - smoke-test job: installs
isoline==X.Y.Zfrom PyPI in a clean venv and runsisoline --version/--help.
Versioning
SemVer. Published versions are immutable: a bad release is fixed by publishing a new patch version (and optionally yanking the bad one on PyPI), never by overwriting or by moving/deleting tags.
| Change | Bump | Extra gate |
|---|---|---|
| Bug fix, docs | patch | none |
| New metric/feature, backwards compatible | minor | none |
| Any change to a financial formula's output | at least minor | must update docs/methodology.md and the hand-computed tests in the same PR; maintainer approval |
| Breaking CLI/API change | major | maintainer approval |
One-time setup (needs the repository owner)
- On PyPI: Manage project -> Publishing -> Add a trusted publisher: owner
shubhwade, repoisoline, workflowpublish.yml, environmentpypi. - On GitHub: Settings -> Environments -> pypi -> Required reviewers = yourself. This is the approval gate: nothing reaches PyPI until you click approve.
- Never put tokens in the repo or in chat. If one is exposed, revoke it on PyPI immediately.
Emergency release-disable switch
Set the repository variable RELEASES_DISABLED to true (Settings -> Secrets and variables -> Actions -> Variables). The build job is skipped, so nothing is published. Set it back to false (or delete it) to resume. To stop an in-flight run, cancel it in the Actions tab or reject the pending pypi environment approval.
Rolling back
PyPI never lets a filename be re-used. Use Yank release on PyPI for the bad version (installs of unpinned isoline skip it), then ship the fixed patch release.
Planned (not implemented)
- Automatic version bump and changelog from Conventional Commits (release-please style) with a release PR. Not enabled because it would open release PRs and tags without the owner having reviewed the policy; adopt once the commit convention is in use.
- Automated detection of "formula changed" via a golden-values test diff.