TomographicImaging / CCPi-Regularisation-Toolkit

The set of CPU/GPU optimised regularisation modules for iterative image reconstruction and other image processing tasks
Apache License 2.0
49 stars 25 forks source link

Adding tests with pytest #206

Open dkazanc opened 3 months ago

dkazanc commented 3 months ago

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

dkazanc commented 2 months ago

@paskino this PR covers #206 #208 and #207 issues.

paskino commented 2 months ago

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

dkazanc commented 2 months ago

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.

dkazanc commented 1 week ago

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