mirp icon indicating copy to clipboard operation
mirp copied to clipboard

JOSS review item: CI

Open Matthew-Jennings opened this issue 10 months ago • 6 comments

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

  2. Improvements to temporary test directory handling are in #74. Not important for JOSS publication.

  3. Comments related to implementation of GitHub CI can be found here and here. Not important for JOSS publication.

Matthew-Jennings avatar Apr 04 '24 12:04 Matthew-Jennings

I have increased test coverage to 89% by writing additional tests. Some tests remain.

alexzwanenburg avatar Apr 05 '24 15:04 alexzwanenburg

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!

Matthew-Jennings avatar Apr 07 '24 12:04 Matthew-Jennings

Thanks again for the pull request that made pytest-xdist possible. One difference may be that my coverage results included the tests themselves.

alexzwanenburg avatar Apr 07 '24 14:04 alexzwanenburg

To expose (and test) SUV conversion we need to do the following:

  • [x] Add piping for passing arguments from StandardWorkflow.standard_image_processing to ImageDicomFilePT.load_data.
  • [x] Expose the following parameters by adding them to ImagePostProcessingClass:
    • [x] suv_type with default body_weight.
    • [x] ~~decay_correction_event with default administration.~~ There is no practical reason why decay correction should be configurable.
  • [x] Add documentation for new parameters.
  • [x] Add parameters to xml.
  • [x] Integrate SUVScalingObj into ImageDicomFilePT 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] Add unit tests for parameters and parameter combinations.

alexzwanenburg avatar Apr 11 '24 06:04 alexzwanenburg

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.

alexzwanenburg avatar Apr 19 '24 15:04 alexzwanenburg

No worries, @alexzwanenburg. At 86% coverage, I'm happy to consider this item "closed" from a JOSS review perspective.

Matthew-Jennings avatar Apr 22 '24 05:04 Matthew-Jennings