feat(plotting): support boolean color mappings from adata.uns - #4252
Draft
daveringelberg wants to merge 2 commits into
Draft
feat(plotting): support boolean color mappings from adata.uns#4252daveringelberg wants to merge 2 commits into
daveringelberg wants to merge 2 commits into
Conversation
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Member
|
Looks like it mostly works except for a small discrepancy in expected values (alpha channel I suppose): But this is a lot of added complexity. Don’t you think it makes more sense to just add both colors in a list if the categorical is boolean? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a draft PR addressing #4219
Release notes are included in
docs/release-notes/4219.feat.mdSummary
This draft PR adds support for mappings stored in
adata.uns[f"{key}_colors"], so boolean colors can stay tied toTrue/Falseafter subsetting.Existing list-based color behavior is preserved.
Testing
Added tests for:
adata.unsTrueor onlyFalsepalette=argumentadata.unsafter subsetting.Local checks run:
ruff checkruff format --checkpython -m py_compilegit diff --checkI could not run
pytestlocally due to local environment issues, so I am opening this as a draft for CI and maintainer feedback.