Skip to content

Commit d919825

Browse files
committed
refactor
1 parent 9d5831f commit d919825

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+3990
-1650
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dmriprep/_version.py export-subst

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
* dmripreproc version:
1+
* dmriprep version:
22
* Python version:
33
* Operating System:
44

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,6 @@ ENV/
103103

104104
# Mac OS nonsense:
105105
.DS_Store
106+
107+
# miscellaneous
108+
references/

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ deploy:
3131
secure: PLEASE_REPLACE_ME
3232
on:
3333
tags: true
34-
repo: tigrlab/dmripreproc
34+
repo: tigrlab/dmriprep
3535
python: 3.7

AUTHORS.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
============
1+
=======
22
Credits
3-
============
3+
=======
44

55
Development Leads
66
-----------------
77

8+
- Anisha Keshavan <[email protected]> [Corresponding developer]
9+
- Adam Richie-Halford <[email protected]>
10+
811
- Michael Joseph <[email protected]> [Corresponding developer]
912
- Salim Mansour <[email protected]>
1013

1114
Contributors
1215
------------
1316

14-
None yet. Why not be the first?
17+
- Ariel Rokem <[email protected]>
18+
- Michael Joseph <[email protected]>
19+
- Salim Mansour <[email protected]>

CONTRIBUTING.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Contributing
77
Contributions are welcome, and they are greatly appreciated! Every little bit
88
helps, and credit will always be given.
99

10-
Installing a development version of dmripreproc
10+
Installing a development version of dmriprep
1111
--------------------------------------------
1212

13-
First, you can install a development version of dmripreproc by cloning this repository
13+
First, you can install a development version of dmriprep by cloning this repository
1414
and then typing::
1515

1616
$ pip install -e .[dev]
@@ -32,7 +32,7 @@ You can contribute in many ways:
3232
Report Bugs
3333
~~~~~~~~~~~
3434

35-
Report bugs at https://github.com/tigrlab/dmripreproc/issues.
35+
Report bugs at https://github.com/nipy/dmriprep/issues.
3636

3737
If you are reporting a bug, please include:
3838

@@ -55,14 +55,14 @@ and "help wanted" is open to whoever wants to implement it.
5555
Write Documentation
5656
~~~~~~~~~~~~~~~~~~~
5757

58-
dmripreproc could always use more documentation, whether as part of the
59-
official dmripreproc docs, in docstrings, or even on the web in blog posts,
58+
dmriprep could always use more documentation, whether as part of the
59+
official dmriprep docs, in docstrings, or even on the web in blog posts,
6060
articles, and such.
6161

6262
Submit Feedback
6363
~~~~~~~~~~~~~~~
6464

65-
The best way to send feedback is to file an issue at https://github.com/tigrlab/dmripreproc/issues.
65+
The best way to send feedback is to file an issue at https://github.com/nipy/dmriprep/issues.
6666

6767
If you are proposing a feature:
6868

@@ -74,17 +74,17 @@ If you are proposing a feature:
7474
Get Started!
7575
------------
7676

77-
Ready to contribute? Here's how to set up `dmripreproc` for local development.
77+
Ready to contribute? Here's how to set up `dmriprep` for local development.
7878

79-
1. Fork the `dmripreproc` repo on GitHub.
79+
1. Fork the `dmriprep` repo on GitHub.
8080
2. Clone your fork locally::
8181

82-
$ git clone [email protected]:your_name_here/dmripreproc.git
82+
$ git clone [email protected]:your_name_here/dmriprep.git
8383

8484
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
8585

86-
$ mkvirtualenv dmripreproc
87-
$ cd dmripreproc/
86+
$ mkvirtualenv dmriprep
87+
$ cd dmriprep/
8888
$ python setup.py develop
8989

9090
4. Create a branch for local development::
@@ -96,7 +96,7 @@ Ready to contribute? Here's how to set up `dmripreproc` for local development.
9696
5. When you're done making changes, check that your changes pass flake8 and the
9797
tests, including testing other Python versions with tox::
9898

99-
$ flake8 dmripreproc tests
99+
$ flake8 dmriprep tests
100100
$ python setup.py test or py.test
101101
$ tox
102102

@@ -120,7 +120,7 @@ Before you submit a pull request, check that it meets these guidelines:
120120
your new functionality into a function with a docstring, and add the
121121
feature to the list in README.rst.
122122
3. The pull request should work for Python 3.5, 3.6 and 3.7, and for PyPy. Check
123-
https://travis-ci.org/tigrlab/dmripreproc/pull_requests
123+
https://travis-ci.org/tigrlab/dmriprep/pull_requests
124124
and make sure that the tests pass for all supported Python versions.
125125

126126
When opening a pull request, please use one of the following prefixes:
@@ -137,7 +137,7 @@ Tips
137137

138138
To run a subset of tests::
139139

140-
$ py.test tests.test_dmripreproc
140+
$ py.test tests.test_dmriprep
141141

142142

143143
Deploying

Dockerfile

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM poldracklab/fmriprep:1.3.2
1+
# Use Ubuntu 16.04 LTS
2+
FROM ubuntu:xenial-20190610
23

34
# Used command:
45
# neurodocker generate docker --base=debian:stretch --pkg-manager=apt
@@ -8,16 +9,19 @@ FROM poldracklab/fmriprep:1.3.2
89
# Getting required installation tools
910
RUN apt-get update && \
1011
apt-get install -y --no-install-recommends \
12+
apt-utils \
13+
bzip2 \
14+
ca-certificates \
15+
curl \
16+
locales \
17+
unzip \
1118
bc \
1219
libtool \
1320
tar \
1421
dpkg \
15-
curl \
1622
wget \
17-
unzip \
1823
gcc \
1924
git \
20-
bzip2 \
2125
libstdc++6
2226

2327
# Neurodocker Setup
@@ -52,10 +56,12 @@ RUN export ND_ENTRYPOINT="/neurodocker/startup.sh" \
5256

5357
ENTRYPOINT ["/neurodocker/startup.sh"]
5458

59+
# install ANTS v2.3.1
60+
curl -sSL https://github.com/ANTsX/ANTs/archive/v2.3.1.tar.gz
61+
62+
5563
# ANTS (used from BIDS-Apps https://github.com/BIDS-Apps/dockerfile-templates/blob/master/ANTs/Dockerfile)
56-
RUN apt-get update && \
57-
apt-get install -y curl && \
58-
mkdir -p /opt/ants && \
64+
RUN mkdir -p /opt/ants && \
5965
curl -sSL "https://github.com/stnava/ANTs/releases/download/v2.1.0/Linux_Ubuntu14.04.tar.bz2" \
6066
| tar -xjC /opt/ants --strip-components 1 && \
6167
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@@ -193,12 +199,12 @@ RUN apt-get update && \
193199
apt-get install -y --no-install-recommends \
194200
libopenblas-base
195201

196-
# setting up an install of dmripreproc (manual version) inside the container
197-
ADD https://api.github.com/repos/TIGRLab/dmripreproc/git/refs/heads/master version.json
198-
RUN git clone -b master https://github.com/TIGRLab/dmripreproc.git
199-
#RUN mkdir dmripreproc
200-
#COPY ./ dmripreproc/
201-
RUN cd dmripreproc && ls && python setup.py install && pip list
202+
# setting up an install of dmriprep (manual version) inside the container
203+
ADD https://api.github.com/repos/TIGRLab/dmriprep/git/refs/heads/master version.json
204+
RUN git clone -b master https://github.com/TIGRLab/dmriprep.git
205+
#RUN mkdir dmriprep
206+
#COPY ./ dmriprep/
207+
RUN cd dmriprep && ls && python setup.py install && pip list
202208
RUN pip install pybids==0.9.1 && pip list
203209

204210
ENTRYPOINT ["dmriprep"]

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ recursive-exclude * __pycache__
99
recursive-exclude * *.py[co]
1010

1111
recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif
12+
include versioneer.py
13+
include dmriprep/_version.py

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ clean-test: ## remove test and coverage artifacts
5151
rm -fr .pytest_cache
5252

5353
lint: ## check style with flake8
54-
flake8 dmripreproc tests
54+
flake8 dmriprep tests
5555

5656
test: ## run tests quickly with the default Python
5757
py.test
@@ -60,15 +60,15 @@ test-all: ## run tests on every Python version with tox
6060
tox
6161

6262
coverage: ## check code coverage quickly with the default Python
63-
coverage run --source dmripreproc -m pytest
63+
coverage run --source dmriprep -m pytest
6464
coverage report -m
6565
coverage html
6666
$(BROWSER) htmlcov/index.html
6767

6868
docs: ## generate Sphinx HTML documentation, including API docs
69-
rm -f docs/dmripreproc.rst
69+
rm -f docs/dmriprep.rst
7070
rm -f docs/modules.rst
71-
sphinx-apidoc -o docs/ dmripreproc
71+
sphinx-apidoc -o docs/ dmriprep
7272
$(MAKE) -C docs clean
7373
$(MAKE) -C docs html
7474
$(BROWSER) docs/_build/html/index.html

README.rst

Lines changed: 58 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,88 @@
1-
.. image:: https://codecov.io/gh/TIGRLab/dmripreproc/branch/master/graph/badge.svg
1+
.. highlight:: shell
2+
3+
===========
4+
dmriprep
5+
===========
6+
7+
.. image:: https://codecov.io/gh/TIGRLab/dmriprep/branch/master/graph/badge.svg
28
:alt: Codecov Badge
3-
:target: https://codecov.io/gh/TIGRLab/dmripreproc
9+
:target: https://codecov.io/gh/TIGRLab/dmriprep
410
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
511
:alt: Black Badge
612
:target: https://github.com/python/black
713
.. image:: https://api.codacy.com/project/badge/Grade/f45ec5c64894427a8860cc87cda1910a
814
:alt: Codacy Badge
9-
:target: https://app.codacy.com/app/josephmje/dmripreproc?utm_source=github.com&utm_medium=referral&utm_content=TIGRLab/dmripreproc&utm_campaign=Badge_Grade_Dashboard
10-
11-
# <img alt="dmripreproc" src="docs/img/dmripreproc_icon.svg" height="128"> dmripreproc
15+
:target: https://app.codacy.com/app/josephmje/dmriprep?utm_source=github.com&utm_medium=referral&utm_content=TIGRLab/dmriprep&utm_campaign=Badge_Grade_Dashboard
1216

1317
Preprocessing of neuroimaging data in preparation for AFQ analysis
18+
------------------------------------------------------------------
1419

1520
* Free software: BSD license
16-
* Documentation: https://dmripreproc.readthedocs.io.
21+
* Documentation: https://dmriprep.readthedocs.io.
1722

18-
## Preparing your data
23+
Preparing your data
24+
-------------------
1925

2026
You should have raw data organized in the BIDS format. Also, you should have run Freesurfer and the results should be in a derivatives/ folder:
2127

22-
BIDS_input_dir
23-
├── sub-01
24-
│   ├── dwi
25-
│ │   ├── sub-01_ses-01_dwi.nii.gz
26-
│ │   ├── sub-01_ses-01_dwi.bval
27-
│ │   ├── sub-01_ses-01_dwi.bvec
28-
│   ├── fmap
29-
│ │   ├── sub-01_ses-01_acq-dwi_dir-AP_epi.nii.gz
30-
│ │   ├── sub-01_ses-01_acq-dwi_dir-PA_epi.nii.gz
31-
│ │   ├── sub-01_ses-01_acq-dwi_dir-AP_epi.json
32-
│ │   ├── sub-01_ses-01_acq-dwi_dir-PA_epi.json
33-
├── derivatives
34-
│   ├── sub-01
35-
│ │   ├── freesurfer
36-
37-
## Quickstart
38-
39-
```bash
40-
git clone https://github.com/tigrlab/dmripreproc
41-
cd dmripreproc
42-
python setup.py install
43-
44-
dmripreproc $BIDS_INPUT_DIR $OUTPUT_DIR --participant-label 01
28+
```
29+
bids
30+
├── derivatives
31+
│   └── sub-01
32+
│   └── freesurfer
33+
└── sub-01
34+
├── dwi
35+
│   ├── sub-01_ses-01_dwi.bval
36+
│   ├── sub-01_ses-01_dwi.bvec
37+
│   ├── sub-01_ses-01_dwi.json
38+
│   └── sub-01_ses-01_dwi.nii.gz
39+
└── fmap
40+
├── sub-01_ses-01_acq-dwi_dir-AP_epi.json
41+
├── sub-01_ses-01_acq-dwi_dir-AP_epi.nii.gz
42+
├── sub-01_ses-01_acq-dwi_dir-PA_epi.json
43+
└── sub-01_ses-01_acq-dwi_dir-PA_epi.nii.gz
4544
```
4645

47-
```bash
48-
git clone https://github.com/tigrlab/dmripreproc
49-
cd dmripreproc
50-
make docker
46+
Quickstart
47+
----------
48+
49+
.. code-block:: bash
50+
git clone https://github.com/tigrlab/dmriprep
51+
cd dmriprep
52+
python setup.py install
5153
52-
# If you don't want to log into the docker image:
54+
dmriprep $BIDS_INPUT_DIR $OUTPUT_DIR --participant-label 01
5355
54-
docker run -ti -v $BIDS_INPUT_DIR:/inputs -v $OUTPUT_DIR:/outputs dmripreproc:prod dmripreproc /inputs /outputs
56+
.. code-block:: bash
57+
git clone https://github.com/tigrlab/dmriprep
58+
cd dmriprep
59+
make docker
5560

56-
# If you want to log into the image:
61+
If you don't want to log into the docker image:
62+
.. code-block:: bash
63+
docker run -ti -v $BIDS_INPUT_DIR:/inputs -v $OUTPUT_DIR:/outputs dmriprep:prod dmriprep /inputs /outputs
5764

58-
docker run -ti -v $BIDS_INPUT_DIR:/inputs -v $OUTPUT_DIR:/outputs dmripreproc:prod
65+
If you want to log into the image:
66+
.. code-block:: bash
67+
docker run -ti -v $BIDS_INPUT_DIR:/inputs -v $OUTPUT_DIR:/outputs dmriprep:prod
5968

60-
# Run this inside the docker image:
61-
dmripreproc /inputs /outpus --participant-label 01
62-
```
69+
Run this inside the docker image:
70+
.. code-block:: bash
71+
dmriprep /inputs /output --participant-label 01
6372

64-
## Features
73+
Features
74+
--------
6575

6676
* TODO
6777

68-
## Contributing
78+
Contributing
79+
------------
6980

70-
We love contributions! dmripreproc is open source, built on open source,
81+
We love contributions! dmriprep is open source, built on open source,
7182
and we'd love to have you hang out in our community.
7283

7384
We have developed some [guidelines](CONTRIBUTING.rst) for contributing to
74-
dmripreproc.
85+
dmriprep.
7586

7687
**Imposter syndrome disclaimer**: We want your help. No, really.
7788

@@ -96,7 +107,8 @@ most valuable to the project as a whole, because you're coming to the
96107
project with fresh eyes, so you can see the errors and assumptions that
97108
seasoned contributors have glossed over.
98109

99-
## Credits
110+
Credits
111+
-------
100112

101113
This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [`audreyr/cookiecutter-pypackage`](https://github.com/audreyr/cookiecutter-pypackage) project template.
102114

0 commit comments

Comments
 (0)