From ab97686b2ae9b711e9d0eeedf7950640fb3cf7f5 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Fri, 11 Sep 2026 21:32:09 +0000 Subject: [PATCH 1/2] Add release process documentation Adapted from lazy-loader. Add changelist for generating release notes. Assisted-by: claude-code:claude-opus-5 --- RELEASE.md | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 3 ++ 2 files changed, 95 insertions(+) create mode 100644 RELEASE.md diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..0ef3944 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,92 @@ +# Release process for `numpy-financial` + +## Introduction + +Example `version number` + +- 1.8.dev0 # development version of 1.8 (release candidate 1) +- 1.8rc1 # 1.8 release candidate 1 +- 1.8rc2.dev0 # development version of 1.8 release candidate 2 +- 1.8 # 1.8 release +- 1.9.dev0 # development version of 1.9 (release candidate 1) + +Releases are published to PyPI by the `Build Wheel and Release` workflow +(`.github/workflows/release.yml`), which starts when you push a `v*` tag. +It builds the wheels and the sdist, attests them, and uploads them with +PyPI trusted publishing. Do not build or upload artifacts by hand. + +The workflow only runs in the `numpy` organization, and the publish job +uses the `release` GitHub environment. If that environment has required +reviewers, the upload waits for an approval. + +## Process + +- Set release variables: + + export VERSION= + export PREVIOUS= + export ORG="numpy" + export REPO="numpy-financial" + export NOTES="doc/source/_includes/release-notes.rst" + +- Make sure the test suite is green on `main`, for all operating systems + and Python versions in `.github/workflows/pythonpackage.yml`. + +- Write the release notes for ${VERSION} at the top of the version list in + ${NOTES}. To get a list of the merged pull requests since the last + release: + + changelist ${ORG}/${REPO} v${PREVIOUS} main --version ${VERSION} --config pyproject.toml + +- Set the release version. `__version__` in `numpy_financial/__init__.py` + is the only place that holds it; `meson.build` reads it from there at + build time, and the package metadata follows. + +- Commit changes: + + git add numpy_financial/__init__.py ${NOTES} + git commit -m "Designate ${VERSION} release" + +- Tag the release in git: + + git tag -s v${VERSION} -m "signed ${VERSION} tag" + + If you do not have a gpg key, use -u instead; it is important for + Debian packaging that the tags are annotated + +- Push the new meta-data to github: + + git push --tags origin main + + where `origin` is the name of the `github.com:numpy/numpy-financial` + repository + +- Wait for the release workflow to complete, then check that the new + version is on https://pypi.org/project/numpy-financial/ + + - approve the deployment to the `release` environment, if it waits + for a review + - the workflow builds CPython wheels for the versions in + `[tool.cibuildwheel]` in `pyproject.toml`; add the new + interpreter there before you release for it + +- Create release from tag + + - go to https://github.com/numpy/numpy-financial/releases/new?tag=v${VERSION} + - add v${VERSION} for the `Release title` + - paste the ${VERSION} section of ${NOTES} in the `Describe this release section` + - if pre-release check the box labelled `Set as a pre-release` + +- Update https://github.com/numpy/numpy-financial/milestones: + + - close old milestone + - ensure new milestone exists (perhaps setting due date) + +- Set the development version for the next cycle in + `numpy_financial/__init__.py`. + +- Commit changes: + + git add numpy_financial/__init__.py + git commit -m 'Bump version' + git push origin main diff --git a/pyproject.toml b/pyproject.toml index aea7a12..920f8d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -117,6 +117,9 @@ build = "cp313-* cp314-*" skip = "*-musllinux* *_i686 *-win32" test-command = "python -c \"import numpy_financial\"" +[tool.changelist] +ignored_user_logins = ["dependabot[bot]", "pre-commit-ci[bot]"] + [tool.ruff.lint] ignore = ["F403"] select = ["E", "F", "B", "I"] From c656ab8af46a8fa67bfd67981258b7c416325304 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Fri, 11 Sep 2026 14:39:25 -0700 Subject: [PATCH 2/2] Edit release guidelines --- RELEASE.md | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 0ef3944..5a42be4 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -2,7 +2,7 @@ ## Introduction -Example `version number` +Example `version number`, set in `__init__.py`: - 1.8.dev0 # development version of 1.8 (release candidate 1) - 1.8rc1 # 1.8 release candidate 1 @@ -15,10 +15,6 @@ Releases are published to PyPI by the `Build Wheel and Release` workflow It builds the wheels and the sdist, attests them, and uploads them with PyPI trusted publishing. Do not build or upload artifacts by hand. -The workflow only runs in the `numpy` organization, and the publish job -uses the `release` GitHub environment. If that environment has required -reviewers, the upload waits for an approval. - ## Process - Set release variables: @@ -38,13 +34,14 @@ reviewers, the upload waits for an approval. changelist ${ORG}/${REPO} v${PREVIOUS} main --version ${VERSION} --config pyproject.toml -- Set the release version. `__version__` in `numpy_financial/__init__.py` - is the only place that holds it; `meson.build` reads it from there at - build time, and the package metadata follows. +- Set the release version. `__version__` in `numpy_financial/__init__.py`. + +- Ensure that the Python versions you want to build for are updated in + `[tool.cibuildwheel]` in `pyproject.toml`. - Commit changes: - git add numpy_financial/__init__.py ${NOTES} + git add numpy_financial/__init__.py pyproject.toml ${NOTES} git commit -m "Designate ${VERSION} release" - Tag the release in git: @@ -52,7 +49,7 @@ reviewers, the upload waits for an approval. git tag -s v${VERSION} -m "signed ${VERSION} tag" If you do not have a gpg key, use -u instead; it is important for - Debian packaging that the tags are annotated + Debian packaging that the tags are annotated. - Push the new meta-data to github: @@ -64,11 +61,8 @@ reviewers, the upload waits for an approval. - Wait for the release workflow to complete, then check that the new version is on https://pypi.org/project/numpy-financial/ - - approve the deployment to the `release` environment, if it waits - for a review - - the workflow builds CPython wheels for the versions in - `[tool.cibuildwheel]` in `pyproject.toml`; add the new - interpreter there before you release for it + - Approve the deployment to the `release` environment, if it waits + for a review. - Create release from tag