10000 Add information about launch command to napari info dialog by Czaki · Pull Request #7897 · napari/napari · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add information about launch command to napari info dialog #7897

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

Merged
merged 3 commits into from
May 9, 2025

Conversation

Czaki
Copy link
Collaborator
@Czaki Czaki commented May 7, 2025

References and relevant issues

Description

For better understanding of user bug report, add information about how napari was launched.

Sample output, when napari launched from PartSeg
obraz

@Czaki Czaki requested a review from a team as a code owner May 7, 2025 08:46
@github-actions github-actions bot added the maintenance PR with maintance changes, label May 7, 2025
Copy link
Member
@jni jni left a comment

Choose a reason for hiding this comment

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

I'm +/- on this. I think it's mostly going to be noise. But I don't object.

btw what would the output be from the bundle?

@@ -48,7 +48,7 @@ body:
attributes:
label: "\U0001F30E Environment"
description: |
Please provide detailed information regarding your environment. Please paste the output of `napari --info` here or copy the information from the "napari info" dialog in the napari Help menu.
Please provide detailed information regarding your environment. Please paste the information from the "napari info" dialog in the napari Help menu or the output of `napari --info` here.
Copy link
Member

Choose a reason for hiding this comment

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

I would revert this, though I understand the motivation...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe allow other core dev to provide opinion?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, all my comments are suggestions for discussion.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I like the new order, actually.

Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer this new order. I'm always going to vote GUI-first, coder second for user facing things.

Copy link
Contributor

Choose a reason for hiding this comment

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

(maybe update the below placeholder text, both for a more recent napari, and to show this addition and the recent experimental settings addition)

Copy link
Member

Choose a reason for hiding this comment

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

If we change this order then we should ensure the GUI provides parity. Right now I think the GUI info doesn't list plugins and I gather this change is related to plugins, so napari --info is preferred. And I think part of the motivation for this PR was plugin related...

Copy link
Contributor

Choose a reason for hiding this comment

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

Right now I think the GUI info doesn't list plugins and I gather this change is related to plugins, so napari --info is preferred

Is this something we can fix? I actualyl thought plugin info is in GUI, but it does seem not to be!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If we change this order then we should ensure the GUI provides parity. Right now I think the GUI info doesn't list plugins and I gather this change is related to plugins, so napari --info is preferred. And I think part of the motivation for this PR was plugin related...

Let's me check this. Both ways should provide exactly the same information

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Opened PR to fix that #7899

@jni jni changed the title Add information about launch command to napari infor dialog Add information about launch command to napari info dialog May 7, 2025
@Czaki
Copy link
Collaborator Author
Czaki commented May 7, 2025

btw what would the output be from the bundle?

Will test later (by manual edit bundle)

Copy link
codecov bot commented May 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.94%. Comparing base (a75fbfd) to head (5edb9a7).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7897      +/-   ##
==========================================
+ Coverage   92.92%   92.94%   +0.02%     
==========================================
  Files         641      641              
  Lines       60615    60619       +4     
==========================================
+ Hits        56324    56340      +16     
+ Misses       4291     4279      -12     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite pro 8000 blems.

@Czaki
Copy link
Collaborator Author
Czaki commented May 7, 2025

bundle output on windows
image

@jni
Copy link
Member
jni commented May 7, 2025

That's actually very nice! Ok I'm sold. 😊

@Czaki
Copy link
Collaborator Author
Czaki commented May 7, 2025

I worry that it will not help on macOS (because of our subprocess trick)

@TimMonko
Copy link
Contributor
TimMonko commented May 7, 2025

I am 10000% on board with this.

While this has some benefit to us for troubleshooting a bug, I think it actually has a bigger use-case for end user support that wouldn't normally land here on Github.

For example, a surprising number of users don't close napari for weeks. Then, when I go to troubleshoot things, I ask how they launched napari (often they have multiple installs) and well... they don't know! It was weeks ago! Which of their 12 terminals and 3 jupyter notebooks is a it from? Was it the bundle?

This is genuinely the most prominent issue for me when supporting users. It's the 'did you turn it on and off again', except its the 'how did you turn it on, so that we can restart' version.

This is the 'how', to the otherwise 'what' of napari --info.

TimMonko
TimMonko previously approved these changes May 7, 2025
@TimMonko
Copy link
Contributor
TimMonko commented May 7, 2025

Is it working for Windows though?

I see for example:
C:\Users\timmo\.local\bin\napari which doesn't make sense to me when I'm launching from a uv .venv with C:\Users\timmo\Documents\Github\napari> napari

Edits:

Wait, this is where the executable lives. HUH TIL I thought it would be in the environment? Unless I'm accessing the global napari and thats the ENTIRE point of this PR. 😬

so apparently I'm not actually launching from the .venv, but from a global environment, my bad.
Love how it shows things if it comes from a script, i.e. c:/Users/timmo/Documents/Github/napari/examples/layers.py

Edit again, I've done some wild things to my environment. Used to working from home and not the lab. Save me from my mistakes

@TimMonko TimMonko self-requested a review May 7, 2025 17:28
@TimMonko TimMonko dismissed their stale review May 7, 2025 17:29

oops. still not sure how to un-approve

@Czaki
Copy link
Collaborator Author
Czaki commented May 7, 2025

C:\Users\timmo\.local\bin\napari which doesn't make sense to me when I'm launching from a uv .venv with C:\Users\timmo\Documents\Github\napari> napari

Did this file exist on your machine?

@TimMonko
Copy link
Contributor
TimMonko commented May 7, 2025

For sure, I've totally messed up my environment out in ways I didn't expect, so this is actually helping me troubleshoot !

@TimMonko
Copy link
Contributor
TimMonko commented May 8, 2025

Okay so here's the lovely situation I found myself in at work with my VSCode ... and goes to the entire point of the PR that this helped me troubleshoot.

  1. VSCode terminal launched napari from a global install
  2. python scripts in terminal defaulted to a mamba env from a while ago
  3. python notebooks I would set to the .venv (this is normally what I use when testing)

So yeah, don't be like me! Every path was very helpful in figuring this out (I've sinced changed my VSCode defaults to be more cohesive huzzah)

@TimMonko TimMonko added the ready to merge Last chance for comments! Will be merged in ~24h label May 8, 2025
@psobolewskiPhD
Copy link
Member
psobolewskiPhD commented May 8, 2025

on mac:
using napari --info:

Launch command
  - /Users/piotrsobolewski/Dev/miniforge3/envs/napari-dev/bin/napari --info

Using the CLI to launch and then GUI info:

Launch command
- /Users/piotrsobolewski/Dev/miniforge3/envs/napari-dev/bin/napari

From ipython:

Launch command
- /Users/piotrsobolewski/Dev/miniforge3/envs/napari-dev/bin/ipython

From an example:

Launch command
- examples/add_labels_with_features.py

All of those seem ok!

@brisvag brisvag merged commit c069270 into napari:main May 9, 2025
45 checks passed
@github-actions github-actions bot removed the ready to merge Last chance for comments! Will be merged in ~24h label May 9, 2025
@Czaki Czaki deleted the launch_command_in_napari_info branch May 9, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance PR with maintance changes,
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0