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
Feature: making the Help menu more helpful via weblinks (re-do of #5094) #5399
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5399 +/- ##
==========================================
- Coverage 89.01% 89.01% -0.01%
==========================================
Files 594 596 +2
Lines 50237 50264 +27
==========================================
+ Hits 44720 44744 +24
- Misses 5517 5520 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
This is awesome @psobolewskiPhD, thanks for working on this.
I would suggest we link to a documentation page where we can have troubleshoot and explain how users can report issues on github (a lot of users might not have a github account) However, we could add this 'report issue on github' on dev mode only :). Cheers! |
id=CommandId.NAPARI_GETTING_STARTED, | ||
title=CommandId.NAPARI_GETTING_STARTED.title, | ||
callback=lambda: webbrowser.open( | ||
f'https://napari.org/{VERSION}/tutorials/start_index.html' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@psobolewskiPhD how about we move all these URLS to a constant dictionary next to VERSION
that way we can write a simple test that checks if the urls keep working moving forward.
We can use requests to write this test.
Something like:
HELP_URLS = {
"getting-started":, f'https://napari.org/{VERSION}/tutorials/start_index.html',
"tutorials": f'https://napari.org/{VERSION}/tutorials/index.html',
# ...
}
callback=lambda: webbrowser.open(HELP_URLS['getting-started'])
And the test could be something like
import requests # See https://requests.readthedocs.io/en/latest/
from napari._app_model.actions._help_actions import HELP_URLS
def test_help_urls():
for key, url in HELP_URLS.items():
r = requests.head(url)
r.raise_for_status() # Will raise for 4xx and 5xx codes. See: https://requests.readthedocs.io/en/latest/api/#requests.Response.raise_for_status
(Did not test any of this code... but it should work or almost :-p)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @psobolewskiPhD, left a comment for a small tweak so we can test the urls keep working 🧪
Love it! 🥰
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a ton @goanpeca
Really helpful!
Implemented the test slightly differently:
I wanted the test to return info about each link, because I knew release_notes
doesn't work for dev
(aka CI).
So I read up on parametrize from pytest and used that to check each url in the dict, skipping the release notes one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @psobolewskiPhD, left a comment for a small tweak so we can test the urls keep working 🧪
Like this one? (just noticed it doesn't mention the zulip, maybe should update that section, and maybe it should be a dedicated
This is definitely doable, already doing a check for that. |
This could result in a lot of people reporting the same issue over and over, since my experience is that a lot of users do not search if an issue has been previously reported before opening a new one 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I don't want to nitpick on the choosing and ordering of what links should go here, because this is apparently better than not having anything. But would be great to eventually refine the list of links that goes in here
I'm open to nitpicks! |
@goanpeca I added a link to GitHub issues for dev versions: Here's a live release (0.4.17): I'm using the conditional Edit: Could add another divider before Release Notes / GitHub |
@psobolewskiPhD looks great 🚀
On the dev version text I would suggest, "Report an issue on Github" as it feels more generic, you could also report a feature request, while fixing a bug ;-) (It is not all bugs 😆) |
@goanpeca Here's the new dev version: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me, thanks @psobolewskiPhD !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this, thank you @psobolewskiPhD!
We have a bunch of approvals already fopr a while, let's get this in :) |
Peter, how can I install the version of napari that has the links in the help menu? |
You would need to install the dev version, either like in the contributor docs: |
Thanks.
…On Fri, Mar 3, 2023 at 3:45 PM Peter Sobolewski ***@***.***> wrote:
Peter, how can I install the version of napari that has the links in the
help menu?
You would need to install the dev version, either like in the contributor
docs:
https://napari.org/stable/developers/contributing.html#setting-up-a-development-installation
or you could try just installing from GitHub directly using pip:
pip install git+https://github.com/napari/napari.git
but for this to work I think you will need an env with pyqt5 or pyside2
—
Reply to this email directly, view it on GitHub
<#5399 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/A3CMNTCQEBUTN2YMAKDLNZLW2JQ6HANCNFSM6AAAAAAS235KJM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Description
This PR is a re-do of #5096 due to the move to app-model.
It populates the Help menu with links to helpful resources, including the Getting started guide, Layers guides, examples, and release notes (for releases only, disable for dev):
While having access to some of these resources within napari could be nice, it seems common across programs I use (e.g. VS Code) for the Help menu to just link out to webpages.
I'm kind of tempted to add: Report Issue linking to GitHub issues?
Type of change
References
Closes #5094
How has this been tested?
as there are small differences between the two Qt bindings.
Final checklist:
trans.
to make them localizable.For more information see our translations guide.