Repository navigation
fix: get CI green under pandas 3.1; adopt anndata.acc; document PETSc UCX log flood - #1390
Conversation
- 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>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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 |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
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.
Part of #1389. Closes #1384.
Bug fixes
main:test_bare_string_does_not_warnandtest_trends_gene_layer_signal_no_warningturned everyDeprecationWarninginto an error. anndata 0.13.4 sets a pandas option that pandas 3.1 deprecates, emittingPandas4Warning(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")raisedKeyErrorfor gene keys without athreshold.Changes
anndata.accinstead of the deprecatedAnnData.obs_vector. Requiresanndata>=0.13(was>=0.11).pd.merge(..., copy=)dropped; the keyword is deprecated under copy-on-write.ulimit -l, with theUCX_TLS=self,sm,tcpworkaround.Local:
hatch test -py 3.12: 1143 passed, 102 skipped (PETSc/R). The PETSc job will still fail on the pyGPCCAgetVecsissue until pygpcca 1.1.0 is used there (#1389).🤖 Generated with Claude Code