Skip to content

Commit

Permalink
[CI] minimal check on get_data()
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisThielemans committed Sep 29, 2024
1 parent 0eb98be commit 4231eb2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,23 @@ jobs:
shell: bash -el {0}
run: |
source /opt/SIRF-SuperBuild/INSTALL/bin/env_sirf.sh
dataset=Siemens_mMR_NEMA_IQ
curl -sfSL -o ${dataset}.zip https://petric.tomography.stfc.ac.uk/data/${dataset}.zip
mkdir -p data; cd data; unzip -u ../${dataset}.zip; cd ..
curl -fsSL https://raw.githubusercontent.com/SyneRBI/PETRIC/main/petric.py > petric.py
test -f main.py || ln -s main_ISTA.py main.py
python <<EOF
import petric
from main import Submission, submission_callbacks
from cil.optimisation.algorithms import Algorithm
assert issubclass(Submission, Algorithm)
assert isinstance(submission_callbacks, list)
assert all(callable(callback) for callback in submission_callbacks)
srcdir, outdir, metrics = petric.data_dirs_metrics[0]
data = petric.get_data(srcdir)
assert data.OSEM_image.max() > 0
assert data.reference_image.max() > 0
assert data.FOV_mask.max() > 0
EOF
full:
if: startsWith(github.ref, 'refs/tags')
Expand Down

0 comments on commit 4231eb2

Please sign in to comment.