Enable doctests
Closes none.
Changes proposed in this pull request
- Create a separate CircleCI job to run doctests, which should improve test coverage.
The only failing doctests now are ones we want to pass, so I think I can transition from getting the workflow configured to fixing up the actual tests.
There is a mismatch between the expected behavior of the doctest in get_highest_priority_fieldmap and its actual behavior:
https://github.com/PennLINC/qsiprep/blob/317828fe70ea8be7a6fe7b5f86bb521902c5f503/qsiprep/utils/grouping.py#L257-L259
Expected:
{'suffix': 'epi', 'epi': ['/data/sub-1/fmap/sub-1_dir-AP_run-1_epi.nii.gz']}
Got:
{'suffix': 'dwi', 'dwi': ['/data/sub-1/dwi/sub-1_dir-AP_run-1_dwi.nii.gz', '/data/sub-1/dwi/sub-1_dir-AP_run-2_dwi.nii.gz', '/data/sub-1/dwi/sub-1_dir-AP_run-3_dwi.nii.gz']}
We expect the EPI field map to be used, but the rpe DWI file is selected instead. @mattcieslak any ideas?
I think we would want to use the dwi instead of the epi if there is a dwi available that can be used for distortion correction
Sounds good. I changed the documentation and test to reflect that.
doctests are now passing 🎉
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 48.27%. Comparing base (317828f) to head (db2306e).
Additional details and impacted files
@@ Coverage Diff @@
## master #926 +/- ##
==========================================
+ Coverage 46.02% 48.27% +2.25%
==========================================
Files 65 65
Lines 9764 9764
Branches 1074 1074
==========================================
+ Hits 4494 4714 +220
+ Misses 5044 4831 -213
+ Partials 226 219 -7
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
nice little coverage bump too
I'm not sure why tests were passing before TBH. The current failure is due to missing datasets, which makes sense.