You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/maintainers.rst
+44-80Lines changed: 44 additions & 80 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,99 +15,61 @@ How to make a release
15
15
16
16
.. highlight:: console
17
17
18
-
Check credentials and prerequisites
19
-
-----------------------------------
18
+
1. Update ``CHANGES.rst`` and version in a PR
19
+
---------------------------------------------
20
20
21
-
Sphinx Gallery is `hosted on the pypi repository <https://pypi.org/project/sphinx-gallery/>`_.
22
-
To create a new release of Sphinx Gallery, you need to do these things:
23
-
You should double-check a few things to make sure that you can create
24
-
a new release for Sphinx Gallery.
21
+
1. Use `github_changelog_generator
22
+
<https://github.com/github-changelog-generator/github-changelog-generator#installation>`_ to
23
+
gather all merged pull requests and closed issues during the development
24
+
cycle. You will likely need to `generate a Github token <https://github.com/settings/tokens/new?description=GitHub%20Changelog%20Generator%20token>`_
25
+
as Github only allows 50 unauthenticated requests per hour. In the
26
+
command below ``<version>`` is the current (not development) version of
27
+
the package, e.g., ``0.6.0``. The changelog can generated with the following::
25
28
26
-
1. Ensure that you **registered an account** on `the PyPI index <https://pypi.org/account/register/>`_.
To avoid the need to pass ``--token``, you can use ``export CHANGELOG_GITHUB_TOKEN=<your-40-digit-token>`` instead.
36
32
37
-
Prepare for release
38
-
-------------------
39
-
1. Update ``CHANGES.rst``
33
+
2. Iteratively update PR labels on GitHub and regenerate ``CHANGELOG.md`` so
34
+
that PRs are categorized correctly. The labels we currently use are:
40
35
41
-
1. Use `github_changelog_generator
42
-
<https://github.com/github-changelog-generator/github-changelog-generator#installation>`_ to
43
-
gather all merged pull requests and closed issues during the development
44
-
cycle. You will likely need to `generate a Github token <https://github.com/settings/tokens/new?description=GitHub%20Changelog%20Generator%20token>`_
45
-
as Github only allows 50 unauthenticated requests per hour. In the
46
-
command below ``<version>`` is the current (not development) version of
47
-
the package, e.g., ``0.6.0``. We do this because our failing discipline
48
-
of writing in the CHANGES.rst all relevant changes, this helps our
49
-
memory. It is a good idea to add appropriate labels (e.g., 'BUG') to
50
-
issues and pull requests so they are categorized correctly in the
51
-
CHANGES.rst generated. ::
36
+
``bug``
37
+
For fixed bugs.
38
+
``enhancement``
39
+
For enhancements
40
+
``maintenance``
41
+
For general project maintenance (e.g., CIs)
42
+
``documentation``
43
+
For documentation improvements.
44
+
45
+
Once all PRs land in one of these categories, manually edit CHANGELOG.md to
3. Propagate the relevant changes to `CHANGES.rst <https://github.com/sphinx-gallery/sphinx-gallery/blob/master/CHANGES.rst>`_.
49
+
You can easily convert it RST with pandoc::
54
50
55
-
2. Edit CHANGELOG.md to look reasonable (it will be used later). It's a
56
-
good idea to add labels to issues and pull requests so
57
-
`github_changelog_generator` can correctly categorize them in in the
58
-
CHANGES.rst file generated.
51
+
pandoc CHANGELOG.md --wrap=none -o CHANGELOG.rst
59
52
60
-
3. Propagate the relevant changes to `CHANGES.rst<https://github.com/sphinx-gallery/sphinx-gallery/blob/master/CHANGES.rst>`_.
61
-
You can easily convert it RST with pandoc::
53
+
Then copy just the sections to ``CHANGES.rst``. **Keep ``CHANGELOG.md`` for
54
+
later.**
62
55
63
-
pandoc CHANGELOG.md --wrap=none -o CHANGELOG.rst
56
+
4. Update the version in ``sphinx_gallery/__init__.py``, which should end in
57
+
``.dev0``. You should replace ``.dev0`` with ``0`` to obtain a semantic
58
+
version (e.g., ``0.12.dev0`` to ``0.12.0``).
64
59
65
-
2. Build the docs cleanly
60
+
5. Open a PR with the above **changelog** and **version** changes (along with
61
+
any updates to this ``maintainers.rst`` document!).
66
62
67
-
Make sure to clean all and have a clean build. Double-check visually that
68
-
everything looks right.
63
+
6. Make sure CIs are green.
69
64
70
-
3. Double check CIs
65
+
7. Check that the built documentation looks correct.
71
66
72
-
Make sure CIs are green on the master branch.
67
+
8. Get somebody else to make sure all looks well, and merge this pull request.
73
68
74
-
4. Update version
75
-
76
-
Update the version in ``sphinx_gallery/__init__.py``, which should end in
77
-
``.dev0``. You should remove ``.dev0``, and the numbers that remain will
78
-
become the version for this release.
79
-
80
-
5. Open a Pull Request that contains the two changes we've made above
81
-
82
-
The **version bump** and **the CHANGELOG update** should be in the PR.
83
-
Get somebody else to make sure all looks well, and merge this pull request.
84
-
85
-
Finalize the release
86
-
--------------------
87
-
88
-
1. Create the new release on PyPI
89
-
90
-
* Build a source distribution and an ``any`` wheel::
91
-
92
-
git clean -xdf
93
-
python setup.py sdist bdist_wheel
94
-
95
-
* Check the release::
96
-
97
-
twine check dist/sphinx-gallery-<version>.*
98
-
99
-
``<version>`` should be the release version, e.g., ``0.7.0``, and it
100
-
should check both the source distribution and the wheel.
101
-
102
-
* Upload to PyPI::
103
-
104
-
twine upload dist/*
105
-
106
-
Again, ``<version>`` should be the release version, e.g., ``0.7.0``.
107
-
108
-
* Confirm that the new version of Sphinx Gallery
109
-
`is posted to pypi <https://pypi.org/project/sphinx-gallery/>`_.
69
+
2. Finalize the release
70
+
------------------------
110
71
72
+
1. Make sure CIs are green following the "Release" PR.
111
73
2. Create a new release on GitHub
112
74
113
75
* Go to the `Draft a new release <https://github.com/sphinx-gallery/sphinx-gallery/releases/new>`_ page.
@@ -116,9 +78,11 @@ Finalize the release
116
78
* The **description** should contain the markdown changelog
117
79
you generated above (in the ``CHANGELOG.md`` file).
118
80
* Click **Publish release** when you are done.
81
+
* Confirm that the new version of Sphinx Gallery
82
+
`is posted to PyPI <https://pypi.org/project/sphinx-gallery/#history>`_.
119
83
120
-
3. Now that the releases are complete, we need to switch the "master" branch back into a developer
121
-
mode. Bump the `Sphinx Gallery version number <https://github.com/sphinx-gallery/sphinx-gallery/blob/master/sphinx_gallery/__init__.py>`_
84
+
3. Now that the releases are complete, we need to switch the `master`` branch
85
+
back into a developer mode. Bump the `Sphinx Gallery version number <https://github.com/sphinx-gallery/sphinx-gallery/blob/master/sphinx_gallery/__init__.py>`_
122
86
to the next minor (or major) release and append ``.dev0`` to the end, and make a PR for this change.
123
87
124
88
4. Celebrate! You've just released a new version of Sphinx Gallery!
0 commit comments