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

For npe2 plugin, use manifest display_name for File > Open Samples #5351

Merged

Conversation

psobolewskiPhD
Copy link
Member

Description

This PR is the 2nd half to #5305 aiming to fix: #5304
It uses the display_name from the npe2 plugin manifest for the name of the plugin shown in the File > Open Sample menu. See:
image
"Hello plugin" is shown instead of napari-first-try

Type of change

  • Bug-fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

References

Fixes #5304
See also the discussion here: napari/cookiecutter-napari-plugin#126
Also note that the napari-hub has started to use the display_name as well:
chanzuckerberg/napari-hub#759 (comment)

How has this been tested?

  • example: the test suite for my feature covers cases x, y, and z: I added a check to existing test
  • example: all tests pass with my change
  • example: I check if my changes works with both PySide and PyQt backends
    as there are small differences between the two Qt bindings.

Final checklist:

  • My PR is the minimum possible work for the desired functionality
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • If I included new strings, I have used trans. to make them localizable.
    For more information see our translations guide.

@github-actions github-actions bot added the tests Something related to our tests label Nov 20, 2022
@codecov
Copy link

codecov bot commented Nov 20, 2022

Codecov Report

Merging #5351 (050894f) into main (76a81e0) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #5351      +/-   ##
==========================================
+ Coverage   89.04%   89.10%   +0.05%     
==========================================
  Files         584      584              
  Lines       49393    49394       +1     
==========================================
+ Hits        43983    44012      +29     
+ Misses       5410     5382      -28     
Impacted Files Coverage Δ
napari/plugins/_npe2.py 92.95% <ø> (ø)
napari/plugins/_tests/test_npe2.py 100.00% <100.00%> (ø)
napari/_qt/qt_main_window.py 76.04% <0.00%> (+0.18%) ⬆️
napari/utils/theme.py 89.79% <0.00%> (+0.68%) ⬆️
napari/_qt/qt_event_loop.py 82.31% <0.00%> (+0.68%) ⬆️
napari/utils/interactions.py 77.35% <0.00%> (+2.83%) ⬆️
napari/_qt/widgets/qt_color_swatch.py 74.79% <0.00%> (+3.25%) ⬆️
napari/utils/info.py 83.33% <0.00%> (+4.44%) ⬆️
napari/_qt/__init__.py 55.17% <0.00%> (+6.89%) ⬆️
napari/_tests/test_draw.py 100.00% <0.00%> (+63.15%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@DragaDoncila DragaDoncila left a comment

Choose a reason for hiding this comment

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

Awesome 🎉 Thanks @psobolewskiPhD!

@DragaDoncila DragaDoncila merged commit 7ccee2c into napari:main Nov 22, 2022
psobolewskiPhD added a commit to psobolewskiPhD/napari that referenced this pull request Nov 23, 2022
psobolewskiPhD added a commit to psobolewskiPhD/napari that referenced this pull request Nov 23, 2022
@psobolewskiPhD psobolewskiPhD added this to the 0.5.0 milestone Dec 11, 2022
@psobolewskiPhD psobolewskiPhD added the bugfix PR with bugfix label Dec 11, 2022
@Czaki Czaki mentioned this pull request Jun 7, 2023
@Czaki Czaki modified the milestones: 0.5.0, 0.4.18 Jun 16, 2023
@Czaki Czaki added the triaged-0.4.18 To mark PR that is triaged in 0.4.18 release process label Jun 16, 2023
Czaki pushed a commit that referenced this pull request Jun 16, 2023
…5351)

* use manifest display_name for Open Samples menu

* Add check in test
Czaki pushed a commit that referenced this pull request Jun 17, 2023
…5351)

* use manifest display_name for Open Samples menu

* Add check in test
Czaki pushed a commit that referenced this pull request Jun 18, 2023
…5351)

* use manifest display_name for Open Samples menu

* Add check in test
Czaki pushed a commit that referenced this pull request Jun 19, 2023
…5351)

* use manifest display_name for Open Samples menu

* Add check in test
Czaki pushed a commit that referenced this pull request Jun 21, 2023
…5351)

* use manifest display_name for Open Samples menu

* Add check in test
Czaki pushed a commit that referenced this pull request Jun 21, 2023
…5351)

* use manifest display_name for Open Samples menu

* Add check in test
Czaki pushed a commit that referenced this pull request Jun 21, 2023
…5351)

* use manifest display_name for Open Samples menu

* Add check in test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix PR with bugfix tests Something related to our tests triaged-0.4.18 To mark PR that is triaged in 0.4.18 release process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

for npe2 plugins with multiple sample datasets or widgets, the display_name from the manifest isn't used
4 participants