Skip to content

chore!: remove AnnData.concatenate#2370

Open
ilan-gold wants to merge 10 commits intomainfrom
ig/remove_concatenate
Open

chore!: remove AnnData.concatenate#2370
ilan-gold wants to merge 10 commits intomainfrom
ig/remove_concatenate

Conversation

@ilan-gold
Copy link
Contributor

@ilan-gold ilan-gold commented Mar 18, 2026

  • Release note not necessary because:

@ilan-gold ilan-gold added this to the 0.13.0 milestone Mar 18, 2026
@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.85%. Comparing base (753f058) to head (cc2a56a).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2370      +/-   ##
==========================================
- Coverage   87.36%   84.85%   -2.52%     
==========================================
  Files          49       49              
  Lines        7787     7763      -24     
==========================================
- Hits         6803     6587     -216     
- Misses        984     1176     +192     
Files with missing lines Coverage Δ
src/anndata/_core/anndata.py 83.21% <100.00%> (-0.14%) ⬇️

... and 13 files with indirect coverage changes

@ilan-gold ilan-gold marked this pull request as ready for review March 19, 2026 12:13
@ilan-gold ilan-gold requested a review from flying-sheep March 19, 2026 12:13
Copy link
Member

@flying-sheep flying-sheep left a comment

Choose a reason for hiding this comment

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

looks great, but please go through all the tests you now switched from concatenate to concat and delete all the duplicate ones if any exist – I assume we test concat elsewhere and some of the changed tests now test the exact same code paths as previously existing ones.

assert np.allclose(var_ma.compressed(), var_ma_ref.compressed())


@mark_legacy_concatenate
Copy link
Member

@flying-sheep flying-sheep Mar 20, 2026

Choose a reason for hiding this comment

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

The possibly redundant ones start here I think

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Weirdly enough, this one is simultaneously testing two things not currently tested - how does join affect obs columns and X when X is dense. There is a similar test for sparse, test_concatenate_sparse which doesn't do the obs. Should they be refactored for parametrization? Maybe, I'd need to look closer to see if that's feasible.

That's why I did refactor the other test where the big diff is - the behavior literally changed and would not have been tested otherwise.

Copy link
Member

Choose a reason for hiding this comment

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

yeah, I just mean that there are a bunch of tests where you remove @mark_legacy_concatenate and replace concatenate with concat. Are there no pre-existing concat tests that cover what these ones do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants