Closed Matthew-Jennings closed 4 months ago
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:
StandardWorkflow.standard_image_processing
to ImageDicomFilePT.load_data
.ImagePostProcessingClass
:
suv_type
with default body_weight
.decay_correction_event
with default administration
.SUVScalingObj
into ImageDicomFilePT
as private methods, since the required metadata for SUV conversion is not present in different file formats.
SUVScalingObj
into parts related to decay correction, and parts related to SUV conversion.load_data
.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.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.
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.