4
4
A guide to making a nibabel release
5
5
***********************************
6
6
7
- A guide for developers who are doing a nibabel release
7
+ This is a guide for developers who are doing a nibabel release.
8
8
9
9
.. _release-tools :
10
10
11
11
Release tools
12
12
=============
13
13
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::
18
18
19
19
make check-version-info
20
20
make check-files
21
21
make sdist-tests
22
22
23
23
The 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.
26
26
27
27
The second (``sdist-tests ``) makes an sdist source distribution archive,
28
28
installs it to a temporary directory, and runs the tests of that install.
29
29
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
-
38
30
.. _release-checklist :
39
31
40
32
Release checklist
@@ -47,17 +39,17 @@ Release checklist
47
39
* Review and update the release notes. Review and update the ``Changelog ``
48
40
file. Get a partial list of contributors with something like::
49
41
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
51
43
52
- where ``1.3 .0 `` was the last release tag name.
44
+ where ``2.0 .0 `` was the last release tag name.
53
45
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.
56
48
57
49
* Look at ``doc/source/index.rst `` and add any authors not yet acknowledged.
58
50
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.
61
53
62
54
* Use the opportunity to update the ``.mailmap `` file if there are any
63
55
duplicate authors listed from ``git shortlog -nse ``.
@@ -75,26 +67,26 @@ Release checklist
75
67
76
68
* Check the dependencies listed in ``nibabel/info.py `` (e.g.
77
69
``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.
79
72
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.
81
75
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::
84
78
85
79
git branch -D pre-release-test # in case branch already exists
86
80
git co -b pre-release-test
87
- git push origin pre-release-test
81
+ git push your-github-user pre-release-test -u
88
82
89
83
* Clean::
90
84
91
85
make distclean
92
86
93
87
* Make sure all tests pass (from the nibabel root directory)::
94
88
95
- cd ..
96
89
nosetests --with-doctest nibabel
97
- cd nibabel # back to the root directory
98
90
99
91
* Make sure all tests pass from sdist::
100
92
@@ -122,7 +114,8 @@ Release checklist
122
114
123
115
Missed script files: /Users/mb312/dev_trees/nibabel/bin/nib-dicomfs, /Users/mb312/dev_trees/nibabel/bin/nifti1_diagnose.py
124
116
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.
126
119
127
120
* You probably have virtualenvs for different Python versions. Check the
128
121
tests pass for different configurations. The long-hand way looks like this::
@@ -143,6 +136,8 @@ Release checklist
143
136
make doctest
144
137
cd ..
145
138
139
+ This should also be tested by `nibabel on travis`_.
140
+
146
141
* Check everything compiles without syntax errors::
147
142
148
143
python -m compileall .
@@ -175,28 +170,28 @@ Release checklist
175
170
python setup.py register
176
171
python setup.py sdist --formats=gztar,zip upload
177
172
178
- * Tag the release with tag of form ``1.4 .0 ``::
173
+ * Tag the release with tag of form ``2.0 .0 ``::
179
174
180
- git tag -am 'Fourth main release' 1.4 .0
175
+ git tag -am "Something about this release' 2.0 .0
181
176
182
177
* Push the tag and any other changes to trunk with::
183
178
184
179
git push --tags
185
180
186
181
* Force builds of the win32 and amd64 binaries from the buildbot. Go to pages:
187
182
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
190
186
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
192
188
"Revision to build". Then get the built binaries in:
193
189
194
- * http://nipy.bic.berkeley.edu/dist-32
195
- * http://nipy.bic.berkeley.edu/dist-64
190
+ * http://nipy.bic.berkeley.edu/nibabel-dist
196
191
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.
198
193
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
200
195
command to upload instead: ``python setup.py bdist_wininst upload ``.
201
196
202
197
* Now the version number is OK, push the docs to sourceforge with::
@@ -213,35 +208,37 @@ Release checklist
213
208
214
209
* Branch to maintenance::
215
210
216
- git co -b maint/1 .0.x
211
+ git co -b maint/2 .0.x
217
212
218
213
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::
222
217
223
- git push upstream maint/1 .0.0 --set-upstream
218
+ git push upstream-remote maint/2 .0.x --set-upstream
224
219
225
220
* Start next development series::
226
221
227
222
git co main-master
228
223
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::
232
232
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
236
234
237
- git merge -s ours maint/1.3.x
238
235
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 ``.
241
238
242
239
* Push the main branch::
243
240
244
- git push main-master
241
+ git push upstream-remote main-master
245
242
246
243
* Make next development release tag
247
244
@@ -253,16 +250,14 @@ Release checklist
253
250
254
251
This tag is used in the Makefile rules to create development snapshot
255
252
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.
258
255
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 ``.
261
258
262
259
* Announce to the mailing lists.
263
260
264
- .. _pytox : http://codespeak.net/tox
265
261
.. _setuptools intro : http://packages.python.org/an_example_pypi_project/setuptools.html
266
- .. _travis-ci : http://travis-ci.org
267
262
268
263
.. include :: ../links_names.txt
0 commit comments