Split ev_op/init and ev_op/ome - #531
Conversation
There was a problem hiding this comment.
Pull request overview
This PR continues the refactor to separate evolution-operator integration kernels (quad_ker*) from operator-matrix-element logic, and updates the “rustify” patch workflow so the low-level (numba.cfunc) callbacks live only in patch files (avoiding dead code in the normal Python sources).
Changes:
- Moved
build_ome(and related OME quad kernel plumbing) intosrc/eko/evolution_operator/quad_ker.pyand updated the OME tests to import from the new location. - Added/updated
quad_ker.py.patchand adjustedrustify.shto apply it, consolidating the 3 callback cfuncs into the patch flow. - Updated the patch files for
__init__.pyandoperator_matrix_element.pyto match the new split.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/eko/evolution_operator/test_ome.py | Switches build_ome import to come from quad_ker after the move. |
| src/eko/evolution_operator/quad_ker.py | Hosts build_ome and OME/evolution integration kernels after the split; docstrings updated/need cleanup. |
| src/eko/evolution_operator/quad_ker.py.patch | New rustify patch that injects the numba.cfunc callbacks for QCD/QED/OME; currently contains invalid sv.exponentiated/sv.expanded references. |
| src/eko/evolution_operator/operator_matrix_element.py | Removes local OME quad-kernel/build helpers and imports them from quad_ker. |
| src/eko/evolution_operator/operator_matrix_element.py.patch | Updates the rustify patch for the OME operator module to use the callback approach. |
| src/eko/evolution_operator/init.py | Drops duplicated kernel code and delegates to quad_ker for integration kernels. |
| src/eko/evolution_operator/init.py.patch | Updates rustify patch to use low-level callbacks for integration. |
| rustify.sh | Applies the new quad_ker.py.patch in addition to the existing patches. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@felixhekhorn most of copilot's suggestions are about doc changes. Should we do that in this PR or leave it for some another day? |
Let's fix them while we are on it |
felixhekhorn
left a comment
There was a problem hiding this comment.
main comment is to reduce the patch file to the minimal amount possible - since that is a dirty hack in the first place, let's keep it minimal. This can be achieved by trivially harmonizing the variable names and copy docstrings/comments
6c8c56a to
e897d7e
Compare
felixhekhorn
left a comment
There was a problem hiding this comment.
apart from the pyproject.toml.patch hickup this is fine
the additional patch file is not pretty, I admit, but we still reduce the number of lines by ~500 ...
e897d7e to
661f7d9
Compare
A step for #518
In this PR, we:
quad_ker_*functions toquad_ker.py.