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

Handle KeyErrors more gracefully if user marks FILES_REG as a qc_fail.yml #72

Merged
merged 4 commits into from
Nov 7, 2023

Conversation

valosekj
Copy link
Member

@valosekj valosekj commented Nov 6, 2023

The script now skips unsupported tasks. For example, for the following config file:

FILES_REG:
- sub-001_T2w.nii.gz
FILES_SEG:
- sub-*_T2w.nii.gz

The script now prints warning and skips FILES_REG:

...
WARNING: FILES_REG is not a valid task. Skipping it.
...

Resolves: #71

Otherwise, the last task from the loop is always used, regardless of
whether it actually has missing_files_labels (and regardless of
whether it's actually in suffix_dict.keys()).
Copy link
Member

@mguaypaq mguaypaq left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! The code makes sense, it seems to work on the example from the course slides (I tried it manually on my laptop).

manual_correction.py Show resolved Hide resolved
utils.py Show resolved Hide resolved
@valosekj valosekj merged commit f228595 into main Nov 7, 2023
1 check passed
@valosekj valosekj deleted the jv/71-handle_KeyErrors_more_gracefully branch November 7, 2023 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle KeyErrors more gracefully if user marks FILES_REG as a qc_fail.yml
2 participants