Sikerdebaard / dcmrtstruct2nii

DICOM RT-Struct to mask
MIT License
91 stars 27 forks source link

Organizing tests #41

Closed mathiser closed 6 months ago

mathiser commented 1 year ago

Hi @Sikerdebaard I've been working a little more with the convert function - specifically to vectorize the transform of coordinates to indices. It works like a charm now and speeds up the conversion nicely. I would like to PR it over, but I want to write tests first.

How should i organize the tests? Should they all be in /tests or locally next to the elements which are tested?

Mathis

Sikerdebaard commented 1 year ago

The tests are currently organized in the dcmrtstruct2nii/tests folder and the package used for running the tests is pytest. Please follow the guidelines of the getting started with pytest when writing your unit tests.

For test data the repo is currently using the git lfs extension. The test-data is stored under dcmrtstruct2nii/testdata. This folder currently holds the masks / nii-files that are considered the ground truth for the tests as most of them have been checked for correctness manually. Please keep the files in there small as there is a 1GB quota on this repos git lfs. Larger files, for example the DICOM files used by the tests, are downloaded into the CI/CD environment by the unit tests as this dataset is easily multiple GiB and does not fit in the git lfs.

I am open to suggestions on improving the tests. Feel free to drop any ideas or suggestions that you might have. :)