scverse / scanpy

Single-cell analysis in Python. Scales to >1M cells.
https://scanpy.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.92k stars 602 forks source link

Fix stacked_violin’s `standard_scale` parameter #3243

Closed flying-sheep closed 1 month ago

flying-sheep commented 1 month ago

The tests use group but the code handles obs

TODO: should heatmap be changed too? Its docs actually speak of “variables or observations” and not “variables or groups”

About the test changes:

Some time ago, matplotlib made a change to font rendering. Since we have such high tolerance when comparing plots, that didn’t affect our tests. But that also means that our tests are almost useless, since the actual qualitative difference in the test that did change behavior due to my PR wasn’t caught. Therefore I lowered the tolerance, which meant I had to regenerate everything with the new font rendering.

Before After
codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 76.75%. Comparing base (bd75839) to head (c06bbc8). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/scanpy/plotting/_stacked_violin.py 25.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3243 +/- ## ========================================== + Coverage 76.49% 76.75% +0.25% ========================================== Files 109 109 Lines 12544 12548 +4 ========================================== + Hits 9596 9631 +35 + Misses 2948 2917 -31 ``` | [Files with missing lines](https://app.codecov.io/gh/scverse/scanpy/pull/3243?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse) | Coverage Δ | | |---|---|---| | [src/scanpy/plotting/\_stacked\_violin.py](https://app.codecov.io/gh/scverse/scanpy/pull/3243?src=pr&el=tree&filepath=src%2Fscanpy%2Fplotting%2F_stacked_violin.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse#diff-c3JjL3NjYW5weS9wbG90dGluZy9fc3RhY2tlZF92aW9saW4ucHk=) | `83.90% <25.00%> (-0.68%)` | :arrow_down: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/scverse/scanpy/pull/3243/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scverse)