44A guide to making a nibabel release
55***********************************
66
7- A guide for developers who are doing a nibabel release
7+ This is a guide for developers who are doing a nibabel release.
88
99.. _release-tools :
1010
1111Release tools
1212=============
1313
14- There are some release utilities that come with nibabel _ . nibabel should
15- install these as the ``nisext `` package, and the testing stuff is understandably
16- in the ``testers `` module of that package. nibabel has Makefile targets for their
17- use. The relevant targets are::
14+ There are some release utilities that come with nibabel . nibabel should
15+ install these as the ``nisext `` package, and the testing stuff is
16+ understandably in the ``testers `` module of that package. nibabel has
17+ Makefile targets for their use. The relevant targets are::
1818
1919 make check-version-info
2020 make check-files
2121 make sdist-tests
2222
2323The first installs the code from a git archive, from the repository, and for
24- in-place use, and runs the ``get_info() `` function to confirm that installation
25- is working and information parameters are set correctly.
24+ in-place use, and runs the ``get_info() `` function to confirm that
25+ installation is working and information parameters are set correctly.
2626
2727The second (``sdist-tests ``) makes an sdist source distribution archive,
2828installs it to a temporary directory, and runs the tests of that install.
2929
30- If you have a version of nibabel trunk past February 11th 2011, there will also
31- be a functional make target::
32-
33- make bdist-egg-tests
34-
35- This builds an egg (which is a zip file), hatches it (unzips the egg) and runs
36- the tests from the resulting directory.
37-
3830.. _release-checklist :
3931
4032Release checklist
@@ -47,17 +39,17 @@ Release checklist
4739* Review and update the release notes. Review and update the ``Changelog ``
4840 file. Get a partial list of contributors with something like::
4941
50- git log 1.3 .0.. | grep '^Author' | cut -d' ' -f 2- | sort | uniq
42+ git log 2.0 .0.. | grep '^Author' | cut -d' ' -f 2- | sort | uniq
5143
52- where ``1.3 .0 `` was the last release tag name.
44+ where ``2.0 .0 `` was the last release tag name.
5345
54- Then manually go over ``git shortlog 1. 2.0.. `` to make sure the release notes
55- are as complete as possible and that every contributor was recognized.
46+ Then manually go over ``git shortlog 2.0.0.. `` to make sure the release
47+ notes are as complete as possible and that every contributor was recognized.
5648
5749* Look at ``doc/source/index.rst `` and add any authors not yet acknowledged.
5850
59- * Update thanks to authors in ``doc/source/index.rst `` and consider any
60- updates to the ``AUTHOR `` file.
51+ * Update new authors and add thansk in ``doc/source/index.rst `` and consider
52+ any updates to the ``AUTHOR `` file.
6153
6254* Use the opportunity to update the ``.mailmap `` file if there are any
6355 duplicate authors listed from ``git shortlog -nse ``.
@@ -75,26 +67,26 @@ Release checklist
7567
7668* Check the dependencies listed in ``nibabel/info.py `` (e.g.
7769 ``NUMPY_MIN_VERSION ``) and in ``doc/source/installation.rst ``. They should
78- at least match. Do they still hold?
70+ at least match. Do they still hold? Make sure `nibabel on travis `_ is
71+ testing the minimum dependencies specifically.
7972
80- * Do a final check on the `nipy buildbot `_
73+ * Do a final check on the `nipy buildbot `_. Use the ``try_branch.py ``
74+ scheduler available in nibotmi _ to test particular schedulers.
8175
82- * If you have travis-ci _ building set up you might want to push the code in it's
83- current state to a branch that will build, e.g::
76+ * If you have travis-ci _ building set up for your own repo you might want to
77+ push the code in it's current state to a branch that will build, e.g::
8478
8579 git branch -D pre-release-test # in case branch already exists
8680 git co -b pre-release-test
87- git push origin pre-release-test
81+ git push your-github-user pre-release-test -u
8882
8983* Clean::
9084
9185 make distclean
9286
9387* Make sure all tests pass (from the nibabel root directory)::
9488
95- cd ..
9689 nosetests --with-doctest nibabel
97- cd nibabel # back to the root directory
9890
9991* Make sure all tests pass from sdist::
10092
@@ -122,7 +114,8 @@ Release checklist
122114
123115 Missed script files: /Users/mb312/dev_trees/nibabel/bin/nib-dicomfs, /Users/mb312/dev_trees/nibabel/bin/nifti1_diagnose.py
124116
125- Fix ``setup.py `` to carry across any files that should be in the distribution.
117+ Fix ``setup.py `` to carry across any files that should be in the
118+ distribution.
126119
127120* You probably have virtualenvs for different Python versions. Check the
128121 tests pass for different configurations. The long-hand way looks like this::
@@ -143,6 +136,8 @@ Release checklist
143136 make doctest
144137 cd ..
145138
139+ This should also be tested by `nibabel on travis`_.
140+
146141* Check everything compiles without syntax errors::
147142
148143 python -m compileall .
@@ -175,28 +170,28 @@ Release checklist
175170 python setup.py register
176171 python setup.py sdist --formats=gztar,zip upload
177172
178- * Tag the release with tag of form ``1.4 .0 ``::
173+ * Tag the release with tag of form ``2.0 .0 ``::
179174
180- git tag -am 'Fourth main release' 1.4 .0
175+ git tag -am "Something about this release' 2.0 .0
181176
182177* Push the tag and any other changes to trunk with::
183178
184179 git push --tags
185180
186181* Force builds of the win32 and amd64 binaries from the buildbot. Go to pages:
187182
188- * http://nipy.bic.berkeley.edu/builders/nibabel-bdist32
189- * http://nipy.bic.berkeley.edu/builders/nibabel-bdist64
183+ * http://nipy.bic.berkeley.edu/builders/nibabel-bdist32-27
184+ * http://nipy.bic.berkeley.edu/builders/nibabel-bdist32-34
185+ * http://nipy.bic.berkeley.edu/builders/nibabel-bdist64-27
190186
191- For each of these, enter the revision number (e.g. "1.4 .0") in the field
187+ For each of these, enter the revision number (e.g. "2.0 .0") in the field
192188 "Revision to build". Then get the built binaries in:
193189
194- * http://nipy.bic.berkeley.edu/dist-32
195- * http://nipy.bic.berkeley.edu/dist-64
190+ * http://nipy.bic.berkeley.edu/nibabel-dist
196191
197- and upload them to pypi with the admin files interface, or using twine _ .
192+ and upload them to pypi with the admin files interface.
198193
199- If you are already on a windows machine, you could have done the manual
194+ If you are already on a Windows machine, you could have done the manual
200195 command to upload instead: ``python setup.py bdist_wininst upload ``.
201196
202197* Now the version number is OK, push the docs to sourceforge with::
@@ -213,35 +208,37 @@ Release checklist
213208
214209 * Branch to maintenance::
215210
216- git co -b maint/1 .0.x
211+ git co -b maint/2 .0.x
217212
218213 Set ``_version_extra`` back to ``.dev`` and bump ``_version_micro`` by 1.
219- Thus the maintenance series will have version numbers like - say - '1.0.1.dev'
220- until the next maintenance release - say '1 .0.1'. Commit. Don't forget to
221- push upstream with something like::
214+ Thus the maintenance series will have version numbers like - say -
215+ '2.0.1.dev' until the next maintenance release - say '2 .0.1'. Commit.
216+ Don't forget to push upstream with something like::
222217
223- git push upstream maint/1 .0.0 --set-upstream
218+ git push upstream-remote maint/2 .0.x --set-upstream
224219
225220 * Start next development series::
226221
227222 git co main-master
228223
229- then restore ``.dev`` to ``_version_extra``, and bump ``_version_minor`` by 1.
230- Thus the development series ('trunk') will have a version number here of
231- '1.1.0.dev' and the next full release will be '1.1.0'.
224+ then restore ``.dev`` to ``_version_extra``, and bump ``_version_minor``
225+ by 1. Thus the development series ('trunk') will have a version number
226+ here of '2.1.0.dev' and the next full release will be '2.1.0'.
227+
228+ Next merge the maintenace branch with the "ours" strategy. This just
229+ labels the maintenance `info.py` edits as seen but discarded, so we can
230+ merge from maintenance in future without getting spurious merge
231+ conflicts::
232232
233- Next merge the maintenace branch with the "ours" strategy. This just labels
234- the maintenance `info.py` edits as seen but discarded, so we can merge from
235- maintenance in future without getting spurious merge conflicts::
233+ git merge -s ours maint/2.0.x
236234
237- git merge -s ours maint/1.3.x
238235
239- If this is just a maintenance release from ``maint/1 .0.x `` or similar, just
240- tag and set the version number to - say - ``1 .0.2.dev ``.
236+ If this is just a maintenance release from ``maint/2 .0.x `` or similar, just
237+ tag and set the version number to - say - ``2 .0.2.dev ``.
241238
242239* Push the main branch::
243240
244- git push main-master
241+ git push upstream-remote main-master
245242
246243* Make next development release tag
247244
@@ -253,16 +250,14 @@ Release checklist
253250
254251 This tag is used in the Makefile rules to create development snapshot
255252 releases to create proper versions for those. The version derives its name
256- from the last available annotated tag, the number of commits since that, and
257- an abbreviated SHA1. See the docs of ``git describe `` for more info.
253+ from the last available annotated tag, the number of commits since that,
254+ and an abbreviated SHA1. See the docs of ``git describe `` for more info.
258255
259- Please take a look at the Makefile rules ``devel-src ``,
260- ``devel-dsc `` and `` orig-src ``.
256+ Please take a look at the Makefile rules ``devel-src ``, `` devel-dsc `` and
257+ ``orig-src ``.
261258
262259* Announce to the mailing lists.
263260
264- .. _pytox : http://codespeak.net/tox
265261.. _setuptools intro : http://packages.python.org/an_example_pypi_project/setuptools.html
266- .. _travis-ci : http://travis-ci.org
267262
268263.. include :: ../links_names.txt
0 commit comments