Skip to content

Commit 7567e28

Browse files
committed
Merge branch 'main' into dev
2 parents c11f809 + 703a232 commit 7567e28

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Run petdeface on test data
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ main, dev ]
7+
paths:
8+
- 'petdeface/**'
9+
- 'pyproject.toml'
10+
- 'uv.lock'
11+
- '.github/workflows/run_on_test_data.yaml'
12+
pull_request_target:
13+
branches: [ main, dev ]
14+
types: [opened, synchronize, reopened]
15+
paths:
16+
- 'petdeface/**'
17+
- 'pyproject.toml'
18+
- 'uv.lock'
19+
- '.github/workflows/run_on_test_data.yaml'
20+
env:
21+
FREESURFER_HOME: "/usr/local/freesurfer/7.4.1"
22+
jobs:
23+
run-petdeface-on-data:
24+
runs-on: self-hosted
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Setup Python
30+
uses: actions/setup-python@v4
31+
with:
32+
python-version: '3.10'
33+
34+
- name: Install uv
35+
uses: astral-sh/setup-uv@v3
36+
with:
37+
version: latest
38+
39+
- name: Build package with uv
40+
run: |
41+
uv build
42+
43+
- name: Create output directory
44+
run: |
45+
mkdir -p data_defaced
46+
47+
- name: Run petdeface on test data with uv run
48+
run: |
49+
# Set FreeSurfer environment for this step
50+
export FREESURFER_HOME="/usr/local/freesurfer/7.4.1"
51+
export PATH="$FREESURFER_HOME/bin:$PATH"
52+
53+
# Source FreeSurfer setup if available
54+
if [ -f "$FREESURFER_HOME/SetUpFreeSurfer.sh" ]; then
55+
source "$FREESURFER_HOME/SetUpFreeSurfer.sh"
56+
fi
57+
58+
# Run petdeface with FreeSurfer environment
59+
uv run --with dist/*.whl petdeface petdeface/data/ data_defaced/ participant --participant_label sub-01

0 commit comments

Comments
 (0)