CCPi-Regularisation-Toolkit
CCPi-Regularisation-Toolkit copied to clipboard
Adding tests with pytest
CuPy requires for CUDA kernels to be present during the build. I've modified the build.sh
and bld.bat
files to do that.
@paskino A question about a CuPy dependency. It can be optional for the user to install CuPy or not, but I think I'll add the tests so they run if it is present in the environment (TODO). Do you have a some kind of reusable external environment in your CI where you run tests for the toolkit? Could you install CuPy there? thanks
@paskino this PR covers #206 #208 and #207 issues.
- CuPy modules are getting installed correctly during conda build
- unittest replaced by pytests and extended to 3D (additional
--runcupy
flag needed to run CuPy tests and switched off by default) - Lena image is replaced by Pepper
- All Demos have been updated accordingly
In CIL we run some tests with the regularisation toolkit, see https://github.com/TomographicImaging/CIL/blob/master/Wrappers/Python/test/test_PluginsRegularisation.py
CuPy is not a pre-requisite in our CI https://github.com/TomographicImaging/CIL/blob/b3d8ffeeec9413a3b54264e4097a445d2ef5b88b/recipe/meta.yaml#L33-L42
In CIL we run some tests with the regularisation toolkit, see https://github.com/TomographicImaging/CIL/blob/master/Wrappers/Python/test/test_PluginsRegularisation.py
That should still work I guess.
CuPy is not a pre-requisite in our CI https://github.com/TomographicImaging/CIL/blob/b3d8ffeeec9413a3b54264e4097a445d2ef5b88b/recipe/meta.yaml#L33-L42
I haven't added CuPy in the list of dependencies, it is optional. The CuPy tests require an additional flag. The CuPy import modules are also independent, so the non-CuPy users shouldn't notice any difference.
hi, any progress with this PR? As with minimal dependencies package I'd also like to add a PyPi uploading, will do in a separate PR after this merged. thanks