Skip to content

Commit dfb4b2c

Browse files
committed
Merge remote-tracking branch 'upstream/master' into enh/dataset_description
2 parents 3e399b1 + ba3e2a6 commit dfb4b2c

File tree

13 files changed

+259
-194
lines changed

13 files changed

+259
-194
lines changed

.circleci/config.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
fi
4949
sed -i -E "s/(__version__ = )'[A-Za-z0-9.-]+'/\1'${CIRCLE_TAG:-$THISVERSION}'/" wrapper/fmriprep_docker.py
5050
sed -i -E "s/(var version = )'[A-Za-z0-9.-]+'/\1'${CIRCLE_TAG:-$THISVERSION}'/" docs/citing.rst
51+
sed -i "s/title = {FMRIPrep}/title = {FMRIPrep ${CIRCLE_TAG:-$THISVERSION}}/" fmriprep/data/boilerplate.bib
5152
# Build docker image
5253
e=1 && for i in {1..5}; do
5354
docker build \
@@ -230,6 +231,12 @@ jobs:
230231
keys:
231232
- regression-v0-{{ epoch }}
232233
- regression-v0-
234+
- run:
235+
name: Check PyPi preconditions
236+
command: |
237+
pip install "setuptools>=27.0" cython numpy twine future docutils
238+
python setup.py check -r -s
239+
python setup.py sdist
233240
- run:
234241
name: Load Docker image layer cache
235242
no_output_timeout: 30m
@@ -689,8 +696,9 @@ jobs:
689696
- run:
690697
name: Deploy to PyPi
691698
command: |
692-
pip install "setuptools>=27.0" cython numpy twine future
699+
pip install "setuptools>=27.0" cython numpy twine future docutils
693700
echo "${CIRCLE_TAG}" > fmriprep/VERSION
701+
python setup.py check -r -s
694702
python setup.py sdist
695703
twine upload dist/*
696704
cd wrapper && python setup.py sdist

.github/stale.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 300
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 20
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- pinned
8+
- security
9+
- feature
10+
- help wanted
11+
- low priority
12+
# Label to use when marking an issue as stale
13+
staleLabel: stale
14+
# Comment to post when marking an issue as stale. Set to `false` to disable
15+
markComment: >
16+
This issue has been automatically marked as stale because it has not had
17+
recent activity. It will be closed if no further activity occurs. Thank you
18+
for your contributions.
19+
# Comment to post when closing a stale issue. Set to `false` to disable
20+
closeComment: false

CONTRIBUTING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,21 @@ It can also be helpful to test your changes locally, using an [FMRIPREP developm
5454

5555
A member of the development team will review your changes to confirm that they can be merged into the main codebase.
5656

57+
Pull requests titles should begin with a descriptive prefix:
58+
59+
* ``ENH``: enhancements or new features
60+
* ``FIX``: bug fixes
61+
* ``TST``: new or updated tests
62+
* ``DOC``: new or updated documentation
63+
* ``STY``: style changes
64+
* ``REF``: refactoring existing code
65+
* ``CI``: updates to continous integration infrastructure
66+
* ``MAINT``: general maintenance
67+
68+
For example: `[ENH] Support for SB-reference in multi-band datasets`
69+
70+
For works-in-progress, add the ``WIP`` tag in addition to the descriptive prefix.
71+
Pull-requests tagged with ``[WIP]`` will not be merged until the tag is removed.
5772

5873
## FMRIPREP coding style guide
5974

@@ -105,6 +120,11 @@ We welcome and recognize all contributions from documentation to testing to code
105120
You can see a list of current contributors in our [zenodo file][link_zenodo].
106121
If you are new to the project, don't forget to add your name and affiliation there!
107122

123+
## Licensing
124+
125+
fMRIPrep is licensed under the BSD 3-clause license. Any contributions will be licensed under
126+
the same terms.
127+
108128
## Thank you!
109129

110130
You're awesome. :wave::smiley:

docs/installation.rst

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Installation
66

77
There are four ways to use fmriprep: on the free cloud service OpenNeuro.org,
88
in a `Docker Container`_, in a `Singularity Container`_, or in a `Manually
9-
Prepared Environment`_.
9+
Prepared Environment (Python 3.5+)`_.
1010
Using OpenNeuro or a local container method is highly recommended.
1111
Once you are ready to run fmriprep, see Usage_ for details.
1212

@@ -159,8 +159,8 @@ If the data to be preprocessed is also on the HPC, you are ready to run fmriprep
159159
--participant-label 387 --nthreads 16 \
160160
--omp-nthreads 16
161161

162-
Manually Prepared Environment
163-
=============================
162+
Manually Prepared Environment (Python 3.5+)
163+
===========================================
164164

165165
.. warning::
166166

@@ -170,15 +170,36 @@ Manually Prepared Environment
170170
Make sure all of fmriprep's `External Dependencies`_ are installed.
171171
These tools must be installed and their binaries available in the
172172
system's ``$PATH``.
173-
In particular, FreeSurfer requires a license file (see :ref:`fs_license`).
173+
A relatively interpretable description of how your environment can be set-up
174+
is found in the `Dockerfile <https://github.com/poldracklab/fmriprep/blob/master/Dockerfile>`_.
175+
As an additional installation setting, FreeSurfer requires a license file (see :ref:`fs_license`).
174176

175-
If you have pip installed, install fmriprep ::
177+
On a functional Python 3.5 (or above) environment with ``pip`` installed,
178+
fMRIPrep can be installed using the habitual command ::
176179

177180
$ pip install fmriprep
178181

179-
If you have your data on hand, you are ready to run fmriprep: ::
182+
Check your installation with the ``--version`` argument ::
180183

181-
$ fmriprep data/dir output/dir participant --participant-label label
184+
$ fmriprep --version
185+
186+
187+
External Dependencies
188+
---------------------
189+
190+
FMRIPrep is written using Python 3.5 (or above), and is based on
191+
nipype_.
192+
193+
FMRIPrep requires some other neuroimaging software tools that are
194+
not handled by the Python's packaging system (Pypi) used to deploy
195+
the ``fmriprep`` package:
196+
197+
- FSL_ (version 5.0.9)
198+
- ANTs_ (version 2.2.0 - NeuroDocker build)
199+
- AFNI_ (version Debian-16.2.07)
200+
- `C3D <https://sourceforge.net/projects/c3d/>`_ (version 1.0.0)
201+
- FreeSurfer_ (version 6.0.1)
202+
- `ICA-AROMA <https://github.com/rhr-pruim/ICA-AROMA/>`_ (version 0.4.1-beta)
182203

183204

184205
.. _fs_license:
@@ -232,17 +253,3 @@ would be equivalent to the latest example: ::
232253
-v /path/to_output/dir:/out poldracklab/fmriprep:1.0.0 \
233254
/data /out participant
234255
...
235-
236-
237-
External Dependencies
238-
=====================
239-
240-
FMRIPrep is implemented using nipype_, but it requires some other neuroimaging
241-
software tools:
242-
243-
- FSL_ (version 5.0.9)
244-
- ANTs_ (version 2.2.0 - NeuroDocker build)
245-
- AFNI_ (version Debian-16.2.07)
246-
- `C3D <https://sourceforge.net/projects/c3d/>`_ (version 1.0.0)
247-
- FreeSurfer_ (version 6.0.1)
248-
- `ICA-AROMA <https://github.com/rhr-pruim/ICA-AROMA/>`_ (version 0.4.1-beta)

docs/pull_request_template.md

Lines changed: 26 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<!--
2+
Text in these brackets are comments, and won't be visible when you submit your pull request.
3+
If this is your first contribution, please take the time to read these, in particular the comment
4+
beginning "Welcome, new contributors!".
5+
-->
6+
17
## Changes proposed in this pull request
28

39
<!--
@@ -15,53 +21,29 @@ of ongoing development efforts and possible overlaps between contributions).
1521
Please summarize here the main changes to the documentation that the reviewers should be aware of.
1622
-->
1723

18-
## Pull-request guidelines:
24+
25+
1926
<!--
20-
Please make sure you have read the PR guidelines below, and checked
21-
all boxes that apply at the bottom.
22-
-->
23-
1. We invite you to list yourself as a *fMRIPrep* contributor, so if your name
24-
is not already mentioned, please modify the
25-
[``.zenodo.json``](https://github.com/poldracklab/fmriprep/blob/master/.zenodo.json)
26-
file with your data right above Russ' entry. Example:
27-
```
28-
{
29-
"name": "Contributor, New FMRIPrep",
30-
"affiliation": "Department of fMRI prep'ing, Open Science Made-Up University",
31-
"orcid": "<your id>"
32-
},
33-
{
34-
"name": "Poldrack, Russell A.",
35-
"affiliation": "Department of Psychology, Stanford University",
36-
"orcid": "0000-0001-6755-0259"
37-
},
38-
```
39-
40-
2. By submitting this request you acknowledge that your contributions are available under the BSD 3-Clause license.
27+
Welcome, new contributors!
4128
42-
3. Use a descriptive prefix, between brackets for your PR: ``ENH`` (enhancement), ``FIX``, ``TST``, ``DOC``, ``STY``,
43-
``REF`` (refactor), ``CI`` (continous integration), ``MAINT`` (maintenance). Example:
44-
```
45-
[ENH] Support for SB-reference in multi-band datasets
46-
```
47-
For works-in-progress, add the ``WIP`` tag in addition to the descriptive prefix.
48-
Pull-requests tagged with ``[WIP]`` will not merged in until the tag is removed.
29+
We ask you to read through the Contributing Guide:
30+
https://github.com/poldracklab/fmriprep/blob/master/CONTRIBUTING.md
4931
50-
4. Your PR will be reviewed according to the following
51-
[template](https://github.com/poldracklab/fmriprep/wiki/Reviewing-a-Pull-Request).
32+
These are guidelines intended to make communication easier by describing a consistent process, but
33+
don't worry if you don't get it everything exactly "right" on the first try.
5234
53-
5. Documentation is a fundamental aspect to the *glass-box* philosophy that *fMRIPrep* abides by.
54-
Please understand that the *fMRIPrep* team may (are likely to) request you to improve the documentation
55-
provided with this PR, within the PR or in future PRs.
56-
35+
To boil it down, here are some highlights:
5736
58-
**Please review and check the following**:
59-
<!-- replace the empty checkboxes [ ] below with checked ones [x] accordingly -->
37+
1) Consider starting a conversation in the issues list before submitting a pull request. The discussion might save you a
38+
lot of time coding.
39+
2) Please use descriptive prefixes in your pull request title, such as "ENH:" for an enhancement or "FIX:" for a bug fix.
40+
(See the Contributing guide for the full set.) And consider adding a "WIP" tag for works-in-progress.
41+
3) Any code you submit will be licensed under the same terms (BSD 3-Clause) as the rest of fMRIPrep.
42+
4) We invite every contributor to add themselves to the `.zenodo.json` file
43+
(https://github.com/poldracklab/fmriprep/blob/master/.zenodo.json), which will result in your being listed as an author
44+
at the next release. Please add yourself as the next-to-last entry, just above Russ.
6045
61-
- [ ] I have read the [guidelines for contributions](https://github.com/poldracklab/fmriprep/blob/master/CONTRIBUTING.md).
62-
- [ ] I understand that my contributions will not be merged unless the work is
63-
finished (i.e. no ``[WIP]`` tag remains in the title of my PR) and tests pass.
64-
- [ ] The proposed code follows the
65-
[coding style](https://github.com/poldracklab/fmriprep/blob/master/CONTRIBUTING.md#fmriprep-coding-style-guide),
66-
to the extent I understood them (and I will address any comments raised by the PR's reviewers in this regard).
67-
- [ ] \(Optional\) I opt-out from being listed in the `.zenodo.json` file.
46+
A pull request is a conversation. We may ask you to make some changes before accepting your PR,
47+
and likewise, you should feel free to ask us any questions you have.
48+
49+
-->

fmriprep/__about__.py

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# -*- coding: utf-8 -*-
2+
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
3+
# vi: set ft=python sts=4 ts=4 sw=4 et:
4+
"""
5+
Base module variables
6+
"""
7+
8+
from ._version import get_versions
9+
__version__ = get_versions()['version']
10+
del get_versions
11+
12+
__author__ = 'The CRN developers'
13+
__copyright__ = 'Copyright 2018, Center for Reproducible Neuroscience, Stanford University'
14+
__credits__ = ['Craig Moodie', 'Ross Blair', 'Oscar Esteban', 'Chris Gorgolewski',
15+
'Shoshana Berleant', 'Christopher J. Markiewicz', 'Russell A. Poldrack']
16+
__license__ = '3-clause BSD'
17+
__maintainer__ = 'Ross Blair'
18+
__email__ = '[email protected]'
19+
__status__ = 'Prototype'
20+
__url__ = 'https://github.com/poldracklab/fmriprep'
21+
__packagename__ = 'fmriprep'
22+
__description__ = ("FMRIprep is a functional magnetic resonance image pre-processing pipeline "
23+
"that is designed to provide an easily accessible, state-of-the-art interface "
24+
"that is robust to differences in scan acquisition protocols and that requires "
25+
"minimal user input, while providing easily interpretable and comprehensive "
26+
"error and output reporting.")
27+
__longdesc__ = """\
28+
Preprocessing of functional MRI (fMRI) involves numerous steps to clean and standardize
29+
data before statistical analysis.
30+
Generally, researchers create ad hoc preprocessing workflows for each new dataset,
31+
building upon a large inventory of tools available for each step.
32+
The complexity of these workflows has snowballed with rapid advances in MR data
33+
acquisition and image processing techniques.
34+
FMRIPrep is an analysis-agnostic tool that addresses the challenge of robust and
35+
reproducible preprocessing for task-based and resting fMRI data.
36+
FMRIPrep automatically adapts a best-in-breed workflow to the idiosyncrasies of
37+
virtually any dataset, ensuring high-quality preprocessing with no manual intervention,
38+
while providing easily interpretable and comprehensive error and output reporting.
39+
It performs basic preprocessing steps (coregistration, normalization, unwarping, noise
40+
component extraction, segmentation, skullstripping etc.) providing outputs that can be
41+
easily submitted to a variety of group level analyses, including task-based or resting-state
42+
fMRI, graph theory measures, surface or volume-based statistics, etc.
43+
44+
The workflow is based on `Nipype <https://nipype.readthedocs.io>`_ and encompases a large
45+
set of tools from well-known neuroimaging packages, including
46+
`FSL <https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/>`_,
47+
`ANTs <https://stnava.github.io/ANTs/>`_,
48+
`FreeSurfer <https://surfer.nmr.mgh.harvard.edu/>`_,
49+
`AFNI <https://afni.nimh.nih.gov/>`_,
50+
and `Nilearn <https://nilearn.github.io/>`_.
51+
This pipeline was designed to provide the best software implementation for each state of
52+
preprocessing, and will be updated as newer and better neuroimaging software becomes
53+
available.
54+
55+
This tool allows you to easily do the following:
56+
57+
* Take fMRI data from *unprocessed* (only reconstructed) to ready for analysis.
58+
* Implement tools from different software packages.
59+
* Achieve optimal data processing quality by using the best tools available.
60+
* Generate preprocessing-assessment reports, with which the user can easily identify problems.
61+
* Receive verbose output concerning the stage of preprocessing for each subject, including
62+
meaningful errors.
63+
* Automate and parallelize processing steps, which provides a significant speed-up from
64+
typical linear, manual processing.
65+
66+
FMRIPrep has the potential to transform fMRI research by equipping
67+
neuroscientists with a high-quality, robust, easy-to-use and transparent preprocessing workflow
68+
which can help ensure the validity of inference and the interpretability of their results.
69+
70+
[Pre-print doi:`10.1101/306951 <https://doi.org/10.1101/306951>`_]
71+
[Documentation `fmriprep.org <https://fmriprep.readthedocs.io>`_]
72+
[Software doi:`10.5281/zenodo.852659 <https://doi.org/10.5281/zenodo.852659>`_]
73+
[Support `neurostars.org <https://neurostars.org/tags/fmriprep>`_]
74+
"""
75+
76+
DOWNLOAD_URL = (
77+
'https://github.com/poldracklab/{name}/archive/{ver}.tar.gz'.format(
78+
name=__packagename__, ver=__version__))
79+
80+
81+
SETUP_REQUIRES = [
82+
'setuptools>=18.0',
83+
'numpy',
84+
'cython',
85+
]
86+
87+
REQUIRES = [
88+
'numpy',
89+
'lockfile',
90+
'future',
91+
'scikit-learn',
92+
'matplotlib>=2.2.0',
93+
'nilearn',
94+
'sklearn',
95+
'nibabel>=2.2.1',
96+
'pandas',
97+
'grabbit',
98+
'pybids>=0.6.3',
99+
'nitime',
100+
'nipype>=1.1.1',
101+
'niworkflows>=0.4.2',
102+
'statsmodels',
103+
'seaborn',
104+
'indexed_gzip>=0.8.2',
105+
'scikit-image',
106+
'versioneer',
107+
]
108+
109+
LINKS_REQUIRES = [
110+
]
111+
112+
TESTS_REQUIRES = [
113+
"mock",
114+
"codecov",
115+
"pytest",
116+
]
117+
118+
EXTRA_REQUIRES = {
119+
'doc': [
120+
'sphinx>=1.5.3',
121+
'sphinx_rtd_theme',
122+
'sphinx-argparse',
123+
'pydotplus',
124+
'pydot>=1.2.3',
125+
'packaging',
126+
'nbsphinx',
127+
],
128+
'tests': TESTS_REQUIRES,
129+
'duecredit': ['duecredit'],
130+
'datalad': ['datalad'],
131+
'resmon': ['psutil>=5.4.0'],
132+
'sentry': ['raven'],
133+
}
134+
EXTRA_REQUIRES['docs'] = EXTRA_REQUIRES['doc']
135+
136+
# Enable a handle to install all extra dependencies at once
137+
EXTRA_REQUIRES['all'] = list(set([
138+
v for deps in EXTRA_REQUIRES.values() for v in deps]))
139+
140+
CLASSIFIERS = [
141+
'Development Status :: 3 - Alpha',
142+
'Intended Audience :: Science/Research',
143+
'Topic :: Scientific/Engineering :: Image Recognition',
144+
'License :: OSI Approved :: BSD License',
145+
'Programming Language :: Python :: 3.5',
146+
'Programming Language :: Python :: 3.6',
147+
'Programming Language :: Python :: 3.7',
148+
]

0 commit comments

Comments
 (0)