Skip to content

Commit fd451ec

Browse files
Update release process (#534)
1 parent aaafe13 commit fd451ec

File tree

5 files changed

+45
-33
lines changed

5 files changed

+45
-33
lines changed

RELEASE.rst

+27-13
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,36 @@ Introduction
66

77
Example ``__version__``
88

9-
- 1.8.dev0 # development version of 1.8 (release candidate 1)
10-
- 1.8rc1 # 1.8 release candidate 1
11-
- 1.8rc2.dev0 # development version of 1.8 (release candidate 2)
9+
- 1.8rc0.dev0 # development version of 1.8 (first release candidate)
10+
- 1.8rc0 # 1.8 release candidate 1
11+
- 1.8rc1.dev0 # development version of 1.8 (second release candidate)
1212
- 1.8 # 1.8 release
13-
- 1.9.dev0 # development version of 1.9 (release candidate 1)
13+
- 1.9rc0.dev0 # development version of 1.9 (first release candidate)
1414

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

1717
Process
1818
-------
1919

20-
- Review and update ``doc/release_notes.rst``.
20+
- Set release variables::
21+
22+
export VERSION=<version number>
23+
export PREVIOUS=<previous version number>
24+
export ORG="numpy"
25+
export REPO="numpydoc"
26+
export LOG="doc/release/notes.rst"
27+
28+
- Autogenerate release notes::
29+
30+
changelist ${ORG}/${REPO} v${PREVIOUS} main --version ${VERSION} --config pyproject.toml --format rst --out ${VERSION}.rst
31+
changelist ${ORG}/${REPO} v${PREVIOUS} main --version ${VERSION} --config pyproject.toml --out ${VERSION}.md
32+
cat ${VERSION}.rst | cat - ${LOG} > temp && mv temp ${LOG} && rm ${VERSION}.rst
2133

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

2436
- Commit changes::
2537

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

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

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

42-
- Review the github release page::
54+
- Create release from tag::
55+
56+
- go to https://github.com/numpy/numpydoc/releases/new?tag=v${VERSION}
57+
- add v${VERSION} for the `Release title`
58+
- paste contents (or upload) of ${VERSION}.md in the `Describe this release section`
59+
- if pre-release check the box labelled `Set as a pre-release`
4360

44-
https://github.com/numpy/numpydoc/releases
4561

46-
- Publish on PyPi::
62+
- Update https://github.com/numpy/numpydoc/milestones::
4763

48-
git clean -fxd
49-
pip install --upgrade build wheel twine
50-
python -m build --sdist --wheel
51-
twine upload -s dist/*
64+
- close old milestone
65+
- ensure new milestone exists (perhaps setting due date)
5266

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

doc/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ Sphinx, and adds the code description directives ``np:function``,
2323
install
2424
format
2525
validation
26-
release_notes
26+
release/index
2727
example

doc/release/index.rst

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Release notes
2+
=============
3+
4+
.. toctree::
5+
:maxdepth: 2
6+
7+
old
8+
9+
.. note::
10+
11+
For release notes (sparsely) kept prior to 1.0.0, look at the `releases page
12+
on GitHub <https://github.com/numpy/numpydoc/releases>`__.

doc/release_notes.rst renamed to doc/release/old.rst

-19
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,3 @@
1-
Release notes
2-
=============
3-
4-
.. roughly following https://sphinx-gallery.github.io/dev/maintainers.html,
5-
.. 1.0.0 notes were generated by:
6-
.. 1. tagging PRs as enhancement/bug/removed
7-
.. 2. $ github_changelog_generator -u numpy -p numpydoc --since-tag=v0.9.2
8-
.. 3. $ pandoc CHANGELOG.md --wrap=none -o release_notes.rst
9-
.. 4. adding a manual addition (CSS note), tweaking heading levels, adding TOC
10-
11-
.. contents:: Page contents
12-
:local:
13-
:depth: 2
14-
15-
.. note::
16-
17-
For release notes (sparsely) kept prior to 1.0.0, look at the `releases page
18-
on GitHub <https://github.com/numpy/numpydoc/releases>`__.
19-
201
1.6.0
212
-----
223

pyproject.toml

+5
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ test = [
6262
[project.scripts]
6363
validate-docstrings = 'numpydoc.hooks.validate_docstrings:main'
6464

65+
[tool.changelist]
66+
title_template = "{version}"
67+
# Profiles that are excluded from the contributor list.
68+
ignored_user_logins = ["dependabot[bot]", "pre-commit-ci[bot]"]
69+
6570
[tool.setuptools]
6671
include-package-data = false
6772
packages = [

0 commit comments

Comments
 (0)