File tree 7 files changed +52
-34
lines changed
7 files changed +52
-34
lines changed Original file line number Diff line number Diff line change 17
17
# They may need to be rebalanced in the future.
18
18
case ${CIRCLE_NODE_INDEX} in
19
19
0)
20
- docker run --rm -it -e FSL_COURSE_DATA=" /data/examples/nipype-fsl_course_data" -v $HOME /examples:/data/examples:ro -v $WORKDIR :/work -w /src/nipype nipype/nipype:py27 /usr/bin/run_pytests.sh py27 && \
21
- docker run --rm -it -e FSL_COURSE_DATA=" /data/examples/nipype-fsl_course_data" -v $HOME /examples:/data/examples:ro -v $WORKDIR :/work -w /src/nipype nipype/nipype:py35 /usr/bin/run_pytests.sh py35 && \
20
+ docker run --rm -it -e FSL_COURSE_DATA=" /data/examples/nipype-fsl_course_data" -v $HOME /examples:/data/examples:ro -v $WORKDIR :/work -w /work nipype/nipype:py35 /usr/bin/run_pytests.sh && \
21
+ docker run --rm -it -e FSL_COURSE_DATA=" /data/examples/nipype-fsl_course_data" -v $HOME /examples:/data/examples:ro -v $WORKDIR :/work -w /work nipype/nipype:py27 /usr/bin/run_pytests.sh && \
22
22
docker run --rm -it -v $WORKDIR :/work -w /src/nipype/doc nipype/nipype:py35 /usr/bin/run_builddocs.sh && \
23
23
docker run --rm -it -v $HOME /examples:/data/examples:ro -v $WORKDIR :/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh test_spm Linear /data/examples/ workflow3d && \
24
24
docker run --rm -it -v $HOME /examples:/data/examples:ro -v $WORKDIR :/work -w /work nipype/nipype:py35 /usr/bin/run_examples.sh test_spm Linear /data/examples/ workflow4d
Original file line number Diff line number Diff line change 1
1
[run]
2
2
branch = True
3
- include = */ nipype/*
3
+ source = nipype/
4
4
omit =
5
- */nipype/external/*
6
- */nipype/fixes/*
7
- */setup.py
5
+ external/*
6
+ fixes/*
7
+ */tests/*
8
+
9
+ [report]
10
+ exclude_lines =
11
+ # Have to re-enable the standard pragma
12
+ pragma: no cover
13
+
14
+ # Don't complain about missing debug-only code:
15
+ def __repr__
16
+ if self\.debug
17
+
18
+ # Don't complain if tests don't hit defensive assertion code:
19
+ raise AssertionError
20
+ raise NotImplementedError
21
+
22
+ # Don't complain if non-runnable code isn't run:
23
+ if 0:
24
+ if __name__ == .__main__.:
Original file line number Diff line number Diff line change 1
1
# python cache
2
- __pycache__ /** /*
3
2
__pycache__
3
+ ** /__pycache__
4
+ ** /* .pyc
4
5
* .pyc
5
6
6
7
# python distribution
@@ -26,11 +27,10 @@ docs/
26
27
.circle /** /*
27
28
.circle /
28
29
circle.yml
29
- .coverage
30
- .coveragerc
31
- codecov.yml
32
30
rtd_requirements.txt
33
31
Vagrantfile
34
32
.travis.yml
35
- .noserc
33
+ .mailmap
36
34
35
+ # Previous coverage results
36
+ .coverage
Original file line number Diff line number Diff line change @@ -22,3 +22,7 @@ coverage:
22
22
threshold : 100
23
23
flags :
24
24
- " smoketests"
25
+ ignore : # files and folders that will be removed during processing
26
+ - " nipype/external/*"
27
+ - " tools/*"
28
+ - " doc/*"
Original file line number Diff line number Diff line change @@ -17,23 +17,15 @@ echo "log_to_file = true" >> ${HOME}/.nipype/nipype.cfg
17
17
echo " log_directory = ${WORKDIR} /logs/example_${example_id} " >> ${HOME} /.nipype/nipype.cfg
18
18
19
19
# Set up coverage
20
- echo " [run]" >> .coveragerc
21
- echo " branch = True" >> .coveragerc
22
- echo " source = /src/nipype" >> .coveragerc
23
- echo " include = */nipype/*" >> .coveragerc
24
- echo " omit =" >> .coveragerc
25
- echo " */nipype/external/*" >> .coveragerc
26
- echo " */nipype/fixes/*" >> .coveragerc
27
- echo " */setup.py" >> .coveragerc
20
+ sed -i -E " s/(source = ).*'/\1\/src\/nipype\/nipype/" /src/nipype/.coveragerc
28
21
29
-
30
- parallel=" "
31
22
if [ " $2 " == " MultiProc" ]; then
32
- parallel= " -- concurrency= multiprocessing"
23
+ echo " concurrency = multiprocessing" >> /src/nipype/.coveragerc
33
24
fi
34
25
35
- coverage run ${parallel} /src/nipype/tools/run_examples.py $@
36
- test_exit=$?
37
- coverage xml -o " ${WORKDIR} /smoketest_${example_id} .xml"
26
+ coverage run --rcfile=/src/nipype/.coveragerc /src/nipype/tools/run_examples.py $@
27
+ exit_code=$?
28
+
29
+ coverage xml -o ${WORKDIR} /smoketest_${example_id} .xml || true
38
30
39
- exit $test_exit
31
+ exit $exit_code
Original file line number Diff line number Diff line change @@ -21,19 +21,21 @@ if [[ "${PYTHON_VERSION}" -lt "30" ]]; then
21
21
echo ' profile_runtime = true' >> ${HOME} /.nipype/nipype.cfg
22
22
fi
23
23
24
- cd /src/nipype/
25
- make clean
26
24
# Run tests using pytest
27
- py.test -n ${CIRCLE_NCPUS:- 4 } --doctest-modules --junitxml=${WORKDIR} /pytests_py${PYTHON_VERSION} .xml --cov-report xml:${WORKDIR} /coverage_py${PYTHON_VERSION} .xml --cov= nipype nipype
28
-
25
+ py.test -n ${CIRCLE_NCPUS:- 1 } -v --junitxml=${WORKDIR} /pytests_py${PYTHON_VERSION} .xml --cov-config /src/nipype/.coveragerc --cov- report xml:${WORKDIR} /coverage_py${PYTHON_VERSION} .xml /src/ nipype/
26
+ exit_code= $?
29
27
30
28
# Workaround: run here the profiler tests in python 3
31
29
if [[ " ${PYTHON_VERSION} " -ge " 30" ]]; then
32
30
echo ' [execution]' >> ${HOME} /.nipype/nipype.cfg
33
31
echo ' profile_runtime = true' >> ${HOME} /.nipype/nipype.cfg
34
- py.test -n ${CIRCLE_NCPUS:- 4} --junitxml=${WORKDIR} /pytests_py${PYTHON_VERSION} _profiler.xml --cov-report xml:${WORKDIR} /coverage_py${PYTHON_VERSION} _profiler.xml --cov=nipype nipype/interfaces/tests/test_runtime_profiler.py
35
- py.test -n ${CIRCLE_NCPUS:- 4} --junitxml=${WORKDIR} /pytests_py${PYTHON_VERSION} _multiproc.xml --cov-report xml:${WORKDIR} /coverage_py${PYTHON_VERSION} _multiproc.xml --cov=nipype nipype/pipeline/plugins/tests/test_multiproc* .py
32
+ py.test -n ${CIRCLE_NCPUS:- 1} -v --junitxml=${WORKDIR} /pytests_py${PYTHON_VERSION} _profiler.xml --cov-report xml:${WORKDIR} /coverage_py${PYTHON_VERSION} _profiler.xml /src/nipype/nipype/interfaces/tests/test_runtime_profiler.py && \
33
+ py.test -n ${CIRCLE_NCPUS:- 1} -v --junitxml=${WORKDIR} /pytests_py${PYTHON_VERSION} _multiproc.xml --cov-report xml:${WORKDIR} /coverage_py${PYTHON_VERSION} _multiproc.xml /src/nipype/nipype/pipeline/plugins/tests/test_multiproc* .py
34
+ exit_code = $(( $exit_code + $? ))
36
35
fi
37
36
38
- # Copy crashfiles to scratch
39
- find /src/nipype/ -name " crash-*" -exec cp {} ${WORKDIR} /crashfiles/ \;
37
+ find /src/nipype/ -name " crash-*" -exec mv {} ${WORKDIR} /crashfiles/ \;
38
+
39
+ # Just in case output xml files are misplaced,
40
+ # then circle would not tell the tests failed otherwise
41
+ exit $exit_code
Original file line number Diff line number Diff line change
1
+ [pytest]
2
+ norecursedirs = .git build dist doc nipype/external tools examples tools
3
+ addopts = --doctest-modules
You can’t perform that action at this time.
0 commit comments