Skip to content

Commit 2d4714b

Browse files
committed
Merge remote branch 'nipy/master'
2 parents 135d291 + c245a9e commit 2d4714b

File tree

10 files changed

+70
-27
lines changed

10 files changed

+70
-27
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,12 @@ upload-website: website
133133
rsync -rzhvp --delete --chmod=Dg+s,g+rw $(WWW_DIR)/* \
134134
web.sourceforge.net:/home/groups/n/ni/niftilib/htdocs/nibabel/
135135

136-
upload-htmldoc: htmldoc
136+
# This one udates for the specific user named at the top of the makefile
137+
upload-htmldoc: htmldoc upload-htmldoc-$(SF_USER)
138+
139+
upload-htmldoc-%: htmldoc
137140
rsync -rzhvp --delete --chmod=Dg+s,g+rw $(HTML_DIR)/* \
138-
$(SF_USER),[email protected]:/home/groups/n/ni/nipy/htdocs/nibabel/
141+
$*,[email protected]:/home/groups/n/ni/nipy/htdocs/nibabel/
139142

140143
#
141144
# Sources

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
# We load the nibabel release info into a dict by explicit execution
3434
rel = {}
35-
execfile('../../nibabel/version.py', rel)
35+
execfile('../../nibabel/info.py', rel)
3636

3737
# Add any Sphinx extension module names here, as strings. They can be extensions
3838
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.

doc/source/data_pkg_design.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ NIPY-related packages such as ``pbrain``). The ``data`` subdirectory of
162162
``config.ini`` file, that has at least an entry like this::
163163

164164
[DEFAULT]
165-
version = 0.1
165+
version = 0.2
166166

167167
giving the version of the data package.
168168

@@ -189,9 +189,8 @@ For the example above this will result in these subdirectories::
189189
because ``nipy`` is both the project, and the package to which the data
190190
relates.
191191

192-
If you install to a particular location, you will need to add that location to
193-
the output of ``nipy.data.get_data_path()`` using one of the mechanisms above,
194-
for example, in your system configuration::
192+
If you install to a particular location, you will need to add that
193+
location to the output of ``nipy.data.get_data_path()`` using one of the mechanisms above, for example, in your system configuration::
195194

196195
export NIPY_DATA_PATH=/my/prefix/share/nipy
197196

@@ -215,8 +214,8 @@ contents::
215214
Current implementation
216215
``````````````````````
217216

218-
This section describes how we (the nibabel package) implement data packages
219-
at the moment.
217+
This section describes how we (the nipy community) implement data packages at
218+
the moment.
220219

221220
The data in the data packages will not usually be under source control. This is
222221
because images don't compress very well, and any change in the data will result
@@ -226,7 +225,7 @@ the data files aren't going to change, then a repository could work OK.
226225
The data packages will be available at a central release location. For
227226
now this will be: http://nipy.sourceforge.net/data-packages/ .
228227

229-
A package, such as ``nipy-templates-0.1.tar.gz`` will have the following
228+
A package, such as ``nipy-templates-0.2.tar.gz`` will have the following
230229
sort of structure::
231230

232231

@@ -236,6 +235,8 @@ sort of structure::
236235
|-- MANIFEST.in
237236
`-- templates
238237
|-- ICBM152
238+
| |-- 1mm
239+
| | `-- T1_brain.nii.gz
239240
| `-- 2mm
240241
| `-- T1.nii.gz
241242
|-- colin27
@@ -246,14 +247,14 @@ sort of structure::
246247

247248
There should be only one ``nipy/packagename`` directory delivered by a
248249
particular package. For example, this package installs
249-
``nipy/templates``, but does not contain ``nipy/data``.
250+
``nipy/templates``, but does not contain ``nipy/data``.
250251

251252
Making a new package tarball is simply:
252253

253254
#. Downloading and unpacking e.g ``nipy-templates-0.1.tar.gz`` to form
254255
the directory structure above.
255256
#. Making any changes to the directory
256-
#. Running ``setup.py sdist`` to recreate the package.
257+
#. Running ``setup.py sdist`` to recreate the package.
257258

258259
The process of making a release should be:
259260

@@ -264,8 +265,7 @@ The process of making a release should be:
264265
There is an example nipy data package ``nipy-examplepkg`` in the
265266
``examples`` directory of the NIPY repository.
266267

267-
The machinery for creating and maintaining data packages is available with::
268-
269-
svn co https://nipy.svn.sourceforge.net/svnroot/nipy/data-packaging/trunk
268+
The machinery for creating and maintaining data packages is available at
269+
http://github.com/nipy/data-packaging
270270

271271
See the ``README.txt`` file there for more information.

doc/source/devdiscuss.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.. -*- mode: rst; fill-column: 79 -*-
2+
.. ex: set sts=4 ts=4 sw=4 et tw=79:
3+
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
4+
#
5+
# See COPYING file distributed along with the NiBabel package for the
6+
# copyright and license terms.
7+
#
8+
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
9+
10+
.. _chap_devdiscuss:
11+
12+
*********************
13+
Developer discussions
14+
*********************
15+
16+
Some discussions of usecases and other design issues. Most of these don't apply
17+
to the current codebase, and are only for discussion of future directions.
18+
19+
.. toctree::
20+
:maxdepth: 2
21+
22+
usecases/index
23+
refactoring/index
24+
data_pkg_design

doc/source/devguide.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
NiBabel Developer Guidelines
1414
****************************
1515

16+
NiBabel source code
17+
===================
18+
1619
.. toctree::
1720
:maxdepth: 2
1821

1922
gitwash/index
20-
refactoring/index
2123

2224
Documentation
2325
=============
@@ -86,10 +88,11 @@ Merges
8688
------
8789

8890
For easy tracking of what changes were absorbed during merge, we
89-
advice to enable merge summary within git:
91+
advise that you enable merge summaries within git:
9092

9193
git-config merge.summary true
9294

95+
See :ref:`configure-git` for more detail.
9396

9497
Changelog
9598
=========

doc/source/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Documentation
1515
* :ref:`User Documentation <manual>` (manual)
1616
* :ref:`API Documentation <api>` (comprehensive reference)
1717
* :ref:`Developer Guidelines <chap_devguide>` (for those who want to contribute)
18+
* :ref:`Developer discussions <chap_devdiscuss>` (arcane discussions about code
19+
design)
1820
* :ref:`Development Changelog <changelog>` (see what has changed)
1921
* :ref:`genindex` (access by keywords)
2022
* :ref:`search` (online and offline full-text search)

doc/source/manual.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ NiBabel Manual
88

99
installation
1010
gettingstarted
11-
usecases/index
1211
dicom/dicom
1312
legal
1413
changelog

nibabel/nicom/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,10 @@
1919
dwiparams
2020
structreader
2121
"""
22+
import warnings
23+
24+
warnings.warn('The DICOM readers are highly experimental, unstable,'
25+
' and only work for Siemens time-series at the moment\n'
26+
'Please use with caution. We would be grateful for your '
27+
'help in improving them',
28+
UserWarning, stacklevel=2)

nibabel/nicom/dicomreaders.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def read_mosaic_dwi_dir(dicom_path, globber='*.dcm'):
4040

4141

4242
def read_mosaic_dir(dicom_path, globber='*.dcm', check_is_dwi=False):
43-
''' Read all Siemens DICOMs in directory, return arrays, params
43+
''' Read all Siemens mosaic DICOMs in directory, return arrays, params
4444
4545
Parameters
4646
----------
@@ -77,6 +77,11 @@ def read_mosaic_dir(dicom_path, globber='*.dcm', check_is_dwi=False):
7777
raise IOError('Found no files with "%s"' % full_globber)
7878
for fname in filenames:
7979
dcm_w = wrapper_from_file(fname)
80+
# Because the routine sorts by filename, it only makes sense to use this
81+
# order for mosaic images. Slice by slice dicoms need more sensible
82+
# sorting
83+
if not dcm_w.is_mosaic:
84+
raise DicomReadError('data does not appear to be in mosaic format')
8085
arrays.append(dcm_w.get_data()[...,None])
8186
q = dcm_w.q_vector
8287
if q is None: # probably not diffusion

nibabel/spatialimages.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -381,12 +381,12 @@ def from_filename(klass, filename):
381381
return klass.from_file_map(file_map)
382382

383383
@classmethod
384-
def from_filespec(klass, img, filespec):
384+
def from_filespec(klass, filespec):
385385
warnings.warn('``from_filespec`` class method is deprecated\n'
386386
'Please use the ``from_filename`` class method '
387387
'instead',
388-
DeprecationWarning)
389-
klass.from_filespec(filespec)
388+
DeprecationWarning, stacklevel=2)
389+
klass.from_filename(filespec)
390390

391391
@classmethod
392392
def from_file_map(klass, file_map):
@@ -397,7 +397,7 @@ def from_files(klass, file_map):
397397
warnings.warn('``from_files`` class method is deprecated\n'
398398
'Please use the ``from_file_map`` class method '
399399
'instead',
400-
DeprecationWarning)
400+
DeprecationWarning, stacklevel=2)
401401
return klass.from_file_map(file_map)
402402

403403
@classmethod
@@ -419,7 +419,7 @@ def filespec_to_files(klass, filespec):
419419
warnings.warn('``filespec_to_files`` class method is deprecated\n'
420420
'Please use the ``filespec_to_file_map`` class method '
421421
'instead',
422-
DeprecationWarning)
422+
DeprecationWarning, stacklevel=2)
423423
return klass.filespec_to_file_map(filespec)
424424

425425
def to_filename(self, filename):
@@ -442,7 +442,7 @@ def to_filename(self, filename):
442442
def to_filespec(self, filename):
443443
warnings.warn('``to_filespec`` is deprecated, please '
444444
'use ``to_filename`` instead',
445-
DeprecationWarning)
445+
DeprecationWarning, stacklevel=2)
446446
self.to_filename(filename)
447447

448448
def to_file_map(self, file_map=None):
@@ -452,7 +452,7 @@ def to_files(self, file_map=None):
452452
warnings.warn('``to_files`` method is deprecated\n'
453453
'Please use the ``to_file_map`` method '
454454
'instead',
455-
DeprecationWarning)
455+
DeprecationWarning, stacklevel=2)
456456
self.to_file_map(file_map)
457457

458458
@classmethod
@@ -495,7 +495,7 @@ def save(klass, img, filename):
495495
warnings.warn('``save`` class method is deprecated\n'
496496
'You probably want the ``to_filename`` instance '
497497
'method, or the module-level ``save`` function',
498-
DeprecationWarning)
498+
DeprecationWarning, stacklevel=2)
499499
klass.instance_to_filename(img, filename)
500500

501501
@classmethod

0 commit comments

Comments
 (0)