Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

More CI checks #119

wants to merge 2 commits into from

Conversation

KrisThielemans
Copy link
Member

PR with commits originally tested in #116, but removed from there pending review.

Fixes #118

This can easily be merged after closing for submissions.

Previously, tests were run with petric.py from main.py, meaning that we
don't actually check any changes to it in a PR
@KrisThielemans KrisThielemans added the enhancement New feature or request label Sep 29, 2024
@KrisThielemans KrisThielemans self-assigned this Sep 29, 2024
@@ -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
Copy link
Member

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

Any modifications to petric.py are ignored.

Copy link
Member Author

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.

Copy link
Member

@casperdcl casperdcl Sep 30, 2024

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.

  • pro: we all use the same petric.py
  • con: it's impossible for organisers to test changes to petric.py in CI
    • I've had to manually test any change(s)

We could de-sync forks from this repo, but I'd rather not (it might confuse participants)

@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
curl -sfSL -o ${dataset}.zip https://petric.tomography.stfc.ac.uk/data/${dataset}.zip
curl -fsSLO https://petric.tomography.stfc.ac.uk/data/${dataset}.zip

data = petric.get_data(srcdir)
assert data.OSEM_image.max() > 0
assert data.reference_image.max() > 0
assert data.FOV_mask.max() > 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may as well test init?

Suggested change
assert data.FOV_mask.max() > 0
assert data.FOV_mask.max() > 0
algo = Submission(data)

or maybe to avoid e.g. "could not find GPU"...

Suggested change
assert data.FOV_mask.max() > 0
assert data.FOV_mask.max() > 0
try:
algo = Submission(data)
except Exception:
from warnings import warn
warn("Submission.__init__ failed", RuntimeWarning, stacklevel=2)

Copy link
Member Author

Choose a reason for hiding this comment

The 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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run(1) is even more likely to fail than __init__ due to lacking GPU... but true, we could add a warning for that too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI runs with petric.py from main
2 participants