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

implement manager view and dialog #124

Merged
merged 6 commits into from
Jan 5, 2024
Merged

Conversation

alessandrofelder
Copy link
Member

@alessandrofelder alessandrofelder commented Dec 21, 2023

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
We'd like to have a separate table view that allows updating and downloading of atlases via the BrainGlobe atlas API

What does this PR do?

This PR

  • implements this table view
  • does not add it to a widget - will follow in separate PR
    • for now, manual visual inspection of the class can be done by executing the python script below
from brainrender_napari.widgets.atlas_manager_view import AtlasManagerView
from qtpy.QtWidgets import QApplication

app = QApplication([])
view = AtlasManagerView()
view.show()
app.exec()

Some refactoring was needed so

  • different views can have different tooltips
  • different views can display a formatted atlas name in their tooltips without code duplication

References

Another step towards closing #21

How has this PR been tested?

New tests added to cover

Is this a breaking change?

Yes, AtlasTableModel constructor now takes an argument view_type, which specifies the class whose get_tooltip_text function it should call.

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.

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

and delegate tooltips to views
Copy link

codecov bot commented Dec 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ebf43dc) 97.72% compared to head (f550c72) 98.06%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #124      +/-   ##
==========================================
+ Coverage   97.72%   98.06%   +0.34%     
==========================================
  Files           9       11       +2     
  Lines         396      466      +70     
==========================================
+ Hits          387      457      +70     
  Misses          9        9              

☔ 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 December 21, 2023 16:27
so it's picked up by coverage
@alessandrofelder alessandrofelder self-assigned this Dec 22, 2023
Copy link
Member

@IgorTatarnikov IgorTatarnikov left a comment

Choose a reason for hiding this comment

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

Looks good 👍! I have a few small comments but nothing that needs to be urgently addressed.

The tooltips feel a bit sluggish, especially when moving the mouse within the same row. Is there any way to add a small delay before the tooltip is rendered?

brainrender_napari/widgets/atlas_manager_view.py Outdated Show resolved Hide resolved
Co-authored-by: Igor Tatarnikov <[email protected]>
@alessandrofelder alessandrofelder merged commit 014f5c5 into main Jan 5, 2024
12 checks passed
@alessandrofelder alessandrofelder deleted the atlas-manager-view branch January 5, 2024 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants