-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More CI checks #119
base: main
Are you sure you want to change the base?
More CI checks #119
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -33,14 +33,22 @@ jobs: | |||||||||||||||||||||
shell: bash -el {0} | ||||||||||||||||||||||
run: | | ||||||||||||||||||||||
source /opt/SIRF-SuperBuild/INSTALL/bin/env_sirf.sh | ||||||||||||||||||||||
curl -fsSL https://raw.githubusercontent.com/SyneRBI/PETRIC/main/petric.py > petric.py | ||||||||||||||||||||||
dataset=Siemens_mMR_NEMA_IQ | ||||||||||||||||||||||
curl -sfSL -o ${dataset}.zip https://petric.tomography.stfc.ac.uk/data/${dataset}.zip | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
mkdir -p data; cd data; unzip -u ../${dataset}.zip; cd .. | ||||||||||||||||||||||
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 | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. may as well test init?
Suggested change
or maybe to avoid e.g. "could not find GPU"...
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we'd want to have a dummy submission then. Not sure what a test tells us that we know will fail. Anyway, that'll all be for PETRIC 2.0... I suggest to do minor clean-up here, and merge it when all done. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||||||||||||||||||
EOF | ||||||||||||||||||||||
full: | ||||||||||||||||||||||
if: startsWith(github.ref, 'refs/tags') | ||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need this line to overwrite any users' changes as per the README
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, but does tha tuse this
run.yml
? I guess it does. But then this isn't really CI.anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes all submission repos are a fork of this one, so they all use this
run.yml
.petric.py
petric.py
in CIWe could de-sync forks from this repo, but I'd rather not (it might confuse participants)