Skip to content

tests: add test coverage for ParameterMap failure_reasons and quality…....#127

Open
karnam-ui wants to merge 1 commit intoOSIPI:mainfrom
karnam-ui:tests/parameter-map-failure-reasons
Open

tests: add test coverage for ParameterMap failure_reasons and quality…....#127
karnam-ui wants to merge 1 commit intoOSIPI:mainfrom
karnam-ui:tests/parameter-map-failure-reasons

Conversation

@karnam-ui
Copy link
Copy Markdown

Closes #126
Adds unit tests for ParameterMap covering which covers-

failure_reasons is None by default
failure_reasons correctly stores per-voxel diagnostic strings
Passing voxels have empty string as failure reason
quality_mask shape matches values shape
Mismatched shapes raise an error

Tests expose the current gap where failure_reasons is declared but never popuateted,

@karnam-ui
Copy link
Copy Markdown
Author

I used AI assistance to help me understand the codebase structure and the correct ParameterMap constructor arguments, but I wrote and debugged these tests myself. Initially the tests failed because I was passing 1D arrays — I read the DataValidationError output and fixed the shape to 3D based on looking at the existing test_maps.py file which uses np.random.rand(64, 64, 20).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add test coverage for ParameterMap.failure_reasons initialization and quality_mask shape validation

1 participant