Skip to content

Commit c6b4dc1

Browse files
committed
DOC: point to collated data installation page
We were pointing to the INSTALL page, that's now gone.
1 parent f755656 commit c6b4dc1

File tree

6 files changed

+147
-148
lines changed

6 files changed

+147
-148
lines changed

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include AUTHOR COPYING Makefile* MANIFEST.in setup* README.* INSTALL THANKS
1+
include AUTHOR COPYING Makefile* MANIFEST.in setup* README.* THANKS
22
include Changelog TODO
33
include *.py
44
include site.*

doc/devel/development_quickstart.rst

Lines changed: 3 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -33,139 +33,10 @@ Then you can either:
3333
With either method, all of the modifications made to your source tree
3434
will be picked up when nipy is imported.
3535

36-
.. _installing-data:
37-
38-
Optional data packages
39-
======================
40-
41-
The source code has some very small data files to run the tests with,
42-
but it doesn't include larger example data files, or the all-important
43-
brain templates we all use. You can find packages for the optional data
44-
and template files at http://nipy.sourceforge.net/data-packages.
45-
46-
If you don't have these packages, then, when you run nipy installation,
47-
you will probably see messages pointing you to the packages you need.
48-
49-
Data package installation as an administrator
50-
---------------------------------------------
51-
52-
The installation procedure, for now, is very basic. For example, let us
53-
say that you need the 'nipy-templates' package at
54-
http://nipy.sourceforge.net/data-packages/nipy-templates-0.2.tar.gz
55-
. You simply download this archive, unpack it, and then run the standard
56-
``python setup.py install`` on it. On a unix system this might look
57-
like::
58-
59-
curl -O http://nipy.sourceforge.net/data-packages/nipy-templates-0.2.tar.gz
60-
tar zxvf nipy-templates-0.2.tar.gz
61-
cd nipy-templates-0.2
62-
sudo python setup.py install
63-
64-
On windows, download the file, extract the archive to a folder using the
65-
GUI, and then, using the windows shell or similar::
66-
67-
cd c:\path\to\extracted\files
68-
python setup.py install
69-
70-
Non-administrator data package installation
71-
-------------------------------------------
72-
73-
The simple ugly manual way
74-
^^^^^^^^^^^^^^^^^^^^^^^^^^
75-
76-
These are instructions for using the command line in Unix. You can do similar
77-
things from Windows powershell.
78-
79-
* Locate your nipy user directory from the output of this::
80-
81-
python -c 'import nibabel.data; print(nibabel.data.get_nipy_user_dir())'
82-
83-
Call that directory ``<nipy-user>``. Let's imagine that, for you, this is
84-
``/home/me/.nipy``.
85-
* If that directory does not exist already, create it, e.g.::
86-
87-
mkdir /home/me/.nipy
88-
89-
* Make a directory in ``<nipy-user>`` called ``nipy``, e.g.::
90-
91-
mkdir /home/me/.nipy/nipy
92-
93-
* Go to http://nipy.sourceforge.net/data-packages
94-
* Download the latest *nipy-templates* and *nipy-data* packages
95-
* Unpack both these into some directory, e.g.::
96-
97-
mkdir data
98-
cd data
99-
tar zxvf ~/Downloads/nipy-data-0.2.tar.gz
100-
tar zxvf ~/Downloads/nipy-templates-0.2.tar.gz
101-
102-
* After you have unpacked the templates, you will have a directory called
103-
something like ``nipy-templates-0.2``. In that directory you should see a
104-
subdirectory called ``templates``. Copy / move / link the ``templates``
105-
subdirectory into ``<nipy-user>/nipy``, so you now have a directory
106-
``<nipy-user>/nipy/templates``. From unpacking the data, you should also have
107-
a directory like ``nipy-data-0.2`` with a subdirectory ``data``. Copy / move
108-
/ link that ``data`` directory into ``<nipy-user>/nipy`` as well. For
109-
example::
110-
111-
cd data
112-
cp -r nipy-data-0.2/data /home/me/.nipy/nipy
113-
cp -r nipy-templates-0.2/templates /home/me/.nipy/nipy
114-
115-
* Check whether that worked. Run the following command from the shell::
116-
117-
python -c 'import nipy.utils; print(nipy.utils.example_data, nipy.utils.templates)'
118-
119-
It should show something like::
120-
121-
(<nibabel.data.VersionedDatasource object at 0x101f8e410>, <nibabel.data.VersionedDatasource object at 0x10044b110>)
122-
123-
If it shows ``Bomber`` objects instead, something is wrong. Go back and check
124-
that you have the nipy home directory right, and that you have directories
125-
``<nipy-user>/nipy/data`` and ``<nipy-user>/nipy/templates>``, and that each
126-
of these two directories have a file ``config.ini`` in them.
127-
128-
The more general way
129-
^^^^^^^^^^^^^^^^^^^^
130-
131-
The commands for the sytem install above assume you are installing into the
132-
default system directories. If you want to install into a custom directory,
133-
then (in python, or ipython, or a text editor) look at the help for
134-
``nibabel.data.get_data_path()`` . There are instructions there for pointing
135-
your nipy installation to the installed data.
136-
137-
On unix
138-
+++++++
139-
140-
For example, say you installed with::
141-
142-
cd nipy-templates-0.2
143-
python setup.py install --prefix=/home/my-user/some-dir
144-
145-
Then you may want to do make a file ``~/.nipy/config.ini`` with the
146-
following contents::
147-
148-
[DATA]
149-
path=/home/my-user/some-dir/share/nipy
150-
151-
On windows
152-
++++++++++
153-
154-
Say you installed with (windows shell)::
155-
156-
cd nipy-templates-0.2
157-
python setup.py install --prefix=c:\some\path
158-
159-
Then first, find out your home directory::
160-
161-
python -c "import os; print os.path.expanduser('~')"
162-
163-
Let's say that was ``c:\Documents and Settings\My User``. Then, make a
164-
new file called ``c:\Documents and Settings\My User\_nipy\config.ini``
165-
with contents::
36+
Getting data files
37+
==================
16638

167-
[DATA]
168-
path=c:\some\path\share\nipy
39+
See :ref:`data_files`.
16940

17041
Guidelines
17142
==========

doc/devel/guidelines/testing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Temporary files
4141
If you need to create a temporary file during your testing, you should
4242
use either of these two methods:
4343

44-
#. `StringIO <http://docs.python.org/library/stringio.html>`_
44+
#. `StringIO <http://docs.python.org/library/stringio.html>`_
4545

4646
StringIO creates an in memory file-like object. The memory buffer
4747
is freed when the file is closed. This is the preferred method for
@@ -54,7 +54,7 @@ use either of these two methods:
5454
*suffix*.
5555

5656
.. Note::
57-
57+
5858
The tempfile module includes a convenience function
5959
*NamedTemporaryFile* which deletes the file automatically when
6060
it is closed. However, whether the files can be opened a
@@ -109,7 +109,7 @@ setup and teardown functions::
109109
...
110110

111111
def setup():
112-
# Suppress warnings during tests to reduce noise
112+
# Suppress warnings during tests to reduce noise
113113
warnings.simplefilter("ignore")
114114

115115
def teardown():
@@ -126,7 +126,7 @@ Running the full test suite
126126
For our tests, we have collected a set of fmri imaging data which are
127127
required for the tests to run. To do this, download the latest example
128128
data and template package files from `NIPY data packages`_. See
129-
:ref:`install-data`.
129+
:ref:`data-files`.
130130

131131
Running individual tests
132132
^^^^^^^^^^^^^^^^^^^^^^^^

doc/users/install_data.rst

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
.. _data-files:
2+
3+
######################
4+
Optional data packages
5+
######################
6+
7+
The source code has some very small data files to run the tests with,
8+
but it doesn't include larger example data files, or the all-important
9+
brain templates we all use. You can find packages for the optional data
10+
and template files at http://nipy.sourceforge.net/data-packages.
11+
12+
If you don't have these packages, then, when you run nipy installation,
13+
you will probably see messages pointing you to the packages you need.
14+
15+
*********************************************
16+
Data package installation as an administrator
17+
*********************************************
18+
19+
The installation procedure, for now, is very basic. For example, let us
20+
say that you need the 'nipy-templates' package at
21+
http://nipy.sourceforge.net/data-packages/nipy-templates-0.2.tar.gz
22+
. You simply download this archive, unpack it, and then run the standard
23+
``python setup.py install`` on it. On a unix system this might look
24+
like::
25+
26+
curl -O http://nipy.sourceforge.net/data-packages/nipy-templates-0.2.tar.gz
27+
tar zxvf nipy-templates-0.2.tar.gz
28+
cd nipy-templates-0.2
29+
sudo python setup.py install
30+
31+
On windows, download the file, extract the archive to a folder using the
32+
GUI, and then, using the windows shell or similar::
33+
34+
cd c:\path\to\extracted\files
35+
python setup.py install
36+
37+
*******************************************
38+
Non-administrator data package installation
39+
*******************************************
40+
41+
The simple ugly manual way
42+
==========================
43+
44+
These are instructions for using the command line in Unix. You can do similar
45+
things from Windows powershell.
46+
47+
* Locate your nipy user directory from the output of this::
48+
49+
python -c 'import nibabel.data; print(nibabel.data.get_nipy_user_dir())'
50+
51+
Call that directory ``<nipy-user>``. Let's imagine that, for you, this is
52+
``/home/me/.nipy``.
53+
* If that directory does not exist already, create it, e.g.::
54+
55+
mkdir /home/me/.nipy
56+
57+
* Make a directory in ``<nipy-user>`` called ``nipy``, e.g.::
58+
59+
mkdir /home/me/.nipy/nipy
60+
61+
* Go to http://nipy.sourceforge.net/data-packages
62+
* Download the latest *nipy-templates* and *nipy-data* packages
63+
* Unpack both these into some directory, e.g.::
64+
65+
mkdir data
66+
cd data
67+
tar zxvf ~/Downloads/nipy-data-0.2.tar.gz
68+
tar zxvf ~/Downloads/nipy-templates-0.2.tar.gz
69+
70+
* After you have unpacked the templates, you will have a directory called
71+
something like ``nipy-templates-0.2``. In that directory you should see a
72+
subdirectory called ``templates``. Copy / move / link the ``templates``
73+
subdirectory into ``<nipy-user>/nipy``, so you now have a directory
74+
``<nipy-user>/nipy/templates``. From unpacking the data, you should also have
75+
a directory like ``nipy-data-0.2`` with a subdirectory ``data``. Copy / move
76+
/ link that ``data`` directory into ``<nipy-user>/nipy`` as well. For
77+
example::
78+
79+
cd data
80+
cp -r nipy-data-0.2/data /home/me/.nipy/nipy
81+
cp -r nipy-templates-0.2/templates /home/me/.nipy/nipy
82+
83+
* Check whether that worked. Run the following command from the shell::
84+
85+
python -c 'import nipy.utils; print(nipy.utils.example_data, nipy.utils.templates)'
86+
87+
It should show something like::
88+
89+
(<nibabel.data.VersionedDatasource object at 0x101f8e410>, <nibabel.data.VersionedDatasource object at 0x10044b110>)
90+
91+
If it shows ``Bomber`` objects instead, something is wrong. Go back and check
92+
that you have the nipy home directory right, and that you have directories
93+
``<nipy-user>/nipy/data`` and ``<nipy-user>/nipy/templates>``, and that each
94+
of these two directories have a file ``config.ini`` in them.
95+
96+
The more general way
97+
====================
98+
99+
The commands for the sytem install above assume you are installing into the
100+
default system directories. If you want to install into a custom directory,
101+
then (in python, or ipython, or a text editor) look at the help for
102+
``nibabel.data.get_data_path()`` . There are instructions there for pointing
103+
your nipy installation to the installed data.
104+
105+
On unix
106+
-------
107+
108+
For example, say you installed with::
109+
110+
cd nipy-templates-0.2
111+
python setup.py install --prefix=/home/my-user/some-dir
112+
113+
Then you may want to do make a file ``~/.nipy/config.ini`` with the
114+
following contents::
115+
116+
[DATA]
117+
path=/home/my-user/some-dir/share/nipy
118+
119+
On windows
120+
----------
121+
122+
Say you installed with (windows shell)::
123+
124+
cd nipy-templates-0.2
125+
python setup.py install --prefix=c:\some\path
126+
127+
Then first, find out your home directory::
128+
129+
python -c "import os; print os.path.expanduser('~')"
130+
131+
Let's say that was ``c:\Documents and Settings\My User``. Then, make a
132+
new file called ``c:\Documents and Settings\My User\_nipy\config.ini``
133+
with contents::
134+
135+
[DATA]
136+
path=c:\some\path\share\nipy

doc/users/installation.rst

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,7 @@ To install, simply do::
103103

104104
python setup.py install --prefix=$HOME/local
105105

106-
.. _install-data:
107-
108106
Installing useful data files
109107
-----------------------------
110108

111-
Installing the data files is necessary to run the examples.
112-
113-
See :ref:`installing-data` for some instructions on installing data
114-
packages.
115-
116-
See :ref:`data-files` for details on how to customize the installation
117-
paths.
109+
See :ref:`data-files` for some instructions on installing data packages.

nipy/info.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@
100100
101101
%s
102102
103-
Check the instructions in the INSTALL file in the nipy source tree, or online at
104-
http://nipy.org/nipy/stable/devel/development_quickstart.html#optional-data-packages
103+
Check the instructions in the ``doc/users/install_data.rst`` file in the nipy
104+
source tree, or online at http://nipy.org/nipy/stable/users/install_data.html
105105
106106
If you have the package, have you set the path to the package correctly?"""
107107

0 commit comments

Comments
 (0)