Closed nielsboecker closed 5 years ago
Update: Added tests for all three pipelines .
Name Stmts Miss Cover
------------------------------------------------------------------------------------------
core/__init__.py 2 0 100%
core/adapters/__init__.py 0 0 100%
core/adapters/dicom_file.py 53 5 91%
core/adapters/glb_file.py 3 0 100%
core/adapters/nifti_file.py 33 15 55%
core/adapters/obj_file.py 10 0 100%
core/clients/__init__.py 0 0 100%
core/clients/holostorage_accessor.py 24 12 50%
core/clients/niftynet.py 11 8 27%
core/pipelines/__init__.py 0 0 100%
core/pipelines/abdominal_organs_segmentation.py 43 1 98%
core/pipelines/bone_segmentation.py 35 1 97%
core/pipelines/lung_segmentation.py 39 0 100%
core/pipelines/pipelines_controller.py 13 13 0%
core/services/__init__.py 0 0 100%
core/services/marching_cubes.py 12 1 92%
core/services/np_image_manipulation.py 31 17 45%
core/tasks/__init__.py 0 0 100%
core/tasks/abdominal_organs_segmentation/__init__.py 0 0 100%
core/tasks/abdominal_organs_segmentation/split_to_separate_organs.py 24 24 0%
core/tasks/shared/__init__.py 0 0 100%
core/tasks/shared/dispatch_output.py 3 0 100%
core/tasks/shared/receive_input.py 14 1 93%
core/third_party/__init__.py 0 0 100%
core/third_party/ct_lung_segmentation/__init__.py 0 0 100%
core/third_party/ct_lung_segmentation/segment_airway.py 19 0 100%
core/third_party/ct_lung_segmentation/segment_lung.py 31 0 100%
core/third_party/ct_lung_segmentation/utils.py 126 3 98%
core/third_party/lung_and_airway_segmentation.py 12 0 100%
core/wrappers/__init__.py 0 0 100%
core/wrappers/obj2gltf.py 8 1 88%
jobs/__init__.py 0 0 100%
jobs/jobs_controller.py 47 47 0%
jobs/jobs_io.py 86 20 77%
jobs/jobs_state.py 47 28 40%
------------------------------------------------------------------------------------------
TOTAL 726 197 73%
Tests all appear to run well, though there was one part that threw me off. But it seems that was intended.
Anyway, there is currently a merge conflict that is preventing this from being merged. We can merge it when that is cleared up.
Yes, the error is expected, it stems from test_check_job_request_validity_invalid
. Agree that it may look confusing but I think this is acceptable. I'll sort out the merge conflicts.
Resolved conflicts and verified that the build pipeline runs the tests happily.
This PR adds a whole couple of tests for the new HoloPipelines architecture. It also includes reusable fixtures that are shared for many tests and can be used for future tests.
It's mostly just these tests, so having the build pipeline succeed should be a good criteria to accept the PR. There are also some minor changes in the business logic code, that were made when problems were discovered by writing tests.