Skip to content
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

User-specified colormap in PointsDensity #325

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

GuillaumeLeGoc
Copy link
Contributor

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
NA

What does this PR do?
Allows the user to specify a colormap for the points density feature.

References

#323

How has this PR been tested?

I ran examples/cell_density.py example,

scene.add(PointsDensity(coordinates))

using scene.add(PointsDensity(coordinates, colors="inferno")) instead.

Is this a breaking change?

I hope not

Does this PR require an update to the documentation?

The PointsDensity is not documented in the documentation, so NA. We could add the colormap option in the example.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality (unit & integration)
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

Notes

I'm unfamiliar with (read : I don't know anything about) tests and pre-commits, so I didn't do those. I used ruff to format my addition in VSCode, but that's about it.

Copy link

codecov bot commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (980a76f) 86.39% compared to head (9283ce8) 86.39%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #325   +/-   ##
=======================================
  Coverage   86.39%   86.39%           
=======================================
  Files          26       26           
  Lines        1213     1213           
=======================================
  Hits         1048     1048           
  Misses        165      165           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alessandrofelder alessandrofelder marked this pull request as ready for review February 2, 2024 15:04
Copy link
Member

@alessandrofelder alessandrofelder left a comment

Choose a reason for hiding this comment

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

Thanks @GuillaumeLeGoc !

Existing tests pass, and I have confirmed this works locally for me as expected too.
I don't think this critically needs a test right now (although it would be nice!) - happy to support you to learn about and write tests in the future though!

You're also right that we could improve the documentation further - it's on the list 😅

@alessandrofelder alessandrofelder merged commit 49c66f5 into brainglobe:main Feb 2, 2024
11 checks passed
alessandrofelder added a commit to brainglobe/brainglobe.github.io that referenced this pull request Feb 2, 2024
IgorTatarnikov pushed a commit to brainglobe/brainglobe.github.io that referenced this pull request Feb 2, 2024
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.

None yet

2 participants