Skip to content

Commit d94bbba

Browse files
committed
Merge branch 'master' of github.com:nipy/nibabel
* 'master' of github.com:nipy/nibabel: ChangeLog ready for release DOC - updated and expanded README NF - makefile target to make sdist, install, test MRG - updated from nisext upstream; adding zip tests
2 parents 41074af + d80e0d8 commit d94bbba

File tree

4 files changed

+108
-23
lines changed

4 files changed

+108
-23
lines changed

Changelog

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@
66
NiBabel Development Changelog
77
-----------------------------
88

9-
Modifications are done by Michael Hanke, if not indicated otherwise. 'Closes'
10-
statement IDs refer to the Debian bug tracking system and can be queried by
11-
visiting the URL::
12-
13-
http://bugs.debian.org/<bug id>
9+
NiBabel is the successor to the much-loved PyNifti package. Here we list the
10+
releases for both packages.
1411

1512
'Close gh-' statements refer to GitHub issues that are available at::
1613

@@ -20,20 +17,49 @@ The full VCS changelog is available here:
2017

2118
http://github.com/hanke/nibabel/commits/master
2219

20+
Releases
21+
~~~~~~~~
2322

24-
Unreleased changes
25-
Changes described here are not yet released, but available from VCS
26-
repository.
27-
28-
* This is a complete rewrite of a pure-Python module to access various
29-
neuroimaging data formats. It replaces the now obsolete PyNIfTI.
30-
* Support for SPM-style ANALYZE images.
31-
* MINC format support.
32-
* Comprehensive unittest suite.
23+
NiBabel
24+
+++++++
25+
26+
Most work on NiBabel so far has been by Matthew Brettt (MB) and Michael Hanke
27+
(MH).
28+
29+
* 1.0.0 (Thursday, 13, Oct 2010)
30+
31+
* This is the first public release of the NiBabel package.
32+
* NiBabel is a complete rewrite of the PyNifti package in pure python. It was
33+
designed to make the code simpler and easier to work with. Like PyNifti,
34+
NiBabel has fairly comprehensive NIfTI read and write support.
35+
* Extended support for SPM Analyze images, including orientation affines from
36+
matlab ``.mat`` files.
37+
* Basic support for simple MINC 1.0 files (MB). Please let us know if you
38+
have MINC files that we don't support well.
39+
* Support for reading and writing PAR/REC images (MH)
40+
* Very preliminary, limited and highly experimental DICOM reading support (MB,
41+
Ian Nimmo Smith).
42+
* Some functions (`nibabel.funcs`) for basic image shape changes, including
43+
the ability to transform to the image with data closest to the cononical
44+
image orientation (first axis left-to-right, second back-to-front, third
45+
down-to-up) (MB, Jonathan Taylor)
46+
* Gifti format read and write support (preliminary) (Stephen Gerhard)
47+
* Added utilities to use nipy-style data packages, by rip then edit of nipy
48+
data package code (MB)
49+
* Some improvements to release support (Jarrod Millman, MB, Fernando Perez)
50+
* Huge downward step in the quality and coverage by the docs, caused by MB,
51+
mostly fixed by a lot of good work by MH.
52+
* NiBabel will not work with Python < 2.5, and we haven't even tested it with
53+
Python 3. We will get to it soon...
54+
55+
PyNifti
56+
+++++++
3357

58+
Modifications are done by Michael Hanke, if not indicated otherwise. 'Closes'
59+
statement IDs refer to the Debian bug tracking system and can be queried by
60+
visiting the URL::
3461

35-
Releases
36-
~~~~~~~~
62+
http://bugs.debian.org/<bug id>
3763

3864
* 0.20090303.1 (Tue, 3 Mar 2009)
3965

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ check-version-info:
239239
installed-tests:
240240
$(PYTHON) -c 'from nisext.testers import tests_installed; tests_installed("nibabel")'
241241

242+
# Run tests from installed code
243+
sdist-tests:
244+
$(PYTHON) -c 'from nisext.testers import sdist_tests; sdist_tests("nibabel")'
245+
242246
# Update nisext subtree from remote
243247
update-nisext:
244248
git fetch nisext

README.txt

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.. -*- rest -*-
22
.. vim:syntax=rest
33

4-
54
=======
65
NiBabel
76
=======
@@ -20,6 +19,20 @@ PyNIfTI_.
2019
The various image format classes give full or selective access to header (meta)
2120
information and access to the image data is made available via NumPy arrays.
2221

22+
Website
23+
=======
24+
25+
Current information can always be found at the NIPY nibabel website::
26+
27+
http://nipy.org/nibabel
28+
29+
Mailing Lists
30+
=============
31+
32+
Please see the developer's list here::
33+
34+
http://mail.scipy.org/mailman/listinfo/nipy-devel
35+
2336
Code
2437
====
2538

@@ -34,3 +47,11 @@ You can find our sources and single-click downloads:
3447
.. _Documentation: http://nipy.org/nibabel
3548
.. _current trunk: http://github.com/nipy/nibabel/archives/master
3649
.. _available releases: http://github.com/nipy/nibabel/downloads
50+
51+
License
52+
=======
53+
54+
Nibabel is licensed under the terms of the MIT license. Some code included with
55+
nibabel is licensed under the BSD license. Please the COPYING file in the
56+
nibabel distribution.
57+

nisext/testers.py

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import os
1515
from os.path import join as pjoin
16+
from glob import glob
1617
import shutil
1718
import tempfile
1819
import zipfile
@@ -188,25 +189,58 @@ def info_from_here(mod_name):
188189
shutil.rmtree(install_path)
189190

190191

191-
def tests_installed(mod_name, repo_path=None):
192-
""" Install from `repo_path` into temporary directory; run tests
192+
def tests_installed(mod_name, source_path=None):
193+
""" Install from `source_path` into temporary directory; run tests
193194
194195
Parameters
195196
----------
196197
mod_name : str
197198
name of module - e.g. 'nibabel'
198-
repo_path : None or str
199+
source_path : None or str
199200
Path from which to install. If None, defaults to working directory
200201
"""
201-
if repo_path is None:
202-
repo_path = os.path.abspath(os.getcwd())
202+
if source_path is None:
203+
source_path = os.path.abspath(os.getcwd())
203204
install_path = tempfile.mkdtemp()
204205
try:
205-
site_pkgs_path = install_from_to(repo_path,
206+
site_pkgs_path = install_from_to(source_path,
206207
install_path,
207208
PY_LIB_SDIR)
208209
run_mod_cmd(mod_name, site_pkgs_path, mod_name + '.test()')
209210
finally:
210211
shutil.rmtree(install_path)
211212

212213

214+
def tests_from_zip(mod_name, zip_fname):
215+
""" Runs test from sdist zip source archive """
216+
install_path = tempfile.mkdtemp()
217+
try:
218+
zip_extract_all(zip_fname, install_path)
219+
pkg_dirs = glob(pjoin(install_path, mod_name + "*"))
220+
if len(pkg_dirs) != 1:
221+
raise OSError('There must be one and only one package dir')
222+
pkg_contents = pjoin(install_path, pkg_dirs[0])
223+
tests_installed(mod_name, pkg_contents)
224+
finally:
225+
shutil.rmtree(install_path)
226+
227+
228+
def sdist_tests(mod_name, repo_path=None):
229+
""" Make sdist zip, install from it, and run tests """
230+
pwd = os.path.abspath(os.getcwd())
231+
if repo_path is None:
232+
repo_path = pwd
233+
install_path = tempfile.mkdtemp()
234+
try:
235+
os.chdir(repo_path)
236+
my_call('python setup.py sdist --formats=zip --dist-dir='
237+
+ install_path)
238+
zip_fnames = glob(pjoin(install_path, mod_name + "*.zip"))
239+
if len(zip_fnames) != 1:
240+
raise OSError('There must be one and only one zip file, '
241+
'but I found "%s"' % ': '.join(zip_fnames))
242+
tests_from_zip(mod_name, zip_fnames[0])
243+
finally:
244+
os.chdir(pwd)
245+
shutil.rmtree(install_path)
246+

0 commit comments

Comments
 (0)