Skip to content

Commit 53cf6f8

Browse files
committed
Merge pull request #1485 from shoshber/master
DOC more documentation (tutorials) fixes/updates
2 parents 2b9c5e9 + 20d94fd commit 53cf6f8

File tree

5 files changed

+43
-73
lines changed

5 files changed

+43
-73
lines changed

Makefile

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ sdist: zipdoc
1515
python setup.py sdist
1616
@echo "Done building source distribution."
1717
# XXX copy documentation.zip to dist directory.
18-
# XXX Somewhere the doc/_build directory is removed and causes
19-
# this script to fail.
2018

2119
egg: zipdoc
2220
@echo "Building egg..."
@@ -45,7 +43,10 @@ clean-build:
4543
clean-ctags:
4644
rm -f tags
4745

48-
clean: clean-build clean-pyc clean-so clean-ctags
46+
clean-doc:
47+
rm -rf doc/_build
48+
49+
clean: clean-build clean-pyc clean-so clean-ctags clean-doc
4950

5051
in: inplace # just a shortcut
5152
inplace:

doc/users/install.rst

+21-40
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ This page covers the necessary steps to install Nipype.
99
Download
1010
--------
1111

12-
Release 0.10.0: [`zip <https://github.com/nipy/nipype/archive/0.10.0.zip>`__ `tar.gz
13-
<https://github.com/nipy/nipype/archive/0.10.0.tar.gz>`__]
12+
Current release: `<https://github.com/nipy/nipype/releases/latest>`_.
1413

15-
Development: [`zip <http://github.com/nipy/nipype/zipball/master>`__ `tar.gz
14+
Development version: [`zip <http://github.com/nipy/nipype/zipball/master>`__ `tar.gz
1615
<http://github.com/nipy/nipype/tarball/master>`__]
1716

1817
`Prior downloads <http://github.com/nipy/nipype/tags>`_
@@ -25,13 +24,14 @@ or::
2524

2625
git clone https://github.com/nipy/nipype.git
2726

27+
Check out the list of nipype's `current dependencies <https://github.com/nipy/nipype/blob/master/requirements.txt>`_.
28+
2829
Install
2930
-------
3031

3132
The installation process is similar to other Python packages.
3233

33-
If you already have a Python environment setup that has the dependencies listed
34-
below, you can do::
34+
If you already have a Python environment set up, you can do::
3535

3636
easy_install nipype
3737

@@ -76,8 +76,18 @@ nose_ installed, then do the following::
7676

7777
you can also test with nosetests::
7878

79-
nosetests --with-doctest /software/nipy-repo/masternipype/nipype
80-
--exclude=external --exclude=testing
79+
nosetests --with-doctest <installation filepath>/nipype --exclude=external --exclude=testing
80+
81+
or::
82+
83+
nosetests --with-doctest nipype
84+
85+
A successful test run should complete in a few minutes and end with
86+
something like::
87+
88+
Ran 13053 tests in 126.618s
89+
90+
OK (SKIP=66)
8191

8292
All tests should pass (unless you're missing a dependency). If SUBJECTS_DIR
8393
variable is not set some FreeSurfer related tests will fail. If any tests
@@ -89,9 +99,9 @@ tests::
8999

90100
export MATLABCMD=$pathtomatlabdir/bin/$platform/MATLAB
91101

92-
where, $pathtomatlabdir is the path to your matlab installation and
93-
$platform is the directory referring to x86 or x64 installations
94-
(typically glnxa64 on 64-bit installations).
102+
where ``$pathtomatlabdir`` is the path to your matlab installation and
103+
``$platform`` is the directory referring to x86 or x64 installations
104+
(typically ``glnxa64`` on 64-bit installations).
95105

96106
Avoiding any MATLAB calls from testing
97107
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -102,38 +112,9 @@ On unix systems, set an empty environment variable::
102112

103113
This will skip any tests that require matlab.
104114

105-
Dependencies
115+
Recommended Software
106116
------------
107117

108-
Below is a list of required dependencies, along with additional software
109-
recommendations.
110-
111-
Must Have
112-
~~~~~~~~~
113-
114-
.. note::
115-
116-
Full distributions of Nipype, such as the ones in Anaconda_ or Canopy_, provide
117-
the following packages automatically.
118-
119-
Nibabel_ 1.0 - 1.4
120-
Neuroimaging file i/o library.
121-
122-
Python_ 2.7
123-
124-
NetworkX_ 1.0 - 1.8
125-
Python package for working with complex networks.
126-
127-
NumPy_ 1.3 - 1.7
128-
129-
SciPy_ 0.7 - 0.12
130-
Numpy and Scipy are high-level, optimized scientific computing libraries.
131-
132-
Enthought_ Traits_ 4.0.0 - 4.3.0
133-
134-
Dateutil 1.5 -
135-
136-
137118
Strong Recommendations
138119
~~~~~~~~~~~~~~~~~~~~~~
139120

doc/users/pipeline_tutorial.rst

+6-23
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Requirements
4949
- FSL_, FreeSurfer_, Camino_, ConnectomeViewer and MATLAB_ are available and
5050
callable from the command line
5151

52-
- SPM_ 5/8 is installed and callable in matlab
52+
- SPM_ 5/8/12 is installed and callable in matlab
5353

5454
- Space: 3-10 GB
5555

@@ -59,29 +59,12 @@ Checklist for analysis tutorials
5959
For the analysis tutorials, we will be using a slightly modified version of the
6060
FBIRN Phase I travelling data set.
6161

62-
Step 0
63-
~~~~~~
62+
1. Download and extract the `Pipeline tutorial data (429MB).
63+
<https://figshare.com/articles/nipype_tutorial_data/3395806>`_
64+
(md5: d175083784c5167de4ea11b43b37c166)
6465

65-
Download and extract the `Pipeline tutorial data (429MB).
66-
<https://dl.dropbox.com/s/jzgq2nupxyz36bp/nipype-tutorial.tar.bz2>`_
67-
68-
(checksum: 56ed4b7e0aac5627d1724e9c10cd26a7)
69-
70-
71-
Step 1.
72-
~~~~~~~
73-
74-
Ensure that all programs are available by calling ``bet``, ``matlab``
75-
and then ``which spm`` within matlab to ensure you have spm5/8 in your
66+
2. Ensure that all programs are available by calling ``bet``, ``matlab``
67+
and then ``which spm`` within matlab to ensure you have spm5/8/12 in your
7668
matlab path.
7769

78-
Step 2.
79-
~~~~~~~
80-
81-
You can now run the tutorial by typing ``python tutorial_script.py``
82-
within the nipype-tutorial directory. This will run a full first level
83-
analysis on two subjects following by a 1-sample t-test on their first
84-
level results. The next section goes through each section of the
85-
tutorial script and describes what it is doing.
86-
8770
.. include:: ../links_names.txt

doc/users/tutorial_101.rst

+11-6
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ realigner to the smoother in step 5.
7575
**3. Creating and configuring a workflow**
7676

7777
Here we create an instance of a workflow and indicate that it should operate in
78-
the current directory.
78+
the current directory. The workflow's output will be placed in the ``preproc``
79+
directory.
7980

8081
.. testcode::
8182

@@ -128,11 +129,13 @@ above were generated using this.
128129

129130
workflow.write_graph()
130131

131-
This creates two files graph.dot and graph_detailed.dot and if
132+
This creates two files ``graph.dot`` and ``graph_detailed.dot`` inside
133+
``./preproc`` and if
132134
graphviz_ is installed on your system it automatically converts it
133135
to png files. If graphviz is not installed you can take the dot files
134136
and load them in a graphviz visualizer elsewhere. You can specify how detailed
135-
the graph is going to be, by using "graph2use" argument which takes the following
137+
the graph is going to be, by using the ``graph2use`` argument which takes
138+
the following
136139
options:
137140

138141
* hierarchical - creates a graph showing all embedded workflows (default)
@@ -152,9 +155,11 @@ above pipeline.
152155
import nipype.algorithms.rapidart as ra
153156
artdetect = pe.Node(interface=ra.ArtifactDetect(), name='artdetect')
154157
artdetect.inputs.use_differences = [True, False]
155-
art.inputs.use_norm = True
156-
art.inputs.norm_threshold = 0.5
157-
art.inputs.zintensity_threshold = 3
158+
artdetect.inputs.use_norm = True
159+
artdetect.inputs.norm_threshold = 0.5
160+
artdetect.inputs.zintensity_threshold = 3
161+
artdetect.inputs.parameter_source = "SPM"
162+
artdetect.inputs.mask_type = "spm_global"
158163
workflow.connect([(realigner, artdetect,
159164
[('realigned_files', 'realigned_files'),
160165
('realignment_parameters','realignment_parameters')]

nipype/interfaces/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ def run(self, **inputs):
10561056

10571057
if config.has_option('logging', 'interface_level') and \
10581058
config.get('logging', 'interface_level').lower() == 'debug':
1059-
inputs_str = "Inputs:" + str(self.inputs) + "\n"
1059+
inputs_str = "\nInputs:" + str(self.inputs) + "\n"
10601060
else:
10611061
inputs_str = ''
10621062

0 commit comments

Comments
 (0)