forked from MIC-DKFZ/TractSeg
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
68 lines (60 loc) · 3.14 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
dist: trusty
sudo: required # gives more RAM (otherwise memory error for TOM)
language: python
services:
- docker
matrix:
include:
- python: "2.7"
env:
- PYTORCH_URL=http://download.pytorch.org/whl/cpu/torch-0.4.1-cp27-cp27mu-linux_x86_64.whl
- PYTHON_VERS=2.7
- python: "3.5"
env:
- PYTORCH_URL=http://download.pytorch.org/whl/cpu/torch-0.4.1-cp35-cp35m-linux_x86_64.whl
- PYTHON_VERS=3.5
before_install:
- pip install $PYTORCH_URL
install:
- pip install .
script:
#Docker
# On python 3 building the container is too slow to avoid travis timeout -> we only test it on python 2
- if [ "$PYTHON_VERS" == "3.5" ]; then echo "skipping docker";
else docker build -t wasserth/tractseg_container:master -f Dockerfile_CPU .; fi
# - docker build -t wasserth/tractseg_container:master -f Dockerfile_CPU .
# - docker run -v $TRAVIS_BUILD_DIR/examples:/data -it wasserth/tractseg_container:master TractSeg
# -i /data/Diffusion.nii.gz -o /data/docker_test --raw_diffusion_input --single_orientation
# - pytest -v tests/test_end_to_end.py::test_end_to_end::test_tractseg_output_docker
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# - docker push wasserth/tractseg_container:master
- if [ "$PYTHON_VERS" == "3.5" ]; then echo "skipping docker upload";
else docker push wasserth/tractseg_container:master; fi
#Bundles
- TractSeg -i tests/reference_files/peaks.nii.gz -o examples --single_orientation
- pytest -v tests/test_end_to_end.py::test_end_to_end::test_tractseg_output
#Endings
- TractSeg -i tests/reference_files/peaks.nii.gz -o examples --output_type endings_segmentation --single_orientation
- pytest -v tests/test_end_to_end.py::test_end_to_end::test_endingsseg_output
#- python tests/test_end_to_end.py test_end_to_end.test_endingsseg_output #would also work
#TOM
- TractSeg -i tests/reference_files/peaks.nii.gz -o examples --output_type TOM
- pytest -v tests/test_end_to_end.py::test_end_to_end::test_peakreg_output
#Track
# Use docker if we want to test Mrtrix tracking
# # for python 3 it uses the online available container -> built from the previous commit
# - docker run -v $TRAVIS_BUILD_DIR:/data -it wasserth/tractseg_container:master TractSeg
# -i /data/tests/reference_files/peaks.nii.gz -o /data/examples
# --output_type TOM --track --only_track --filter_tracking_by_endpoints
# --nr_fibers 2000 --tracking_dilation 0 --test
- TractSeg -i tests/reference_files/peaks.nii.gz -o examples
--output_type TOM --track --only_track --filter_tracking_by_endpoints
--nr_fibers 2000 --tracking_dilation 0 --test
#Tractometry
- Tractometry -i examples/tractseg_output/TOM_trackings -o examples/Tractometry.csv
-e examples/tractseg_output/endings_segmentations/ -s tests/reference_files/FA.nii.gz --test
- pytest -v tests/test_end_to_end.py::test_end_to_end::test_tractometry
#Bundles SR PP BST
- TractSeg -i tests/reference_files/peaks.nii.gz -o examples/SR_PP_BST --single_orientation --super_resolution
--postprocess --bundle_specific_threshold
- pytest -v tests/test_end_to_end.py::test_end_to_end::test_tractseg_output_SR_PP_BST