Skip to content

Delegate gpcca-fast petsc backend to cellrank[petsc]>=2.3.1#82

Merged
Marius1311 merged 3 commits into
mainfrom
gpcca-cellrank-petsc
Jun 9, 2026
Merged

Delegate gpcca-fast petsc backend to cellrank[petsc]>=2.3.1#82
Marius1311 merged 3 commits into
mainfrom
gpcca-cellrank-petsc

Conversation

@Marius1311

Copy link
Copy Markdown
Member

Summary

Now that cellrank 2.3.1 ships an mpi4py-free [petsc] extra (scverse/cellrank#1362), the gpcca-fast dependency group delegates petsc4py/slepc4py to cellrank[petsc]>=2.3.1 instead 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).

 gpcca-fast = [
-  "petsc",
-  "petsc4py",
-  "slepc",
-  "slepc4py",
+  "cellrank[petsc]>=2.3.1",
+  "slepc>=3.25",
 ]

Behavior Or Invariants Changed

  • gpcca-fast no longer hardcodes petsc/petsc4py/slepc4py; they come transitively from cellrank[petsc]. The fast pyGPCCA method='krylov' path is unchanged.
  • The opt-in mechanics are unchanged: still a PEP 735 group (not in --all-extras), still needs PETSC_CONFIGURE_OPTIONS for the C-only source build.

Why slepc is still listed explicitly

cellrank[petsc] alone is not sufficient: slepc4py's published sdist metadata lists only [numpy, petsc4py] — it adds its slepc runtime dependency dynamically at build time, so uv's resolver never installs the slepc library package. Result: import slepc4pyImportError: Library not loaded: @rpath/libslepc.3.25.dylib. petsc4py declares petsc correctly (static metadata), so only slepc needs the workaround. Drop it once slepc4py — or cellrank's petsc extra — declares slepc.

Tests Run

  • uv lock (with PETSC_CONFIGURE_OPTIONS set) → resolves cellrank 2.3.1 + petsc 3.25.2 + petsc4py 3.25.2 + slepc 3.25.1 + slepc4py 3.25.1, and no mpi4py.
  • Throwaway-venv proof of the slepc gap: installing slepc4py via cellrank[petsc] semantics (no explicit slepc) → slepc absent, import fails with the dlopen error; adding slepc>=3.25slepc4py import OK (3, 25, 1).
  • pre-commit passes on the changed files.

Reviewer Focus

pyproject.toml [dependency-groups].gpcca-fast and its comment block (documents the slepc4py workaround and the env-var build recipe). No code changes.

Open Questions Or Follow-Ups

  • Changelog {pr} placeholder will be updated to this PR's number.
  • Upstream cleanup worth considering: have cellrank's [petsc] extra include slepc/petsc (the lib packages), or fix slepc4py to declare slepc statically — either would let CellMapper drop the explicit slepc line entirely.

🤖 Generated with Claude Code

Marius1311 and others added 2 commits June 9, 2026 19:05
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

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.37%. Comparing base (7d1565f) to head (1f0c8de).

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Marius1311 Marius1311 merged commit 543cbc9 into main Jun 9, 2026
8 of 9 checks passed
@Marius1311 Marius1311 deleted the gpcca-cellrank-petsc branch June 9, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant