Skip to content

Commit 48bd423

Browse files
authored
Merge pull request #32 from dartmouth-pbs/enh-dbic2
WiP RF+ENH: further RF to support flexible heuristic to name sequences so they follow BIDS in their naiming
2 parents c14df90 + 7b6f732 commit 48bd423

28 files changed

+3176
-629
lines changed

.coveragerc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[run]
2+
include = tests/*
3+
bin/*
4+
setup.py

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
*.pyc
2+
.cache/
3+
.coverage
4+
*.egg-info/

.travis.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
language: python
33
python:
44
- 2.7
5-
- 3.3
65
- 3.4
76
- 3.5
7+
- 3.6
88

99
cache:
1010
- apt
@@ -17,17 +17,25 @@ env:
1717

1818
before_install:
1919
# The ultimate one-liner setup for NeuroDebian repository
20-
# which might be needed later for tools
21-
#- bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh)
22-
#- travis_retry sudo apt-get update -qq
23-
# for now even remove requirements.txt since dependencies aren't avail
24-
- echo '' > requirements.txt
20+
- bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh)
21+
- travis_retry sudo apt-get update -qq
22+
- travis_retry sudo apt-get install git-annex-standalone dcm2niix
23+
# Install in our own virtualenv
24+
- python -m pip install --upgrade pip
25+
- pip install --upgrade virtualenv
26+
- virtualenv --python=python venv
27+
- source venv/bin/activate
28+
- python --version # just to check
2529
- pip install -r dev-requirements.txt
26-
- pip install codecov
30+
- pip install datalad
31+
- pip install codecov pytest
2732

33+
install:
34+
- git config --global user.email "[email protected]"
35+
- git config --global user.name "Travis Almighty"
2836

2937
script:
30-
- nosetests -s -v --with-doctest --doctest-tests --with-cov --cover-package . --logging-level=INFO tests
38+
- coverage run `which py.test` -s -v tests heuristics
3139

3240
after_success:
3341
- codecov

Dockerfile

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,31 @@ FROM continuumio/miniconda
33

44
MAINTAINER <[email protected]>
55

6-
RUN apt-get update && apt-get upgrade -y && apt-get install -y g++ && apt-get clean -y && apt-get autoclean -y && apt-get autoremove -y
7-
RUN cd /tmp && git clone https://github.com/neurolabusc/dcm2niix.git && cd dcm2niix/console/ && git checkout 60bab318ee738b644ebb1396bbb8cbe1b006218f && g++ -O3 -I. main_console.cpp nii_dicom.cpp jpg_0XC3.cpp ujpeg.cpp nifti1_io_core.cpp nii_ortho.cpp nii_dicom_batch.cpp nii_foreign.cpp -o dcm2niix -DmyDisableOpenJPEG -DmyDisableJasper && cp dcm2niix /usr/local/bin/
8-
RUN conda install -y -c conda-forge nipype && pip install https://github.com/moloney/dcmstack/archive/c12d27d2c802d75a33ad70110124500a83e851ee.zip && pip install https://github.com/nipy/nipype/archive/dd1ed4f0d5735c69c1743f29875acf09d23a62e0.zip
9-
RUN curl -O https://raw.githubusercontent.com/nipy/heudiconv/master/bin/heudiconv && chmod +x heudiconv && cp heudiconv /usr/local/bin/
10-
RUN curl -O https://raw.githubusercontent.com/nipy/heudiconv/master/heuristics/convertall.py && chmod +x convertall.py
6+
RUN apt-get update && apt-get upgrade -y && \
7+
apt-get install -y g++ pkg-config make && \
8+
apt-get clean -y && apt-get autoclean -y && apt-get autoremove -y
9+
RUN (wget -O- http://neuro.debian.net/lists/jessie.us-nh.full | tee /etc/apt/sources.list.d/neurodebian.sources.list) && \
10+
apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9 && \
11+
apt-get update -qq && apt-get install -y git-annex-standalone && \
12+
apt-get clean -y && apt-get autoclean -y && apt-get autoremove -y
13+
RUN conda install -y -c conda-forge nipype && \
14+
conda install cmake && \
15+
pip install https://github.com/moloney/dcmstack/archive/c12d27d2c802d75a33ad70110124500a83e851ee.zip && \
16+
pip install datalad && \
17+
conda clean -tipsy && rm -rf ~/.pip/
18+
RUN cd /tmp && git clone https://github.com/neurolabusc/dcm2niix.git && \
19+
cd dcm2niix && \
20+
git checkout 60bab318ee738b644ebb1396bbb8cbe1b006218f && \
21+
mkdir build && cd build && cmake -DBATCH_VERSION=ON .. && \
22+
make && make install && \
23+
cd / && rm -rf /tmp/dcm2niix
24+
25+
COPY bin/heudiconv /usr/local/bin/heudiconv
26+
RUN chmod +x /usr/local/bin/heudiconv
27+
RUN mkdir /heuristics
28+
COPY heuristics/convertall.py /heuristics
29+
RUN chmod +x /heuristics/convertall.py
30+
RUN git config --global user.email "[email protected]" && \
31+
git config --global user.name "Docker Almighty"
1132

1233
ENTRYPOINT ["/usr/local/bin/heudiconv"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function `infotodict`, which takes a single argument `seqinfo`.
8383

8484
* total_files_till_now
8585
* example_dcm_file
86-
* series_number
86+
* series_id
8787
* dcm_dir_name
8888
* unspecified2
8989
* unspecified3

0 commit comments

Comments
 (0)