-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (71 loc) · 2.91 KB
/
Copy pathpython-testing.yml
File metadata and controls
88 lines (71 loc) · 2.91 KB
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
---
# 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:
name: Lint code
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.base_ref }}
- name: Setup Python environment
uses: prefix-dev/setup-pixi@v0.8.14
with:
environments: >-
dev-only
activate-environment: dev-only
- name: isort
run: isort autoafids/*.py -c
- name: Black
run: black autoafids --check
- name: snakefmt
run: snakefmt autoafids --check
test:
runs-on: ubuntu-latest
needs: [quality]
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: Setup Pixi environment
uses: prefix-dev/setup-pixi@v0.8.14
with:
activate-environment: true
- name: Setup env for autoafids
run: |
echo "AUTOAFIDS_CACHE_DIR=`pwd`/test_data/autoafids_cache_dir" >> $GITHUB_ENV
- name: Test T1w modality
run: |
./autoafids/run.py test_data/bids_T1w test_out participant --participant-label 002 -np
- name: Test T2w modality
run: |
./autoafids/run.py test_data/bids_T2w test_out participant --modality T2w -np -c1
- name: Test CT modality
run: |
./autoafids/run.py test_data/bids_ct test_out participant --modality ct -np -c1
- name: Test stereotaxy feature with T1w modality
run: |
./autoafids/run.py test_data/bids_T1w test_out participant --participant-label 002 --stereotaxy STN -np
- name: Test stereotaxy feature with T2w modality
run: |
./autoafids/run.py test_data/bids_T2w test_out participant --stereotaxy STN --modality T2w -np -c1
- name: Test fidqc feature
run: |-
./autoafids/run.py test_data/bids_T1w test_out participant --participant-label 002 --fidqc -np
- name: Test nnLandmark detection (T1w)
run: |-
./autoafids/run.py test_data/bids_T1w test_out participant --participant-label 002 --detect_with_nnlm -np
- name: Test nnLandmark detection (T2w)
run: |-
./autoafids/run.py test_data/bids_T2w test_out participant --modality T2w --detect_with_nnlm -np -c1
- name: Test nnLandmark with fidqc
run: |-
./autoafids/run.py test_data/bids_T1w test_out participant --participant-label 002 --detect_with_nnlm --fidqc -np
- name: Test nnLandmark with stereotaxy
run: |-
./autoafids/run.py test_data/bids_T1w test_out participant --participant-label 002 --detect_with_nnlm --stereotaxy STN -np