Skip to content

refactor!: remove legacy preprocessing recipes - #4493

Open
sylvesterkaczmarek wants to merge 3 commits into
scverse:mainfrom
sylvesterkaczmarek:fix/4433-remove-legacy-recipes
Open

sylvesterkaczmarek wants to merge 3 commits into
scverse:mainfrom
sylvesterkaczmarek:fix/4433-remove-legacy-recipes

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek sylvesterkaczmarek commented Nov 6, 2026 •

Copy link
Copy Markdown

Refs #4433, scoped to the three legacy preprocessing recipes discussed there.

Remove pp.recipe_seurat, pp.recipe_zheng17, pp.recipe_weinreb17 and their private implementation for the planned Scanpy 2.0 cleanup. Keep experimental.pp.recipe_pearson_residuals and the lower-level preprocessing functions unchanged.

Update the live API pages, Scanorama example and PAGA tutorial to explicit preprocessing steps. A breaking-change fragment and migration guide explain default Seurat/Zheng replacements under ScanpyV1, the additional uns["log1p"] metadata, and why Weinreb workflows do not have an exact standard-function replacement. Clear only the obsolete log output of the edited notebook cell; historical release notes remain intact.

Validation

  • Relevant preprocessing, normalization, highly-variable-gene, PCA, accessor and API suites: 1,732 passed, 33 skipped, 60 expected failures; 298 subtests passed. Final sources were unchanged throughout the run.
  • Six API-removal checks fail on the original implementation; the experimental-recipe control remains available.
  • Forty comparisons against the removed implementation preserve final expression matrices, selected genes and normalization factors for the documented defaults. The explicitly documented uns["log1p"] metadata difference is excluded from equivalence claims. An independent review separately passed 24 migration comparisons.
  • Ruff and whitespace checks pass. The complete repository suite, full documentation build and complete tutorial execution were not run. This is an intentional breaking API removal, not a change to the underlying normalization or statistical algorithms.

Subsequent validation

The migration example now works with supported AnnData 0.12.14 as well as 0.13.4. The later focused run passed 58 tests in each environment. The broader preprocessing suite passed 766 tests, with 54 expected failures. Eight old-recipe comparisons per environment matched normalized values, gene selection and normalization factors exactly, with small documented floating-point scaling differences in some cases.

The formerly provisional release-note fragment is now docs/release-notes/4493.breaking.md. The upstream Read the Docs status succeeded on this follow-up commit. Its complete builder log was not independently inspected, and future CI reruns remain pending. Human line-by-line review of these latest changes remains pending.

LLM usage

  • LLM or coding agent used: GPT-6 via ChatGPT and Codex CLI v0.166.0 assisted with code, tests, documentation, and review. The Codex model version used for the original implementation was not independently recorded.

  • If one was used, I, a human, have reviewed, understood and tested every changed line.

  • Linked issue: Remove recipes #4433 (legacy recipes only).

  • Tests included.

  • Breaking-change release note and migration guide included.

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.12%. Comparing base (117682e) to head (838abc4).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4493      +/-   ##
==========================================
- Coverage   85.13%   85.12%   -0.02%     
==========================================
  Files         138      136       -2     
  Lines       12247    12205      -42     
==========================================
- Hits        10427    10390      -37     
+ Misses       1820     1815       -5     
Flag Coverage Δ
hatch-test.low-vers 78.63% <ø> (-0.04%) ⬇️
hatch-test.pre 84.91% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/scanpy/external/pp/_scanorama_integrate.py 100.00% <ø> (ø)
src/scanpy/preprocessing/__init__.py 100.00% <ø> (ø)

@sylvesterkaczmarek sylvesterkaczmarek changed the title Remove legacy preprocessing recipes refactor!: remove legacy preprocessing recipes Nov 7, 2026
@sylvesterkaczmarek

Copy link
Copy Markdown
Author

The hosted test matrix, build, pre-commit, benchmark and coverage checks are now green on head 838abc4. The remaining failing PR validation is the milestone/label requirement. Since this is a breaking-change cleanup for Scanpy 2.0, could a maintainer assign the 2.0.0 milestone, or apply no milestone if that fits the release plan better? The numbered breaking-change fragment is in place. The human line-by-line review declaration is intentionally still unchecked pending manual confirmation.

This branch has not been deployed

No deployments
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