-
Notifications
You must be signed in to change notification settings - Fork 14
135 lines (104 loc) · 4.91 KB
/
python-testing.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
---
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Lint and test workflow
on:
push:
workflow_dispatch:
jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Install non-python dependencies
run: |
sudo apt-get install -y graphviz-dev
- name: Setup Python environment
uses: khanlab/actions/.github/actions/[email protected]
with:
python-version: "3.9"
- name: isort
run: poetry run isort hippunfold/*.py -c
- name: Black
run: poetry run black hippunfold --check
- name: snakefmt
run: poetry run snakefmt hippunfold --check
test:
runs-on: ubuntu-latest
needs: ["quality"]
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9"]
steps:
- name: Install non-python dependencies
run: |
sudo apt-get install -y graphviz-dev
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Setup Python environments
uses: khanlab/actions/.github/actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
install-library: true
- name: Setup env for hippunfold
run: |
echo "HIPPUNFOLD_CACHE_DIR=`pwd`/test_data/hippunfold_cache_dir" >> $GITHUB_ENV
- name: Test single T2w bids
run: |
poetry run hippunfold test_data/bids_singleT2w test_out participant -np --modality T2w
- name: Test running on existing folder
run: |
mkdir test_newout
poetry run hippunfold test_data/bids_singleT2w test_newout participant -np --modality T2w
- name: Test single T2w bids, right hemi
run: |
poetry run hippunfold test_data/bids_singleT2w test_out participant -np --modality T2w --hemi R
- name: Test single T2w bids, left hemi
run: |
poetry run hippunfold test_data/bids_singleT2w test_out participant -np --modality T2w --hemi L
- name: Test multiple T2w bids
run: |
poetry run hippunfold test_data/bids_multiT2w test_out participant -np --modality T2w
- name: Test T1w bids
run: |
poetry run hippunfold test_data/bids_T1w test_out participant -np --modality T1w
- name: Test hipp b500 bids
run: |
poetry run hippunfold test_data/bids_hippb500 test_out participant -np --modality hippb500
- name: Test T1w multi-session/longitudinal bids
run: |
poetry run hippunfold test_data/bids_T1w_longitudinal test_out participant -np --modality T1w
- name: Test single T2w multi-session/longitudinal bids
run: |
poetry run hippunfold test_data/bids_singleT2w_longitudinal test_out participant -np --modality T2w
- name: Test manual seg T2w bids
run: |
poetry run hippunfold test_data/bids_segT2w test_out participant -np --modality segT2w
- name: Test cropseg bids, with path override
run: |
poetry run hippunfold . test_out participant -np --modality cropseg --path_cropseg test_data/data_cropseg/sub-{subject}_hemi-{hemi}_dseg.nii.gz
- name: Test cropseg bids, with path override, left hemi
run: |
poetry run hippunfold . test_out participant -np --modality cropseg --path_cropseg test_data/data_cropseg_1hemi/sub-{subject}_hemi-{hemi}_dseg.nii.gz --hemi L
- name: Test T2w with T1w template registration
run: |
poetry run hippunfold test_data/bids_singleT2w test_out participant -np --modality T2w --t1_reg_template
- name: Test T2w with T1w output space
run: |
poetry run hippunfold test_data/bids_singleT2w test_out participant -np --modality T2w --output_space T1w
- name: Test modality T2w with myelin map
run: |
poetry run hippunfold test_data/bids_singleT2w test_out participant -np --modality T2w --generate-myelin-map
- name: Test modality T1w with myelin map
run: |
poetry run hippunfold test_data/bids_singleT2w test_out participant -np --modality T1w --generate-myelin-map
- name: Test modality T1w with magdeburg atlas
run: |
poetry run hippunfold test_data/bids_T1w test_out participant -np --modality T1w --atlas magdeburg
- name: Test modality T1w with freesurfer atlas
run: |
poetry run hippunfold test_data/bids_T1w test_out participant -np --modality T1w --atlas freesurfer
- name: Test modality T1w with bigbrain and freesurfer atlas
run: |
poetry run hippunfold test_data/bids_T1w test_out participant -np --modality T1w --atlas bigbrain freesurfer