Skip to content

Fix/editable install cython build

Robert Rosca requested to merge fix/editable-install-cython-build into master
  • Changes the directory structure of the cal_tools module to a more standard one (removing the separate cython directory)
  • Uses src layout now since that was the easiest way to get the tests working correctly and importing the modules from the right location for the installation type
  • Minor adjustment to setup.py to account for the directory change
  • Expanded CI and tests to check that compiled modules can be imported both in standard installations and editable ones
  • Updated imports of the agipdalgs module in some notebooks

Description

  • Fixes editable installations as they were previously missing the compiled modules, making local development and testing easier
  • Brings the package more in-line with 'standard' python package layouts
  • Makes running tools like codecoverage/autodocs easier (as the module name and source location now match)
  • Tests can now run both from relative imports (with pip install -e) for development or from absolute (pip install .) for production

How Has This Been Tested?

  • Tested locally by running editable and standard install commands and seeing that relevant modules can be imported
  • Expanded CI to test that compiled modules are available in both modes

Relevant Documents (optional)

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Reviewers

@calibration

I did a basic find and replace to change from cal_tools.cython import agipdalgs as calgs to from cal_tools import agipdalgs as calgs, far as I could find that was the only line that referenced the module but I'm not sure if I actually got everything.

Edited by Robert Rosca

Merge request reports