-
Notifications
You must be signed in to change notification settings - Fork 12
116 lines (93 loc) · 3.33 KB
/
test_cli.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
# Runs on pull request or release - checks CLI tools are working without raising exception
name: CLI tests
on:
pull_request:
release:
jobs:
test_cli:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ '3.9', '3.10' ]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install hazen
run: |
pip install .
# "if: always option" runs step even if previous fails - useful to ensure all CLI functions tested
- name: test_snr
if: always()
run: |
hazen snr tests/data/snr/Siemens --report
hazen snr tests/data/snr/Siemens --measured_slice_width 5.0012 --report
- name: test_acr_snr
if: always()
run: |
hazen acr_snr tests/data/acr/Siemens --report
hazen acr_snr tests/data/acr/Siemens --subtract tests/data/acr/Siemens2 --report
- name: test acr_uniformity
if: always()
run: |
hazen acr_uniformity tests/data/acr/Siemens --report
- name: test acr_ghosting
if: always()
run: |
hazen acr_ghosting tests/data/acr/Siemens --report
- name: test acr_slice_position
if: always()
run: |
hazen acr_slice_position tests/data/acr/Siemens --report
- name: test acr_slice_thickness
if: always()
run: |
hazen acr_slice_thickness tests/data/acr/Siemens --report
- name: test acr_geometric_accuracy
if: always()
run: |
hazen acr_geometric_accuracy tests/data/acr/Siemens --report
- name: test acr_spatial_resolution
if: always()
run: |
hazen acr_spatial_resolution tests/data/acr/SiemensMTF --report
- name: test slice_position
if: always()
run: |
hazen slice_position tests/data/slicepos/SLICEPOSITION --report
- name: test slice_width
if: always()
run: |
hazen slice_width tests/data/slicewidth/512_matrix --report
hazen slice_width tests/data/slicewidth/SLICEWIDTH --report
- name: test spatial_resolution
if: always()
run: |
hazen spatial_resolution tests/data/resolution/RESOLUTION/ --report
- name: test uniformity
if: always()
run: |
hazen uniformity tests/data/uniformity --report
- name: test ghosting
if: always()
run: |
hazen ghosting tests/data/ghosting/GHOSTING --report
hazen ghosting tests/data/ghosting/PE_COL_PHANTOM_BOTTOM_RIGHT --report
- name: test snr_map
if: always()
run: |
hazen snr_map tests/data/snr/Siemens --report
- name: test relaxometry
if: always()
run: |
hazen relaxometry tests/data/relaxometry/T1/site1_20200218/plate5 --calc T1 --plate_number=5 --report
hazen relaxometry tests/data/relaxometry/T2/site3_ge/plate4/ --calc T2 --plate_number=4 --report