8000 [maint] Add whether napari was installed using conda to napari info by psobolewskiPhD · Pull Request #7844 · napari/napari · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[maint] Add whether napari was installed using conda to napari info #7844

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
Apr 23, 2025

Conversation

psobolewskiPhD
Copy link
Member

References and relevant issues

Motivation:
Particularly when the plugin manager is involved, there can be differences between napari from conda and from PyPI.
We ask for napari --info, but this doesn't include how napari was installed, so then we need to followup with that question.

Description

Adds a simple check for napari metadata file in the conda-meta to utils/info. If it exists, it's safe to assume that napari was installed using conda. If true, this is then used to indicate that napari was from conda. I also added a test for this.

Here's an example output (i 'touched' a sham json file):

napari: 0.6.0a0 (from conda)
Platform: macOS-14.5-arm64-arm-64bit-Mach-O
System: MacOS 14.5
Python: 3.13.2 | packaged by conda-forge | (main, Feb 17 2025, 14:02:48) [Clang 18.1.8 ]
Qt: 6.8.2
PyQt6: 6.8.1
NumPy: 2.1.3
SciPy: 1.15.2
Dask: 2025.2.0
VisPy: 0.14.3
magicgui: 0.10.0
superqt: 0.7.1
in-n-out: 0.2.1
app-model: 0.3.1
psygnal: 0.12.0
npe2: 0.7.8
pydantic: 2.10.6

OpenGL:
  - GL version:  2.1 Metal - 88.1
  - MAX_TEXTURE_SIZE: 16384
  - GL_MAX_3D_TEXTURE_SIZE: 2048

Screens:
  - screen 1: resolution 1680x1050, scale 2.0

Optional:
  - numba: 0.61.0
  - triangle not installed
  - napari-plugin-manager: 0.1.4

Settings path:
  - /Users/piotrsobolewski/Library/Application Support/napari/napari-dev_a1eb8b76ba95fa16ad06e26097b46b8455dfbf0b/settings.yaml
Plugins:
  - napari: 0.6.0a0 (81 contributions)
  - napari-console: 0.1.3 (0 contributions)
  - napari-svg: 0.2.1 (2 contributions)

@psobolewskiPhD psobolewskiPhD requested a review from a team as a code owner April 21, 2025 22:33
@github-actions github-actions bot added the tests Something related to our tests label Apr 21, 2025
@psobolewskiPhD psobolewskiPhD added enhancement maintenance PR with maintance changes, labels Apr 21, 2025
Copy link
codecov bot commented Apr 22, 2025

Codecov Report

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

Project coverage is 92.95%. Comparing base (f71b773) to head (e72b79e).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
napari/utils/info.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7844      +/-   ##
==========================================
- Coverage   92.98%   92.95%   -0.03%     
==========================================
  Files         635      635              
  Lines       59857    59878      +21     
==========================================
+ Hits        55656    55662       +6     
- Misses       4201     4216      +15     

☔ 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 problems.

Copy link
Collaborator
@Czaki Czaki 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

@jni jni added this to the 0.6.0 milestone Apr 22, 2025
@Czaki Czaki added the ready to merge Last chance for comments! Will be merged in ~24h label Apr 22, 2025
Copy link
Contributor
@TimMonko TimMonko left a comment

Choose a reason for hiding this comment

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

Looks great! Wonderful addition that should help support users

@jni jni merged commit 67cba0e into napari:main Apr 23, 2025
44 checks passed
@github-actions github-actions bot removed the ready to merge Last chance for comments! Will be merged in ~24h label Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance PR with maintance changes, tests Something related to our tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0