Delegate gpcca-fast petsc backend to cellrank[petsc]>=2.3.1#82
Merged
Conversation
cellrank 2.3.1 ships an mpi4py-free [petsc] extra (scverse/cellrank#1362), so the gpcca-fast group can pull petsc4py/slepc4py from cellrank instead of hardcoding them — CellRank now owns that list. slepc is kept explicit as a workaround: slepc4py's published sdist metadata omits its runtime dependency on the `slepc` library package (it is added dynamically at build time), so uv won't install slepc from cellrank[petsc] alone and slepc4py fails to import ("Library not loaded: libslepc"). petsc4py declares `petsc` correctly, so petsc needs no such workaround. Verified: full lock resolves cellrank 2.3.1 + petsc/petsc4py/slepc/ slepc4py with no mpi4py; slepc4py imports only when the explicit slepc is present (confirmed both ways in a throwaway venv). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #82 +/- ##
=======================================
Coverage 86.37% 86.37%
=======================================
Files 13 13
Lines 1387 1387
=======================================
Hits 1198 1198
Misses 189 189 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Now that cellrank 2.3.1 ships an mpi4py-free
[petsc]extra (scverse/cellrank#1362), thegpcca-fastdependency group delegatespetsc4py/slepc4pytocellrank[petsc]>=2.3.1instead of hardcoding the package list — CellRank owns it. This is the follow-up to #81 (which dropped Python 3.11 so the graph could resolve cellrank ≥2.1).Behavior Or Invariants Changed
gpcca-fastno longer hardcodespetsc/petsc4py/slepc4py; they come transitively fromcellrank[petsc]. The fast pyGPCCAmethod='krylov'path is unchanged.--all-extras), still needsPETSC_CONFIGURE_OPTIONSfor the C-only source build.Why
slepcis still listed explicitlycellrank[petsc]alone is not sufficient:slepc4py's published sdist metadata lists only[numpy, petsc4py]— it adds itsslepcruntime dependency dynamically at build time, so uv's resolver never installs theslepclibrary package. Result:import slepc4py→ImportError: Library not loaded: @rpath/libslepc.3.25.dylib.petsc4pydeclarespetsccorrectly (static metadata), so onlyslepcneeds the workaround. Drop it once slepc4py — or cellrank'spetscextra — declaresslepc.Tests Run
uv lock(withPETSC_CONFIGURE_OPTIONSset) → resolves cellrank 2.3.1 + petsc 3.25.2 + petsc4py 3.25.2 + slepc 3.25.1 + slepc4py 3.25.1, and nompi4py.slepc4pyviacellrank[petsc]semantics (no explicit slepc) →slepcabsent, import fails with the dlopen error; addingslepc>=3.25→slepc4py import OK (3, 25, 1).pre-commitpasses on the changed files.Reviewer Focus
pyproject.toml[dependency-groups].gpcca-fastand its comment block (documents the slepc4py workaround and the env-var build recipe). No code changes.Open Questions Or Follow-Ups
{pr}placeholder will be updated to this PR's number.[petsc]extra includeslepc/petsc(the lib packages), or fixslepc4pyto declareslepcstatically — either would let CellMapper drop the explicitslepcline entirely.🤖 Generated with Claude Code