Skip to content

Update dev instructions#2286

Open
paskino wants to merge 10 commits intoTomographicImaging:masterfrom
paskino:update_dev_instructions
Open

Update dev instructions#2286
paskino wants to merge 10 commits intoTomographicImaging:masterfrom
paskino:update_dev_instructions

Conversation

@paskino
Copy link
Contributor

@paskino paskino commented Feb 2, 2026

Description

  • Updates instructions on local build of CIL.
    • README
    • Developer's guide
  • Updates to FindIPP.cmake to find IPP libraries on Windows

Example Usage

Contribution Notes

  • The content of this Pull Request (the Contribution) is intentionally submitted for inclusion in CIL (the Work) under the terms and conditions of the Apache-2.0 License
  • I confirm that the contribution does not violate any intellectual property rights of third parties

Changes

  • README.md
  • Updates the build script as locally I noticed that IPP was not found unless -Ccmake.define.IPP_ROOT=$CONDA_PREFIX was passed
  • Created environment files:

Testing you performed

Please add any demo scripts to https://github.com/TomographicImaging/CIL-Demos/tree/main/misc

Local build on:

  • Linux
  • mac ARM
  • Windows

Checked the artifact documentation produced by GHA.

Linux

On Linux a total of 43 tests are skipped:

test_aqdata_full_tigre (test_DataProcessor.TestBinner.test_aqdata_full_tigre) 
test_pad_id_full_tigre (test_DataProcessor.TestPadder.test_pad_id_full_tigre) 
test_aqdata_full_tigre (test_DataProcessor.TestSlicer.test_aqdata_full_tigre) 
test_linearity (test_PluginsTigre_Siddon.Test_Parallel2D_Projectors_toy_tigre.test_linearity) TIGRE backprojector weights bug
test_norm (test_PluginsTigre_Siddon.Test_Parallel2D_Projectors_toy_tigre.test_norm) TIGRE backprojector weights bug
test_linearity (test_PluginsTigre_Siddon.Test_Parallel3D_Projectors_toy_tigre.test_linearity) TIGRE backprojector weights bug
test_norm (test_PluginsTigre_Siddon.Test_Parallel3D_Projectors_toy_tigre.test_norm) TIGRE backprojector weights bug
test_linearity (test_PluginsTigre_interpolated.Test_Parallel2D_Projectors_toy_tigre.test_linearity) TIGRE backprojector weights bug
test_norm (test_PluginsTigre_interpolated.Test_Parallel2D_Projectors_toy_tigre.test_norm) TIGRE backprojector weights bug
test_linearity (test_PluginsTigre_interpolated.Test_Parallel3D_Projectors_toy_tigre.test_linearity) TIGRE backprojector weights bug
test_norm (test_PluginsTigre_interpolated.Test_Parallel3D_Projectors_toy_tigre.test_norm) TIGRE backprojector weights bug
test_geometry_gpu (test_io.TestZeissDataReader.test_geometry_gpu) Missing prerequisites: has_file False, has_olefile True has_dxchange True
test_import_error (test_io.TestZeissDataReader.test_import_error) This unit test runs only if dxchange is not installed: has_dxchange True
test_read_and_reconstruct_2D_gpu (test_io.TestZeissDataReader.test_read_and_reconstruct_2D_gpu) Missing prerequisites: has_file False, has_olefile True has_dxchange True, has_astra True has_wget True
test_read_txm_recon_file_gpu (test_io.TestZeissDataReader.test_read_txm_recon_file_gpu) Missing prerequisites: has_file False, has_recon_file False has_olefile True has_dxchange True, has_astra True has_wget True

Plus these which test compatibility with SIRF (which is not installed)

test_TNV_call_works (test_SIRF.TestPETRegularisation.test_TNV_call_works) TNV not implemented for 2D
test_TNV_proximal_works (test_SIRF.TestPETRegularisation.test_TNV_proximal_works) TNV not implemented for 2D
test_SIRF_CIL_MLEM (test_SIRF.TestCILSIRFPrecond.test_SIRF_CIL_MLEM) Skipping as SIRF is not available
test_Gradient (test_SIRF.TestGradientMR_2D.test_Gradient) Skipping as SIRF is not available
test_TVdenoisingMR (test_SIRF.TestGradientMR_2D.test_TVdenoisingMR) Has SIRF
test_Gradient (test_SIRF.TestGradientPET_2D.test_Gradient) Skipping as SIRF is not available
test_Gradient (test_SIRF.TestGradientPET_3D.test_Gradient) Skipping as SIRF is not available
test_FGP_TV_call_works (test_SIRF.TestMRRegularisation.test_FGP_TV_call_works) Has SIRF and CCPi Regularisation
test_FGP_TV_proximal_works (test_SIRF.TestMRRegularisation.test_FGP_TV_proximal_works) Has SIRF and CCPi Regularisation
test_TGV_call_works (test_SIRF.TestMRRegularisation.test_TGV_call_works) Has SIRF and CCPi Regularisation
test_TGV_proximal_works (test_SIRF.TestMRRegularisation.test_TGV_proximal_works) Has SIRF and CCPi Regularisation
test_TNV_call_works (test_SIRF.TestMRRegularisation.test_TNV_call_works) Has SIRF and CCPi Regularisation
test_TNV_proximal_works (test_SIRF.TestMRRegularisation.test_TNV_proximal_works) Has SIRF and CCPi Regularisation
test_FGP_TV_call_works (test_SIRF.TestPETRegularisation.test_FGP_TV_call_works) Has SIRF and CCPi Regularisation
test_FGP_TV_proximal_works (test_SIRF.TestPETRegularisation.test_FGP_TV_proximal_works) Has SIRF and CCPi Regularisation
test_TGV_call_works (test_SIRF.TestPETRegularisation.test_TGV_call_works) Has SIRF and CCPi Regularisation
test_TGV_proximal_works (test_SIRF.TestPETRegularisation.test_TGV_proximal_works) Has SIRF and CCPi Regularisation
test_FGP_TV_call_works (test_SIRF.TestRegRegularisation.test_FGP_TV_call_works) Has SIRF and CCPi Regularisation
test_FGP_TV_proximal_works (test_SIRF.TestRegRegularisation.test_FGP_TV_proximal_works) Has SIRF and CCPi Regularisation
test_TGV_call_works (test_SIRF.TestRegRegularisation.test_TGV_call_works) Has SIRF and CCPi Regularisation
test_TGV_proximal_works (test_SIRF.TestRegRegularisation.test_TGV_proximal_works) Has SIRF and CCPi Regularisation
test_TNV_call_works (test_SIRF.TestRegRegularisation.test_TNV_call_works) Has SIRF and CCPi Regularisation
test_TNV_proximal_works (test_SIRF.TestRegRegularisation.test_TNV_proximal_works) Has SIRF and CCPi Regularisation
test_BlockDataContainer_with_SIRF_DataContainer_add (test_SIRF.TestSIRFCILIntegration.test_BlockDataContainer_with_SIRF_DataContainer_add) Has SIRF
test_BlockDataContainer_with_SIRF_DataContainer_divide (test_SIRF.TestSIRFCILIntegration.test_BlockDataContainer_with_SIRF_DataContainer_divide) Has SIRF
test_BlockDataContainer_with_SIRF_DataContainer_multiply (test_SIRF.TestSIRFCILIntegration.test_BlockDataContainer_with_SIRF_DataContainer_multiply) Has SIRF
test_BlockDataContainer_with_SIRF_DataContainer_subtract (test_SIRF.TestSIRFCILIntegration.test_BlockDataContainer_with_SIRF_DataContainer_subtract) Has SIRF

Windows

======================================================================
FAIL: test_set_up (test_algorithms.TestLSQR.test_set_up)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\ofn77899\Dev\CIL\Wrappers\Python\test\test_algorithms.py", line 2059, in test_set_up
    self.assertAlmostEqual(lsqr.beta,  beta, 5 )
AssertionError: 96.19578 != 96.19578622941998 within 5 places (8.33635357366802e-06 difference)

----------------------------------------------------------------------
Ran 1125 tests in 226.381s

FAILED (failures=1, skipped=43)

Related issues/links

Checklist

  • I have performed a self-review of my code
  • I have added docstrings in line with the guidance in the developer guide
  • I have updated the relevant documentation
  • I have implemented unit tests that cover any new or modified functionality
  • CHANGELOG.md has been updated with any functionality change
  • Request review from all relevant developers

@paskino paskino added this to UM 2026 Feb 2, 2026
@github-project-automation github-project-automation bot moved this to Todo in UM 2026 Feb 2, 2026
@paskino paskino moved this from Todo to In Progress in UM 2026 Feb 2, 2026
@paskino paskino marked this pull request as ready for review February 6, 2026 20:43
@paskino paskino requested a review from a team as a code owner February 6, 2026 20:43
@paskino paskino requested review from casperdcl, gfardell and lauramurgatroyd and removed request for a team February 6, 2026 20:44
Added information about creating a shallow clone with --depth parameter.
- Command
- Status
* - Linux
- ``conda env create -f https://tomographicimaging.github.io/scripts/env/cil_development.yml``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For anyone else who is testing the files are here and you need to use them instead of the url:

https://github.com/TomographicImaging/scripts/pull/9/changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right, I didn't want to link to a PR, so I wrote the link as it will be once #9 is merged

* - OS
- Build Command
* - Linux
- ``pip install --no-deps . -Ccmake.define.IPP_ROOT=$CONDA_PREFIX``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed the instructions for linux and got:

ModuleNotFoundError: No module named 'cil'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I take it all back, I made a fresh clone of CIL and it worked

Copy link
Member

@lauramurgatroyd lauramurgatroyd Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every time I make a code change I have to run:
pip install --no-deps . -Ccmake.define.IPP_ROOT=$CONDA_PREFIX

otherwise IPP doesn't work.
I didn't used to have to do this with the old instructions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. However, I don't believe this has anything to do with this change, rather with #2145
@casperdcl told me that when issuing pip install a new temporary environment (handled by pip) is created where CMake and scikit-build are installed,

CIL/pyproject.toml

Lines 1 to 16 in f8f2e31

[build-system]
requires = [
"setuptools>=64",
"setuptools_scm>=8",
"scikit-build-core>=0.10",
#"ipp-devel==2021.12.*", # PyPI conflicts with conda package
]
build-backend = "scikit_build_core.build"
[tool.scikit-build]
minimum-version = "build-system.requires"
cmake.version = ">=3.16"
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
sdist.include = ["Wrappers/Python/cil/version.py"]
sdist.exclude = ["scripts", "docs", "Wrappers/Python/data", "Wrappers/Python/test", ".*"]
[tool.scikit-build.wheel.packages]

For this reason the build cache is not preserved and you always recompile from scratch. Currently this is not a big problem, as the cilacc library is small but we should do something more about caching the build artifacts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tested with an environment where I install cmake and scikit-build from conda rather than let it handle by pip and:

  1. pip install --no-deps . is sufficient, i.e. IPP is found
  2. cilacc seems to be built all the times you issue pip install

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

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants