Skip to content

feat: add configurable columns to PAGA plots - #4325

Open
AtomicGlance wants to merge 3 commits into
scverse:mainfrom
AtomicGlance:feat/paga-ncols
Open

feat: add configurable columns to PAGA plots#4325
AtomicGlance wants to merge 3 commits into
scverse:mainfrom
AtomicGlance:feat/paga-ncols

Conversation

@AtomicGlance

Copy link
Copy Markdown

Summary

  • Add an ncols parameter to sc.pl.paga for wrapping multiple color panels into a grid.
  • Preserve the existing single-row layout when ncols=None.
  • Keep colorbars aligned with grid panels and validate invalid column counts.
  • Add regression coverage and a release-note fragment.

Closes #1203

Tests

  • pytest -q tests/plotting/legacy/test_paga.py -k paga_ncols -o filterwarnings=: 8 passed
  • Ruff, Python byte-compilation, and git diff --check pass.
  • The rest of test_paga.py passes 24 tests; one unrelated test needs to download the existing pbmc3k fixture, which is blocked in this environment.

Signed-off-by: AtomicGlance <amiralimoradniaei@gmail.com>
@AtomicGlance

Copy link
Copy Markdown
Author

The code and focused tests are in place. One repository metadata check is failing only because this fork PR cannot add the required no milestone label without upstream permissions. Could a maintainer add that label or assign a milestone?

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.88%. Comparing base (ec37402) to head (d1c23f2).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4325      +/-   ##
==========================================
- Coverage   81.98%   81.88%   -0.11%     
==========================================
  Files         134      134              
  Lines       13235    13254      +19     
==========================================
+ Hits        10851    10853       +2     
- Misses       2384     2401      +17     
Flag Coverage Δ
hatch-test.low-vers ?
hatch-test.pre 81.88% <100.00%> (+0.02%) ⬆️

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

Files with missing lines Coverage Δ
src/scanpy/plotting/legacy/_tools/paga.py 65.53% <100.00%> (+1.14%) ⬆️

... and 5 files with indirect coverage changes

Signed-off-by: AtomicGlance <amiralimoradniaei@gmail.com>
@AtomicGlance

Copy link
Copy Markdown
Author

Thanks for flagging this. I added coverage for invalid ncols values, the ncols plus pre-supplied ax error, and a custom colorbar axis, then pushed b6c4457. The focused PAGA tests now pass 11 cases; Codecov should rerun on the new commit.

@AtomicGlance

Copy link
Copy Markdown
Author

CI reran on the latest commit. The PAGA-focused tests pass and Codecov reports 100% patch coverage.\n\nThe remaining Python 3.14 failure is unrelated to this change: ests/test_logging.py::test_logfile finishes with 3,033 tests passed and one teardown error from an unclosed-file ResourceWarning. That test is unchanged in this PR and the diff is limited to PAGA code, tests, and the release-note fragment, so I have not added an unrelated fix.\n\nThe title/milestone/labels check is also still blocked because this fork cannot add the repository's no-milestone label or assign a milestone. Could a maintainer handle that metadata check and advise whether the Python 3.14 logging failure should be rerun or tracked upstream?

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.

sc.pl.paga: TypeError: paga() got an unexpected keyword argument 'ncols'

1 participant