brainglobe / brainglobe-registration

Registration to BrainGlobe atlases in napari using Elastix
BSD 3-Clause "New" or "Revised" License
13 stars 2 forks source link

Info message when running BrainGlobe Registration plugin with no atlas installed #46

Closed saarah815 closed 2 months ago

saarah815 commented 2 months ago

Before submitting a pull request (PR), please read the contributing guide.

Please fill out as much of this template as you can, but if you have any problems or questions, just leave a comment and we will help out :)

Description

What is this PR

Why is this PR needed?

If user has no atlases installed, this widget informs user that they need to install atlas(es) before they are able to use BrainGlobe Registration plugin.

What does this PR do?

If no atlases installed:

image

image

References

Please reference any existing issues/PRs that relate to this PR.

Issue #15

How has this PR been tested?

Please explain how any new code has been tested, and how you have ensured that no existing functionality has changed.

Is this a breaking change?

If this PR breaks any existing functionality, please explain how and why.

N/A

Does this PR require an update to the documentation?

If any features have changed, or have been added. Please explain how the documentation has been updated (and link to the associated PR). See here for details.

N/A

Checklist:

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 82.98%. Comparing base (538cdd2) to head (62b095a). Report is 1 commits behind head on dev.

Files Patch % Lines
brainglobe_registration/utils/utils.py 85.71% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #46 +/- ## ========================================== + Coverage 82.91% 82.98% +0.07% ========================================== Files 8 8 Lines 515 523 +8 ========================================== + Hits 427 434 +7 - Misses 88 89 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

IgorTatarnikov commented 2 months ago

I just noticed that we have the display_info convenience function in brainglobe-utils.qtpy.dialog that takes care of the Qt internals. This can simplify the code even further, you can import it and just call display_info with the corresponding title and message if no atlases are installed!

saarah815 commented 2 months ago

Last set of changes I promise! I'll mark it as approved, you can make the final changes and then I'll merge it in!

Perfect, thank you!