GSTT-CSC / hazen

Quality assurance framework for Magnetic Resonance Imaging
https://github.com/GSTT-CSC/hazen
Apache License 2.0
22 stars 12 forks source link

Major refactor of code to use HazenTask classes #266

Closed laurencejackson closed 2 years ago

laurencejackson commented 2 years ago

Following work to separate the webapp and hazenlib functionality of the hazen project the decision was made to take this opportunity to standardise hazen tasks.

This led to the introduction of the HazenTask class, all tasks that hazen performs will inherit from this superclass leading to a number of benefits:

Currently, all MagNet object tasks currently performed as part of routine QA at GSTT have been refactored to use the HazenTask syntax. The following tasks have not been converted to the HazenTask syntax but are still available on the CLI interface:

snr_map @pcw24601 relaxometry @pcw24601 acr_uniformity @YassineRMH

These tasks should be converted to the new syntax when possible to allow them to be accessible on the web frontend.

github-actions[bot] commented 2 years ago

Coverage

Coverage Report
FileStmtsMissCoverMissing
hazenlib
   HazenTask.py24388%29–31
   __init__.py1514173%135, 139, 149, 154, 191, 198–203, 214, 217–224, 244–246, 264–266, 285–287, 296, 301, 307, 358, 378–380, 383–385, 393–394, 398
   acr_uniformity.py923958%91–107, 114–143, 147
   relaxometry.py3179072%238–256, 630, 689–691, 745, 793–815, 833–848, 1173–1176, 1185–1188, 1200–1213, 1216–1221, 1233–1263
   shapes.py20955%13, 16, 24–29, 32
   snr_map.py108595%403, 408–410, 439
   tools.py82693%43–50, 89
hazenlib/tasks
   acr_uniformity.py770%1–11
   ghosting.py1505166%18–32, 47, 109–110, 114, 124–125, 151–153, 170–172, 218–256
   relaxometry.py7271%10–11
   slice_position.py1172182%31, 40–41, 103–104, 130, 210, 217–233
   slice_width.py3565285%34–37, 107, 166–186, 451, 456–457, 463, 468, 530–531, 780–821
   snr.py1634672%62–67, 221–231, 273–277, 314–327, 332–340, 369–382
   snr_map.py770%1–11
   spatial_resolution.py2949069%36–39, 63–121, 134, 219, 255–262, 287, 413–449
   uniformity.py781976%42–45, 91–92, 99, 133–147
TOTAL201048876% 

Tests Skipped Failures Errors Time
176 0 :zzz: 0 :x: 0 :fire: 2m 20s :stopwatch:
tomaroberts commented 2 years ago

Tested:

Broadly reviewed other files.

Good to go.