mirp
mirp copied to clipboard
JOSS review item: CI
-
FWIW, my investigations show ~75% test coverage. This isn't too bad, but it might be worth dedicating some spare time to lifting it a little, especially for the files with little-to-no coverage. See mirp_coverage.xlsx for per-file coverage details.
-
Improvements to temporary test directory handling are in #74. Not important for JOSS publication.
-
Comments related to implementation of GitHub CI can be found here and here. Not important for JOSS publication.
I have increased test coverage to 89% by writing additional tests. Some tests remain.
I get 84%. See mirp_coverage_24-04-07.xlsx. Not quite 89%! But probably enough 😄
For fair comparison, I'm using pytest-cov
with the following command run from the repo's root:
pytest -v --color=yes --cov=mirp --cov-report html --cov-report term --cov-report xml:cov.xml -n=14
Very pleased to find that I was able to run pytest-xdist
(the -n=14
) with no issue!
Thanks again for the pull request that made pytest-xdist possible. One difference may be that my coverage results included the tests themselves.
To expose (and test) SUV conversion we need to do the following:
- [x] Add piping for passing arguments from
StandardWorkflow.standard_image_processing
toImageDicomFilePT.load_data
. - [x] Expose the following parameters by adding them to
ImagePostProcessingClass
:- [x]
suv_type
with defaultbody_weight
. - [x] ~~
decay_correction_event
with defaultadministration
.~~ There is no practical reason why decay correction should be configurable.
- [x]
- [x] Add documentation for new parameters.
- [x] Add parameters to xml.
- [x] Integrate
SUVScalingObj
intoImageDicomFilePT
as private methods, since the required metadata for SUV conversion is not present in different file formats.- [x] After consideration: split
SUVScalingObj
into parts related to decay correction, and parts related to SUV conversion. - [x] Decay correction should take place as part of
load_data
. - [x] SUV conversion (for now) takes place as part of
load_data
. In the future data conversion may move into the standard workflow to make it more explicit. This would require adding required data (weight, height, biological sex, voxel units) to PETImage objects.
- [x] After consideration: split
- [x] Add unit tests for parameters and parameter combinations.
I made some progress in coverage with version 2.2.1. I am leaving this issue open as I need to create new test data to test remaining parts of the code.
No worries, @alexzwanenburg. At 86% coverage, I'm happy to consider this item "closed" from a JOSS review perspective.