Skip to content

Commit

Permalink
Update release process (#534)
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrodmillman committed Mar 22, 2024
1 parent aaafe13 commit fd451ec
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 33 deletions.
40 changes: 27 additions & 13 deletions RELEASE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,36 @@ Introduction

Example ``__version__``

- 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.8rc0.dev0 # development version of 1.8 (first release candidate)
- 1.8rc0 # 1.8 release candidate 1
- 1.8rc1.dev0 # development version of 1.8 (second release candidate)
- 1.8 # 1.8 release
- 1.9.dev0 # development version of 1.9 (release candidate 1)
- 1.9rc0.dev0 # development version of 1.9 (first release candidate)

Test release candidates on numpy, scipy, matplotlib, scikit-image, and networkx.

Process
-------

- Review and update ``doc/release_notes.rst``.
- Set release variables::

export VERSION=<version number>
export PREVIOUS=<previous version number>
export ORG="numpy"
export REPO="numpydoc"
export LOG="doc/release/notes.rst"

- Autogenerate release notes::

changelist ${ORG}/${REPO} v${PREVIOUS} main --version ${VERSION} --config pyproject.toml --format rst --out ${VERSION}.rst
changelist ${ORG}/${REPO} v${PREVIOUS} main --version ${VERSION} --config pyproject.toml --out ${VERSION}.md
cat ${VERSION}.rst | cat - ${LOG} > temp && mv temp ${LOG} && rm ${VERSION}.rst

- Update ``__version__`` in ``numpydoc/_version.py``.

- Commit changes::

git add numpydoc/_version.py doc/release_notes.rst
git add numpydoc/_version.py ${LOG}
git commit -m 'Designate <version> release'

- Add the version number (e.g., `v1.2.0`) as a tag in git::
Expand All @@ -39,16 +51,18 @@ Process

where ``origin`` is the name of the ``github.com:numpy/numpydoc`` repository

- Review the github release page::
- Create release from tag::

- go to https://github.com/numpy/numpydoc/releases/new?tag=v${VERSION}
- add v${VERSION} for the `Release title`
- paste contents (or upload) of ${VERSION}.md in the `Describe this release section`
- if pre-release check the box labelled `Set as a pre-release`

https://github.com/numpy/numpydoc/releases

- Publish on PyPi::
- Update https://github.com/numpy/numpydoc/milestones::

git clean -fxd
pip install --upgrade build wheel twine
python -m build --sdist --wheel
twine upload -s dist/*
- close old milestone
- ensure new milestone exists (perhaps setting due date)

- Update ``__version__`` in ``numpydoc/_version.py``.

Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ Sphinx, and adds the code description directives ``np:function``,
install
format
validation
release_notes
release/index
example
12 changes: 12 additions & 0 deletions doc/release/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Release notes
=============

.. toctree::
:maxdepth: 2

old

.. note::

For release notes (sparsely) kept prior to 1.0.0, look at the `releases page
on GitHub <https://github.com/numpy/numpydoc/releases>`__.
19 changes: 0 additions & 19 deletions doc/release_notes.rst → doc/release/old.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
Release notes
=============

.. roughly following https://sphinx-gallery.github.io/dev/maintainers.html,
.. 1.0.0 notes were generated by:
.. 1. tagging PRs as enhancement/bug/removed
.. 2. $ github_changelog_generator -u numpy -p numpydoc --since-tag=v0.9.2
.. 3. $ pandoc CHANGELOG.md --wrap=none -o release_notes.rst
.. 4. adding a manual addition (CSS note), tweaking heading levels, adding TOC
.. contents:: Page contents
:local:
:depth: 2

.. note::

For release notes (sparsely) kept prior to 1.0.0, look at the `releases page
on GitHub <https://github.com/numpy/numpydoc/releases>`__.

1.6.0
-----

Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ test = [
[project.scripts]
validate-docstrings = 'numpydoc.hooks.validate_docstrings:main'

[tool.changelist]
title_template = "{version}"
# Profiles that are excluded from the contributor list.
ignored_user_logins = ["dependabot[bot]", "pre-commit-ci[bot]"]

[tool.setuptools]
include-package-data = false
packages = [
Expand Down

0 comments on commit fd451ec

Please sign in to comment.