Skip to content

Fix unused cmap in render_points #432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 22, 2025
Merged

Conversation

melonora
Copy link
Contributor

@melonora melonora commented Mar 22, 2025

The test test_plot_coloring_with_cmap in the tests for points was wrongly passing. When switching from the use of get_categorical_obs to _get_categorical_color_mapping, the cmap was not anymore in the arguments. This led to the default colors always being used despite a colormap being defined. This PR fixes that issue by updating _get_categorical_color_mapping.
On main:
image

With this PR:
image

@codecov-commenter
Copy link

codecov-commenter commented Mar 22, 2025

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 85.21%. Comparing base (3b82c78) to head (0a0a81d).

Files with missing lines Patch % Lines
src/spatialdata_plot/pl/utils.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #432      +/-   ##
==========================================
+ Coverage   85.20%   85.21%   +0.01%     
==========================================
  Files           8        8              
  Lines        1751     1759       +8     
==========================================
+ Hits         1492     1499       +7     
- Misses        259      260       +1     
Files with missing lines Coverage Δ
src/spatialdata_plot/pl/render.py 96.89% <ø> (ø)
src/spatialdata_plot/pl/utils.py 78.34% <87.50%> (+0.07%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@melonora melonora merged commit b314b75 into scverse:main Mar 22, 2025
4 checks passed
@melonora melonora deleted the fix_points_cmap branch March 22, 2025 15:52
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.

3 participants