Skip to content

update tests to py36, clean up documentation towards release #1977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 29, 2017
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ python:
- 2.7
- 3.4
- 3.5
- 3.6
env:
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler"
- INSTALL_DEB_DEPENDECIES=false NIPYPE_EXTRAS="doc,tests,fmri,profiler"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ENV PATH=/usr/local/miniconda/bin:$PATH \
# only use one thread - nipype will handle parallelization

# Installing precomputed python packages
ARG PYTHON_VERSION_MINOR=5
ARG PYTHON_VERSION_MINOR=6
RUN conda config --add channels conda-forge; sync && \
conda config --set always_yes yes --set changeps1 no; sync && \
conda install -y python=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} \
Expand Down
4 changes: 2 additions & 2 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ dependencies:
- if [ "$CIRCLE_TAG" != "" ]; then sed -i -E "s/(__version__ = )'[A-Za-z0-9.-]+'/\1'$CIRCLE_TAG'/" nipype/info.py; fi
# - e=1 && for i in {1..5}; do docker build -f docker/base.Dockerfile --rm=false -t nipype/base:latest . && e=0 && break || sleep 15; done && [ "$e" -eq "0" ] :
# timeout: 21600
- e=1 && for i in {1..5}; do docker build --rm=false -t nipype/nipype:latest -t nipype/nipype:py35 --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg VCS_REF=`git rev-parse --short HEAD` --build-arg VERSION=$CIRCLE_TAG . && e=0 && break || sleep 15; done && [ "$e" -eq "0" ] :
- e=1 && for i in {1..5}; do docker build --rm=false -t nipype/nipype:latest -t nipype/nipype:py36 --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg VCS_REF=`git rev-parse --short HEAD` --build-arg VERSION=$CIRCLE_TAG . && e=0 && break || sleep 15; done && [ "$e" -eq "0" ] :
timeout: 6000
- e=1 && for i in {1..5}; do docker build --rm=false -t nipype/nipype:py27 --build-arg PYTHON_VERSION_MAJOR=2 --build-arg PYTHON_VERSION_MINOR=7 --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` --build-arg VCS_REF=`git rev-parse --short HEAD` --build-arg VERSION=$CIRCLE_TAG-py27 . && e=0 && break || sleep 15; done && [ "$e" -eq "0" ] :
timeout: 6000
- docker save -o $HOME/docker/cache.tar nipype/base:latest nipype/nipype:py35 nipype/nipype:py27 :
- docker save -o $HOME/docker/cache.tar nipype/base:latest nipype/nipype:py36 nipype/nipype:py27 :
timeout: 6000

test:
Expand Down
5 changes: 5 additions & 0 deletions doc/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ Documentation

Previous versions: `0.12.0 <http://nipype.readthedocs.io/en/0.12.0/>`_ `0.11.0 <http://nipy.org/nipype/0.11.0>`_


.. container:: doc2

.. admonition:: Michael Notter's Nipype guide

Be sure to read `Michael's excellent tutorials <https://miykael.github.io/nipype_tutorial/>`_.

.. admonition:: Guides

.. hlist::
Expand Down
3 changes: 1 addition & 2 deletions doc/links_names.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@
.. _pythonxy: https://python-xy.github.io/
.. _EPD: http://www.enthought.com/products/epd.php
.. _Traits: http://code.enthought.com/projects/traits/
.. _Anaconda: https://www.continuum.io/downloads
.. _Canopy: https://www.enthought.com/products/canopy/
.. _Miniconda: https://conda.io/miniconda.html

.. Python imaging projects
.. _PyMVPA: http://www.pymvpa.org
Expand Down
40 changes: 13 additions & 27 deletions doc/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,30 @@ Downloading and installing
:maxdepth: 1

users/install
users/vagrant

Beginner's guide
================

Beginner's tutorials (IPython Notebooks). `Available here`__
Michael Notter's Nipype tutorial. `Available here`__

Michael Notter's Nipype guide. `Available here`__
__ https://miykael.github.io/nipype_tutorial/

Dissecting Nipype Workflows. `Available here`__
Nipype workshop materials
=========================

Introductory slides [older]. `Available here`__
Self-assessment questionnaire with links to learning about each piece. `Available here`__

__ https://github.com/mwaskom/nipype_concepts
__ http://miykael.github.com/nipype-beginner-s-guide/index.html
__ http://slideviewer.herokuapp.com/url/raw.github.com/nipy/nipype/master/examples/nipype_tutorial.ipynb?theme=sky
__ http://satra.github.com/intro2nipype
Lecture slides `Available here`__

User guides
===========
__ http://nipy.org/workshops/2017-03-boston/review.html
__ http://nipy.org/workshops/2017-03-boston/index.html

.. toctree::
:maxdepth: 1
`Docker containers <https://hub.docker.com/r/nipype/workshops/tags/>`_

`Github project for lectures <https://github.com/nipy/workshops/tree/gh-pages/2017-03-boston>`_
`Github project for dockerfiles + notebooks <https://github.com/nipy/workshops/tree/master/170327-nipype>`_

users/interface_tutorial
users/pipeline_tutorial
users/plugins
users/debug
`All notebooks visualized <http://nbviewer.jupyter.org/github/nipy/workshops/tree/master/170327-nipype/notebooks/>`_

Developer guides
================
Expand All @@ -47,16 +43,6 @@ Developer guides
:maxdepth: 1

devel/writing_custom_interfaces
devel/gitwash/index

.. include:: links_names.txt

Useful links for beginners
===========================

Getting started with Python - Tutorials. `Available here`__

Python for Beginners `Available here`__

__ http://www.codecademy.com/en/tracks/python
__ https://www.python.org/about/gettingstarted/
3 changes: 0 additions & 3 deletions doc/users/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@
:maxdepth: 2

install
vagrant

interface_tutorial
caching_tutorial

.. toctree::
:maxdepth: 1

pipeline_tutorial
plugins
config_file
debug
Expand Down
66 changes: 34 additions & 32 deletions doc/users/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,17 @@ This page covers the necessary steps to install Nipype.
Nipype for users
----------------

Using conda
~~~~~~~~~~~

Installing nipype from the conda-forge channel can be achieved by adding conda-forge to your channels with::

conda config --add channels conda-forge
Using docker
~~~~~~~~~~~~

You can follow the `Nipype tutorial <https://miykael.github.io/nipype_tutorial/>`_

Once the conda-forge channel has been enabled, nipype can be installed with::
Using conda
~~~~~~~~~~~

conda install nipype
Installing nipype from the conda-forge channel can be achieved by::

conda install --channel conda-forge nipype

It is possible to list all of the versions of nipype available on your platform with::

Expand All @@ -36,18 +35,23 @@ The installation process is similar to other Python packages.

If you already have a Python environment set up, you can do::

easy_install nipype

or::

pip install nipype


If you want to install all the optional features of ``nipype``,
use the following command (only for ``nipype>=0.13``)::
use the following command::

pip install nipype[all]

While `all` installs everything, one can also install select components as
listed below::

'doc': ['Sphinx>=1.4', 'matplotlib', 'pydotplus'],
'tests': ['pytest-cov', 'codecov'],
'nipy': ['nitime', 'nilearn', 'dipy', 'nipy', 'matplotlib'],
'profiler': ['psutil'],
'duecredit': ['duecredit'],
'xvfbwrapper': ['xvfbwrapper'],


Debian and Ubuntu
~~~~~~~~~~~~~~~~~
Expand All @@ -59,11 +63,14 @@ manager.
Mac OS X
~~~~~~~~

The easiest way to get nipype running on Mac OS X is to install Anaconda_ or
Canopy_ and then add nipype by executing::
The easiest way to get nipype running on Mac OS X is to install Miniconda_ and
follow the instructions above. If you have a non-conda environment you can
install nipype by typing::

easy_install nipype
pip install nipype

Note that the above procedure may require availability of gcc on your system
path to compile the traits package.

From source
~~~~~~~~~~~
Expand All @@ -79,47 +86,42 @@ If you downloaded the source distribution named something
like ``nipype-x.y.tar.gz``, then unpack the tarball, change into the
``nipype-x.y`` directory and install nipype using::

python setup.py install
pip install .

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


Testing the install
-------------------

The best way to test the install is checking nipype's version ::
The best way to test the install is checking nipype's version and then running
the tests::

python -c "import nipype; print(nipype.__version__)"

python -c "import nipype; nipype.test()"

Installation for developers
---------------------------

Developers should start `here <../devel/testing_nipype.html>`_.


Recommended Software
------------
--------------------

Strong Recommendations
~~~~~~~~~~~~~~~~~~~~~~

IPython_ 0.10.2 - 1.0.0
Interactive python environment. This is necessary for some parallel
components of the pipeline engine.
IPython_
Interactive python environment.

Matplotlib_ 1.0 - 1.2
Matplotlib_
Plotting library

`RDFLib <http://rdflib.readthedocs.org/en/latest/>`_ 4.1
RDFLibrary required for provenance export as RDF

Sphinx_ 1.1
Required for building the documentation

`Graphviz <http://www.graphviz.org/>`_
Required for building the documentation. The python wrapper package (``graphviz``)
and the program itself both need to be installed.
Required for building the documentation.

Interface Dependencies
~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -148,7 +150,7 @@ Slicer_
3.6 or later

Nipy_
0.1.2+20110404 or later
0.4 or later

Nitime_
(optional)
Expand Down
4 changes: 2 additions & 2 deletions doc/users/resource_sched_profiler.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. _resource_sched_profiler:

============================================
=============================================
Resource Scheduling and Profiling with Nipype
============================================
=============================================
The latest version of Nipype supports system resource scheduling and profiling.
These features allows users to ensure high throughput of their data processing
while also controlling the amount of computing resources a given workflow will
Expand Down
6 changes: 1 addition & 5 deletions nipype/external/due.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,7 @@ def _donothing_func(*args, **kwargs):
if 'due' in locals() and not hasattr(due, 'cite'):
raise RuntimeError(
"Imported due lacks .cite. DueCredit is now disabled")
except Exception as e:
if type(e).__name__ != 'ImportError':
import logging
logging.getLogger("duecredit").error(
"Failed to import duecredit due to %s" % str(e))
except ImportError:
# Initiate due stub
due = InactiveDueCreditCollector()
BibTeX = Doi = Url = _donothing_func
Expand Down
20 changes: 9 additions & 11 deletions nipype/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def get_nipype_gitversion():
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering']

description = 'Neuroimaging in Python: Pipelines and Interfaces'
Expand Down Expand Up @@ -94,16 +95,16 @@ def get_nipype_gitversion():
"""

# versions
NIBABEL_MIN_VERSION = '2.0.1'
NIBABEL_MIN_VERSION = '2.1.0'
NETWORKX_MIN_VERSION = '1.7'
NUMPY_MIN_VERSION = '1.6.2'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably raise to numpy>=1.11, I think the mmap issue was solved with that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since we support the mmap issue, perhaps we can change this after the release.

SCIPY_MIN_VERSION = '0.11'
TRAITS_MIN_VERSION = '4.6'
DATEUTIL_MIN_VERSION = '1.5'
PYTEST_MIN_VERSION = '3.0'
FUTURE_MIN_VERSION = '0.15.2'
FUTURE_MIN_VERSION = '0.16.0'
SIMPLEJSON_MIN_VERSION = '3.8.0'
PROV_MIN_VERSION = '1.4.0'
PROV_MIN_VERSION = '1.5.0'
CLICK_MIN_VERSION = '6.6.0'

NAME = 'nipype'
Expand Down Expand Up @@ -138,23 +139,20 @@ def get_nipype_gitversion():
'click>=%s' % CLICK_MIN_VERSION,
'funcsigs',
'configparser',
'pytest>=%s' % PYTEST_MIN_VERSION
'pytest>=%s' % PYTEST_MIN_VERSION,
'mock',
'pydotplus'
]

TESTS_REQUIRES = [
'pytest>=%s' % PYTEST_MIN_VERSION,
'pytest-cov',
'mock',
'codecov',
'dipy',
'nipy',
'matplotlib'
'codecov'
]

EXTRA_REQUIRES = {
'doc': ['Sphinx>=1.4', 'matplotlib', 'pydotplus'],
'tests': TESTS_REQUIRES,
'fmri': ['nitime', 'nilearn', 'dipy', 'nipy', 'matplotlib'],
'nipy': ['nitime', 'nilearn', 'dipy', 'nipy', 'matplotlib'],
'profiler': ['psutil'],
'duecredit': ['duecredit'],
'xvfbwrapper': ['xvfbwrapper'],
Expand Down
6 changes: 4 additions & 2 deletions nipype/pipeline/engine/tests/test_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,8 @@ def test_write_graph_runs(tmpdir):
mod2 = pe.Node(interface=EngineTestInterface(), name='mod2')
pipe.connect([(mod1, mod2, [('output1', 'input1')])])
try:
pipe.write_graph(graph2use=graph, simple_form=simple)
pipe.write_graph(graph2use=graph, simple_form=simple,
format='dot')
except Exception:
assert False, \
'Failed to plot {} {} graph'.format(
Expand Down Expand Up @@ -708,7 +709,8 @@ def test_deep_nested_write_graph_runs(tmpdir):
mod1 = pe.Node(interface=EngineTestInterface(), name='mod1')
parent.add_nodes([mod1])
try:
pipe.write_graph(graph2use=graph, simple_form=simple)
pipe.write_graph(graph2use=graph, simple_form=simple,
format='dot')
except Exception as e:
assert False, \
'Failed to plot {} {} deep graph: {!s}'.format(
Expand Down
Loading