Skip to content

Commit 0b76680

Browse files
committed
refactor documentation about installation and tests
1 parent ce0d729 commit 0b76680

File tree

2 files changed

+75
-61
lines changed

2 files changed

+75
-61
lines changed

doc/devel/testing_nipype.rst

Lines changed: 64 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _dev_testing_nipype:
2+
13
==============
24
Testing nipype
35
==============
@@ -14,25 +16,69 @@ If both batteries of tests are passing, the following badges should be shown in
1416
:target: https://circleci.com/gh/nipy/nipype/tree/master
1517

1618

17-
Tests implementation
18-
--------------------
19+
Installation for developers
20+
---------------------------
21+
22+
To check out the latest development version::
23+
24+
git clone https://github.com/nipy/nipype.git
25+
26+
After cloning::
27+
28+
cd nipype
29+
pip install -r requirements.txt
30+
python setup.py develop
31+
32+
or::
33+
34+
cd nipype
35+
pip install -r requirements.txt
36+
pip install -e .[tests]
37+
38+
39+
40+
Test implementation
41+
-------------------
1942

2043
Nipype testing framework is built upon `nose <http://nose.readthedocs.io/en/latest/>`_.
2144
By the time these guidelines are written, Nipype implements 17638 tests.
2245

23-
To run the tests locally, first get nose installed::
46+
After installation in developer mode, the tests can be run with the
47+
following simple command at the root folder of the project ::
48+
49+
make tests
2450

25-
pip install nose
51+
If ``make`` is not installed in the system, it is possible to run the tests using::
2652

53+
python -W once:FSL:UserWarning:nipype `which nosetests` --with-doctest \
54+
--with-doctest-ignore-unicode --logging-level=DEBUG --verbosity=3 nipype
2755

28-
Then, after nipype is `installed in developer mode <../users/install.html#nipype-for-developers>`_,
29-
the tests can be run with the following simple command::
3056

31-
make tests
57+
A successful test run should complete in a few minutes and end with
58+
something like::
3259

60+
----------------------------------------------------------------------
61+
Ran 17922 tests in 107.254s
62+
63+
OK (SKIP=27)
64+
65+
66+
All tests should pass (unless you're missing a dependency). If the ``SUBJECTS_DIR```
67+
environment variable is not set, some FreeSurfer related tests will fail.
68+
If any of the tests failed, please report them on our `bug tracker
69+
<http://github.com/nipy/nipype/issues>`_.
70+
71+
On Debian systems, set the following environment variable before running
72+
tests::
73+
74+
export MATLABCMD=$pathtomatlabdir/bin/$platform/MATLAB
75+
76+
where ``$pathtomatlabdir`` is the path to your matlab installation and
77+
``$platform`` is the directory referring to x86 or x64 installations
78+
(typically ``glnxa64`` on 64-bit installations).
3379

3480
Skip tests
35-
----------
81+
~~~~~~~~~~
3682

3783
Nipype will skip some tests depending on the currently available software and data
3884
dependencies. Installing software dependencies and downloading the necessary data
@@ -45,6 +91,16 @@ To enable the tests depending on these data, just unpack the targz file and set
4591
variable to point to that folder.
4692

4793

94+
Avoiding any MATLAB calls from testing
95+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96+
97+
On unix systems, set an empty environment variable::
98+
99+
export NIPYPE_NO_MATLAB=
100+
101+
This will skip any tests that require matlab.
102+
103+
48104
Testing Nipype using Docker
49105
---------------------------
50106

doc/users/install.rst

Lines changed: 11 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ or::
4343
pip install nipype
4444

4545

46+
If you want to install all the optional features of ``nipype``,
47+
use the following command (only for ``nipype>=0.13``)::
48+
49+
pip install nipype[all]
50+
51+
4652
Debian and Ubuntu
4753
~~~~~~~~~~~~~~~~~
4854

@@ -73,72 +79,24 @@ If you downloaded the source distribution named something
7379
like ``nipype-x.y.tar.gz``, then unpack the tarball, change into the
7480
``nipype-x.y`` directory and install nipype using::
7581

76-
pip install -r requirements.txt
7782
python setup.py install
7883

7984
**Note:** Depending on permissions you may need to use ``sudo``.
8085

8186

82-
Nipype for developers
83-
---------------------
84-
85-
To check out the latest development version::
86-
87-
git clone git://github.com/nipy/nipype.git
88-
89-
or::
90-
91-
git clone https://github.com/nipy/nipype.git
92-
93-
After cloning::
94-
95-
pip install -r requirements.txt
96-
python setup.py develop
97-
98-
99-
Check out the list of nipype's `current dependencies <https://github.com/nipy/nipype/blob/master/requirements.txt>`_.
100-
101-
10287
Testing the install
10388
-------------------
10489

105-
The best way to test the install is to run the test suite. If you have
106-
nose_ installed, then do the following at the root folder of the repository ::
107-
108-
make test
109-
110-
111-
A successful test run should complete in a few minutes and end with
112-
something like::
113-
114-
----------------------------------------------------------------------
115-
Ran 17922 tests in 107.254s
116-
117-
OK (SKIP=27)
118-
119-
120-
All tests should pass (unless you're missing a dependency). If SUBJECTS_DIR
121-
variable is not set some FreeSurfer related tests will fail. If any tests
122-
fail, please report them on our `bug tracker
123-
<http://github.com/nipy/nipype/issues>`_.
124-
125-
On Debian systems, set the following environment variable before running
126-
tests::
127-
128-
export MATLABCMD=$pathtomatlabdir/bin/$platform/MATLAB
90+
The best way to test the install is checking nipype's version ::
12991

130-
where ``$pathtomatlabdir`` is the path to your matlab installation and
131-
``$platform`` is the directory referring to x86 or x64 installations
132-
(typically ``glnxa64`` on 64-bit installations).
92+
python -c "import nipype; print(nipype.__version__)"
13393

134-
Avoiding any MATLAB calls from testing
135-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13694

137-
On unix systems, set an empty environment variable::
95+
Installation for developers
96+
---------------------------
13897

139-
export NIPYPE_NO_MATLAB=
98+
Developers should start `here <../devel/testing_nipype.html>`_.
14099

141-
This will skip any tests that require matlab.
142100

143101
Recommended Software
144102
------------

0 commit comments

Comments
 (0)