Skip to content

fix: get CI green under pandas 3.1; adopt anndata.acc; document PETSc UCX log flood - #1390

Merged
Marius1311 merged 2 commits into
mainfrom
worktree-cellrank-ci
Nov 13, 2026
Merged

Marius1311 merged 2 commits into
mainfrom
worktree-cellrank-ci

Conversation

@Marius1311

Copy link
Copy Markdown
Collaborator

Part of #1389. Closes #1384.

Bug fixes

  • CI on main: test_bare_string_does_not_warn and test_trends_gene_layer_signal_no_warning turned every DeprecationWarning into an error. anndata 0.13.4 sets a pandas option that pandas 3.1 deprecates, emitting Pandas4Warning (fixed in fix: adapt to pandas 3.1 changes anndata#2671, not yet released). The tests now escalate only CellRank's own "will be deprecated in CellRank" warnings, which is what they check.
  • cr.pl.log_odds(..., layer="X") raised KeyError for gene keys without a threshold.

Changes

  • Gene vectors are read with anndata.acc instead of the deprecated AnnData.obs_vector. Requires anndata>=0.13 (was >=0.11).
  • pd.merge(..., copy=) dropped; the keyword is deprecated under copy-on-write.
  • Installation docs: a troubleshooting section for the UCX error flood with conda-forge PETSc on InfiniBand nodes with a low ulimit -l, with the UCX_TLS=self,sm,tcp workaround.

Local: hatch test -py 3.12: 1143 passed, 102 skipped (PETSc/R). The PETSc job will still fail on the pyGPCCA getVecs issue until pygpcca 1.1.0 is used there (#1389).

🤖 Generated with Claude Code

Marius1311 and others added 2 commits November 13, 2026 15:08
- Read gene vectors with `anndata.acc` instead of the deprecated
  `AnnData.obs_vector`; require anndata>=0.13.
- Drop `copy=` from `pd.merge` (deprecated under copy-on-write).
- No-warning tests escalate only CellRank's own deprecations, so upstream
  ones (anndata 0.13.4 + pandas 3.1) no longer fail them.
- `log_odds(layer="X")` no longer raises `KeyError` without a threshold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #1384.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T14:11:54.776485Z 206816e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 206816e05d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

else:
values = np.asarray(adata[:, key].X[mask].sum(1)).squeeze()
thresh_mask = values > thresh
thresh_mask = values[mask] > thresh

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve per-cell aggregation for duplicate gene names

When key matches multiple columns in var_names (or raw.var_names) and a threshold is supplied, the previous implementation summed those columns per cell before thresholding. The new accessor instead flattens the selected matrix, as shown in the AnnData accessor implementation, producing more than n_obs values. Consequently, indexing with the n_obs-length mask raises an IndexError, breaking previously supported threshold plots for datasets with duplicate gene names. Retain the per-cell column sum in the threshold branch rather than replacing it with a flattened gene vector.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Not fixing. Duplicate var_names were never supported consistently: without a threshold, obs_vector already flattened duplicate columns to more than n_obs values (checked on anndata 0.13.4), the same as anndata.acc now. AnnData itself warns on non-unique names and points to var_names_make_unique(). Keeping one code path for both branches.

@Marius1311
Marius1311 merged commit 0d79215 into main Nov 13, 2026
12 of 13 checks passed
@Marius1311
Marius1311 deleted the worktree-cellrank-ci branch November 13, 2026 14:29
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.

Guard against UCX/MPI log flooding when use_petsc=True on HPC nodes

1 participant