napari-plugin-manager 0.1.3__tar.gz → 0.1.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. napari_plugin_manager-0.1.5/.github/workflows/test_and_deploy.yml +203 -0
  2. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/.gitignore +2 -0
  3. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/.pre-commit-config.yaml +5 -5
  4. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/PKG-INFO +41 -6
  5. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/README.md +32 -0
  6. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/docs/developers/contributing.md +4 -4
  7. napari_plugin_manager-0.1.5/images/direct-entry.png +0 -0
  8. napari_plugin_manager-0.1.5/images/import-export.png +0 -0
  9. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/pyproject.toml +60 -33
  10. napari_plugin_manager-0.1.5/src/napari_plugin_manager/_tests/test_base_installer_process.py +23 -0
  11. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5/src}/napari_plugin_manager/_tests/test_installer_process.py +70 -40
  12. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5/src}/napari_plugin_manager/_tests/test_npe2api.py +18 -10
  13. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5/src}/napari_plugin_manager/_tests/test_qt_plugin_dialog.py +214 -90
  14. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5/src}/napari_plugin_manager/_version.py +9 -4
  15. napari_plugin_manager-0.1.3/napari_plugin_manager/qt_package_installer.py → napari_plugin_manager-0.1.5/src/napari_plugin_manager/base_qt_package_installer.py +111 -82
  16. napari_plugin_manager-0.1.3/napari_plugin_manager/qt_plugin_dialog.py → napari_plugin_manager-0.1.5/src/napari_plugin_manager/base_qt_plugin_dialog.py +623 -304
  17. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5/src}/napari_plugin_manager/npe2api.py +1 -3
  18. napari_plugin_manager-0.1.5/src/napari_plugin_manager/qt_package_installer.py +84 -0
  19. napari_plugin_manager-0.1.5/src/napari_plugin_manager/qt_plugin_dialog.py +277 -0
  20. napari_plugin_manager-0.1.5/src/napari_plugin_manager/qt_warning_dialog.py +19 -0
  21. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5/src}/napari_plugin_manager/utils.py +1 -2
  22. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5/src}/napari_plugin_manager.egg-info/PKG-INFO +41 -6
  23. napari_plugin_manager-0.1.5/src/napari_plugin_manager.egg-info/SOURCES.txt +53 -0
  24. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5/src}/napari_plugin_manager.egg-info/requires.txt +3 -2
  25. napari_plugin_manager-0.1.5/tox.ini +57 -0
  26. napari_plugin_manager-0.1.3/.github/workflows/test_and_deploy.yml +0 -106
  27. napari_plugin_manager-0.1.3/napari_plugin_manager.egg-info/SOURCES.txt +0 -47
  28. napari_plugin_manager-0.1.3/tox.ini +0 -47
  29. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/.github/dependabot.yml +0 -0
  30. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/.github/workflows/deploy_docs.yml +0 -0
  31. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/LICENSE +0 -0
  32. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/Makefile +0 -0
  33. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/RELEASE.md +0 -0
  34. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/docs/__init__.py +0 -0
  35. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/docs/_static/custom.css +0 -0
  36. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/docs/_static/favicon/logo-noborder-180.png +0 -0
  37. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/docs/_static/favicon/logo-silhouette-192.png +0 -0
  38. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/docs/_static/favicon/logo-silhouette-dark-light.svg +0 -0
  39. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/docs/_templates/navbar-project.html +0 -0
  40. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/docs/_toc.yml +0 -0
  41. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/docs/conf.py +0 -0
  42. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/docs/index.md +0 -0
  43. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/images/description.png +0 -0
  44. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/images/filter.png +0 -0
  45. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/images/install.png +0 -0
  46. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/images/logo.png +0 -0
  47. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/images/status.png +0 -0
  48. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/images/uninstall.png +0 -0
  49. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/images/update.png +0 -0
  50. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5}/setup.cfg +0 -0
  51. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5/src}/napari_plugin_manager/__init__.py +0 -0
  52. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5/src}/napari_plugin_manager/_tests/__init__.py +0 -0
  53. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5/src}/napari_plugin_manager/_tests/conftest.py +0 -0
  54. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5/src}/napari_plugin_manager/_tests/test_utils.py +0 -0
  55. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5/src}/napari_plugin_manager/qt_widgets.py +0 -0
  56. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5/src}/napari_plugin_manager/styles.qss +0 -0
  57. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5/src}/napari_plugin_manager.egg-info/dependency_links.txt +0 -0
  58. {napari_plugin_manager-0.1.3 → napari_plugin_manager-0.1.5/src}/napari_plugin_manager.egg-info/top_level.txt +0 -0
@@ -0,0 +1,203 @@
1
+ # This workflow will upload a Python Package using Twine when a release is created
2
+ # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3
+
4
+ name: test and deploy
5
+
6
+ on:
7
+ push:
8
+ branches:
9
+ - main
10
+ tags:
11
+ - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
12
+ pull_request:
13
+ branches:
14
+ - main
15
+ workflow_dispatch:
16
+
17
+ concurrency:
18
+ # Concurrency group that uses the workflow name and PR number if available
19
+ # or commit SHA as a fallback. If a new build is triggered under that
20
+ # concurrency group while a previous build is running it will be canceled.
21
+ # Repeated pushes to a PR will cancel all previous builds, while multiple
22
+ # merges to main will not cancel.
23
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
24
+ cancel-in-progress: true
25
+
26
+ jobs:
27
+ test:
28
+ name: ${{ matrix.platform }}, py${{ matrix.python-version }}, napari ${{ matrix.napari }}, ${{ matrix.tool }}
29
+ runs-on: ${{ matrix.platform }}
30
+ strategy:
31
+ fail-fast: false
32
+ matrix:
33
+ platform: [ubuntu-latest, windows-latest, macos-13, macos-latest]
34
+ python-version: ["3.10", "3.11", "3.12"]
35
+ napari: ["latest", "repo"]
36
+ tool: ["pip", "conda"]
37
+ include:
38
+ # add 3.13 on ubuntu
39
+ - platform: ubuntu-latest
40
+ napari: repo
41
+ tool: pip
42
+ python-version: "3.13"
43
+ exclude:
44
+ # skip repo install on conda
45
+ - platform: ubuntu-latest
46
+ napari: repo
47
+ tool: conda
48
+ - platform: windows-latest
49
+ napari: repo
50
+ - platform: macos-13
51
+ napari: repo
52
+ - platform: macos-latest
53
+ napari: repo
54
+
55
+ steps:
56
+ - uses: actions/checkout@v4
57
+
58
+ - name: Set up Python ${{ matrix.python-version }} - pip
59
+ if: matrix.tool == 'pip'
60
+ uses: actions/setup-python@v5
61
+ with:
62
+ python-version: ${{ matrix.python-version }}
63
+
64
+ - name: Set up Python ${{ matrix.python-version }} - conda
65
+ if: matrix.tool == 'conda'
66
+ uses: conda-incubator/setup-miniconda@v3
67
+ with:
68
+ miniforge-version: latest
69
+ channels: conda-forge
70
+ conda-remove-defaults: "true"
71
+ python-version: ${{ matrix.python-version }}
72
+
73
+ - uses: tlambert03/setup-qt-libs@v1
74
+
75
+ # strategy borrowed from vispy for installing opengl libs on windows
76
+ - name: Install Windows OpenGL
77
+ if: runner.os == 'Windows'
78
+ run: |
79
+ git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git
80
+ powershell gl-ci-helpers/appveyor/install_opengl.ps1
81
+ if (Test-Path -Path "C:\Windows\system32\opengl32.dll" -PathType Leaf) {Exit 0} else {Exit 1}
82
+
83
+ - name: Install dependencies without tox-conda
84
+ if: matrix.tool == 'pip'
85
+ run: |
86
+ python -m pip install --upgrade pip
87
+ python -m pip install setuptools tox tox-gh-actions tox-uv
88
+
89
+ - name: Install dependencies including tox-conda
90
+ if: matrix.tool == 'conda'
91
+ shell: bash -el {0}
92
+ run: |
93
+ python -m pip install --upgrade pip
94
+ python -m pip install setuptools 'tox<4' tox-gh-actions tox-conda
95
+
96
+ - name: Test with tox - pip
97
+ if: matrix.tool == 'pip'
98
+ uses: aganders3/headless-gui@v2
99
+ with:
100
+ run: python -m tox
101
+ env:
102
+ PYVISTA_OFF_SCREEN: True # required for opengl on windows
103
+ NAPARI: ${{ matrix.napari }}
104
+ TOOL: ${{ matrix.tool }}
105
+ FORCE_COLOR: 1
106
+ # Only supported pyside6 is not supported on py312, py313
107
+ TOX_SKIP_ENV: ".*py31[23].*PySide6"
108
+
109
+ - name: Test with tox - conda
110
+ if: matrix.tool == 'conda'
111
+ uses: aganders3/headless-gui@v2
112
+ with:
113
+ shell: bash -el {0}
114
+ run: python -m tox
115
+ env:
116
+ PYVISTA_OFF_SCREEN: True # required for opengl on windows
117
+ NAPARI: ${{ matrix.napari }}
118
+ TOOL: ${{ matrix.tool }}
119
+ FORCE_COLOR: 1
120
+ # Only supported pyside2 and pyside6 are not supported on py312, py313
121
+ # no Qt backends supported by conda-forge on py313
122
+ TOX_SKIP_ENV: ".*py31[23].*PySide[26]|.*py313.*conda"
123
+
124
+
125
+ - name: Upload coverage data
126
+ uses: actions/upload-artifact@v4
127
+ with:
128
+ name: coverage reports ${{ matrix.platform }} py ${{ matrix.python-version }} ${{ matrix.tool }} ${{ matrix.napari }}
129
+ include-hidden-files: true
130
+ path: |
131
+ ./.coverage.*
132
+
133
+
134
+ upload_coverage:
135
+ permissions:
136
+ id-token: write # Required for OIDC authentication
137
+ contents: read # Required for code checkout
138
+ name: Upload coverage
139
+ needs: [test]
140
+ if: always()
141
+ runs-on: ubuntu-latest
142
+ steps:
143
+ - uses: actions/checkout@v4
144
+
145
+ - uses: actions/setup-python@v5
146
+ with:
147
+ python-version: "3.x"
148
+ cache-dependency-path: pyproject.toml
149
+ cache: 'pip'
150
+
151
+ - name: Install Dependencies
152
+ run: |
153
+ pip install --upgrade pip
154
+ pip install codecov
155
+
156
+ - name: Download coverage data
157
+ uses: actions/download-artifact@v4
158
+ with:
159
+ pattern: coverage reports*
160
+ path: coverage
161
+ merge-multiple: true
162
+
163
+
164
+ - name: combine coverage data
165
+ run: |
166
+ python -Im coverage combine coverage
167
+ python -Im coverage xml -o coverage.xml
168
+
169
+ # Report and write to summary.
170
+ python -Im coverage report --format=markdown --skip-empty --skip-covered >> "$GITHUB_STEP_SUMMARY"
171
+
172
+ - name: Upload coverage data
173
+ uses: codecov/codecov-action@v5
174
+ with:
175
+ fail_ci_if_error: true
176
+ use_oidc: true
177
+
178
+
179
+ deploy:
180
+ # this will run when you have tagged a commit, starting with "v*"
181
+ # and requires that you have put your twine API key in your
182
+ # github secrets (see readme for details)
183
+ needs: [test]
184
+ runs-on: ubuntu-latest
185
+ if: contains(github.ref, 'tags')
186
+ permissions:
187
+ id-token: write
188
+ steps:
189
+ - uses: actions/checkout@v4
190
+ - name: Set up Python
191
+ uses: actions/setup-python@v5
192
+ with:
193
+ python-version: "3.x"
194
+ - name: Install dependencies
195
+ run: |
196
+ python -m pip install --upgrade pip
197
+ pip install -U setuptools build
198
+ - name: Build
199
+ run: |
200
+ git tag
201
+ python -m build
202
+ - name: Publish package distributions to PyPI
203
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -24,6 +24,8 @@ var/
24
24
  .installed.cfg
25
25
  *.egg
26
26
 
27
+ src/napari_plugin_manager/_version.py
28
+
27
29
  # PyInstaller
28
30
  # Usually these files are written by a python script from a template
29
31
  # before PyInstaller builds the exe, so as to inject date/other infos into it.
@@ -4,25 +4,25 @@ repos:
4
4
  hooks:
5
5
  - id: absolufy-imports
6
6
  - repo: https://github.com/hadialqattan/pycln
7
- rev: v2.4.0
7
+ rev: v2.5.0
8
8
  hooks:
9
9
  - id: pycln
10
10
  - repo: https://github.com/psf/black-pre-commit-mirror
11
- rev: 24.8.0
11
+ rev: 25.1.0
12
12
  hooks:
13
13
  - id: black
14
14
  pass_filenames: true
15
15
  - repo: https://github.com/astral-sh/ruff-pre-commit
16
- rev: v0.6.3
16
+ rev: v0.9.9
17
17
  hooks:
18
18
  - id: ruff
19
19
  - repo: https://github.com/seddonym/import-linter
20
- rev: v2.0
20
+ rev: v2.2
21
21
  hooks:
22
22
  - id: import-linter
23
23
  stages: [manual]
24
24
  - repo: https://github.com/python-jsonschema/check-jsonschema
25
- rev: 0.29.2
25
+ rev: 0.31.2
26
26
  hooks:
27
27
  - id: check-github-workflows
28
28
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: napari-plugin-manager
3
- Version: 0.1.3
3
+ Version: 0.1.5
4
4
  Summary: Install plugins for napari, in napari.
5
5
  Author-email: napari team <napari-steering-council@googlegroups.com>
6
6
  License: BSD 3-Clause License
@@ -43,9 +43,10 @@ Classifier: License :: OSI Approved :: BSD License
43
43
  Classifier: Programming Language :: C
44
44
  Classifier: Programming Language :: Python
45
45
  Classifier: Programming Language :: Python :: 3 :: Only
46
- Classifier: Programming Language :: Python :: 3.9
47
46
  Classifier: Programming Language :: Python :: 3.10
48
47
  Classifier: Programming Language :: Python :: 3.11
48
+ Classifier: Programming Language :: Python :: 3.12
49
+ Classifier: Programming Language :: Python :: 3.13
49
50
  Classifier: Topic :: Scientific/Engineering
50
51
  Classifier: Topic :: Scientific/Engineering :: Visualization
51
52
  Classifier: Topic :: Scientific/Engineering :: Information Analysis
@@ -55,20 +56,21 @@ Classifier: Operating System :: Microsoft :: Windows
55
56
  Classifier: Operating System :: POSIX
56
57
  Classifier: Operating System :: Unix
57
58
  Classifier: Operating System :: MacOS
58
- Requires-Python: >=3.8
59
+ Requires-Python: >=3.10
59
60
  Description-Content-Type: text/markdown
60
61
  License-File: LICENSE
61
62
  Requires-Dist: npe2
62
63
  Requires-Dist: qtpy
63
64
  Requires-Dist: superqt
64
65
  Requires-Dist: pip
66
+ Requires-Dist: packaging
65
67
  Provides-Extra: dev
66
- Requires-Dist: PyQt5; extra == "dev"
68
+ Requires-Dist: PyQt6; extra == "dev"
67
69
  Requires-Dist: pre-commit; extra == "dev"
68
70
  Provides-Extra: testing
71
+ Requires-Dist: coverage; extra == "testing"
69
72
  Requires-Dist: flaky; extra == "testing"
70
73
  Requires-Dist: pytest; extra == "testing"
71
- Requires-Dist: pytest-cov; extra == "testing"
72
74
  Requires-Dist: pytest-qt; extra == "testing"
73
75
  Requires-Dist: virtualenv; extra == "testing"
74
76
  Provides-Extra: docs
@@ -79,6 +81,7 @@ Requires-Dist: sphinx-copybutton; extra == "docs"
79
81
  Requires-Dist: sphinx-favicon; extra == "docs"
80
82
  Requires-Dist: myst-nb; extra == "docs"
81
83
  Requires-Dist: napari-sphinx-theme>=0.3.0; extra == "docs"
84
+ Dynamic: license-file
82
85
 
83
86
  # napari-plugin-manager
84
87
 
@@ -186,6 +189,20 @@ a restart to be properly configured.
186
189
 
187
190
  ![Screenshot of the napari-plugin-manager showing the process of installing a plugin](https://raw.githubusercontent.com/napari/napari-plugin-manager/main/images/install.png)
188
191
 
192
+ ### Installing a plugin via direct entry
193
+
194
+ You can also install a napari plugin or any other package via the direct entry option. The following steps
195
+ correspond to the options and buttons located at the **bottom of the dialog**.
196
+
197
+ 1. You can type either the name of the package, a url to the resource or drag and drop a compressed file
198
+ of a previously downloaded package.
199
+ 2. Select the tool (`conda` or `pip`) by clicking on the arrow dorpdown of the `Install` button.
200
+ 3. Start the installation process by clicking on the `Install` button.
201
+
202
+ You can cancel the process at any time by clicking the `Cancel all` button.
203
+
204
+ ![Screenshot of the napari-plugin-manager showing the direct entry options](https://raw.githubusercontent.com/napari/napari-plugin-manager/main/images/direct-entry.png)
205
+
189
206
  ### Uninstalling a plugin
190
207
 
191
208
  To uninstall a plugin:
@@ -215,6 +232,24 @@ You can cancel the process at any time by clicking the `Cancel` button of each p
215
232
 
216
233
  ![Screenshot of the napari-plugin-manager showing the process of updating a plugin](https://raw.githubusercontent.com/napari/napari-plugin-manager/main/images/update.png)
217
234
 
235
+ ### Export/Import plugins
236
+
237
+ You can export the list of install plugins by clicking on the `Export` button located on the top right
238
+ corner of the UI. This will prompt a dialog to select the location and name of the text file where
239
+ the installed plugin list will be saved.
240
+
241
+ The file is plain text and plugins are listed in the [requirements.txt](https://pip.pypa.io/en/stable/reference/requirements-file-format/) format:
242
+ ```
243
+ plugin_name==0.1.2
244
+ ```
245
+
246
+ This file can be shared and then imported by clicking on the `Import` button located on the top right
247
+ corner of the UI. This will prompt a dialog to select the location of the text file to import.
248
+
249
+ After selecting the file, the plugin manager will attempt to install all the listed plugins using the auto-detected default installer.
250
+
251
+ ![Screenshot of the napari-plugin-manager showing the process of import/export](https://raw.githubusercontent.com/napari/napari-plugin-manager/main/images/import-export.png)
252
+
218
253
  ### Batch actions
219
254
 
220
255
  You don't need wait for one action to finish before you can start another one. You can add more
@@ -104,6 +104,20 @@ a restart to be properly configured.
104
104
 
105
105
  ![Screenshot of the napari-plugin-manager showing the process of installing a plugin](https://raw.githubusercontent.com/napari/napari-plugin-manager/main/images/install.png)
106
106
 
107
+ ### Installing a plugin via direct entry
108
+
109
+ You can also install a napari plugin or any other package via the direct entry option. The following steps
110
+ correspond to the options and buttons located at the **bottom of the dialog**.
111
+
112
+ 1. You can type either the name of the package, a url to the resource or drag and drop a compressed file
113
+ of a previously downloaded package.
114
+ 2. Select the tool (`conda` or `pip`) by clicking on the arrow dorpdown of the `Install` button.
115
+ 3. Start the installation process by clicking on the `Install` button.
116
+
117
+ You can cancel the process at any time by clicking the `Cancel all` button.
118
+
119
+ ![Screenshot of the napari-plugin-manager showing the direct entry options](https://raw.githubusercontent.com/napari/napari-plugin-manager/main/images/direct-entry.png)
120
+
107
121
  ### Uninstalling a plugin
108
122
 
109
123
  To uninstall a plugin:
@@ -133,6 +147,24 @@ You can cancel the process at any time by clicking the `Cancel` button of each p
133
147
 
134
148
  ![Screenshot of the napari-plugin-manager showing the process of updating a plugin](https://raw.githubusercontent.com/napari/napari-plugin-manager/main/images/update.png)
135
149
 
150
+ ### Export/Import plugins
151
+
152
+ You can export the list of install plugins by clicking on the `Export` button located on the top right
153
+ corner of the UI. This will prompt a dialog to select the location and name of the text file where
154
+ the installed plugin list will be saved.
155
+
156
+ The file is plain text and plugins are listed in the [requirements.txt](https://pip.pypa.io/en/stable/reference/requirements-file-format/) format:
157
+ ```
158
+ plugin_name==0.1.2
159
+ ```
160
+
161
+ This file can be shared and then imported by clicking on the `Import` button located on the top right
162
+ corner of the UI. This will prompt a dialog to select the location of the text file to import.
163
+
164
+ After selecting the file, the plugin manager will attempt to install all the listed plugins using the auto-detected default installer.
165
+
166
+ ![Screenshot of the napari-plugin-manager showing the process of import/export](https://raw.githubusercontent.com/napari/napari-plugin-manager/main/images/import-export.png)
167
+
136
168
  ### Batch actions
137
169
 
138
170
  You don't need wait for one action to finish before you can start another one. You can add more
@@ -17,7 +17,7 @@ git clone https://github.com/your-username/napari-plugin-manager.git
17
17
  cd napari-plugin-manager
18
18
  ```
19
19
 
20
- Set the `upstream` remote to the base `napari` repository:
20
+ Set the `upstream` remote to the base `napari-plugin-manager` repository:
21
21
  ```sh
22
22
  git remote add upstream https://github.com/napari/napari-plugin-manager.git
23
23
  ```
@@ -39,9 +39,9 @@ in your environment as follows:
39
39
  pre-commit install
40
40
  ```
41
41
 
42
- Upon committing, your code will be formatted and linted according to our [`ruff`
43
- configuration](https://github.com/napari/napari-plugin-manager/blob/main/pyproject.toml). To learn
44
- more, see [`ruff`'s documentation](https://docs.astral.sh/ruff/).
42
+ Upon committing, your code will be formatted and linted according to our
43
+ [`ruff` configuration](https://github.com/napari/napari-plugin-manager/blob/main/pyproject.toml).
44
+ To learn more, see [`ruff`'s documentation](https://docs.astral.sh/ruff/).
45
45
 
46
46
  You can also execute `pre-commit` at any moment by running the following:
47
47
 
@@ -7,10 +7,10 @@ requires = [
7
7
  build-backend = "setuptools.build_meta"
8
8
 
9
9
  [tool.setuptools_scm]
10
- write_to = "napari_plugin_manager/_version.py"
10
+ write_to = "src/napari_plugin_manager/_version.py"
11
11
 
12
12
  [tool.setuptools.packages.find]
13
- where = ["."]
13
+ where = ["src"]
14
14
  include = ["napari_plugin_manager"]
15
15
  exclude = []
16
16
  namespaces = false
@@ -33,9 +33,10 @@ classifiers = [
33
33
  "Programming Language :: C",
34
34
  "Programming Language :: Python",
35
35
  "Programming Language :: Python :: 3 :: Only",
36
- "Programming Language :: Python :: 3.9",
37
36
  "Programming Language :: Python :: 3.10",
38
37
  "Programming Language :: Python :: 3.11",
38
+ "Programming Language :: Python :: 3.12",
39
+ "Programming Language :: Python :: 3.13",
39
40
  "Topic :: Scientific/Engineering",
40
41
  "Topic :: Scientific/Engineering :: Visualization",
41
42
  "Topic :: Scientific/Engineering :: Information Analysis",
@@ -46,12 +47,13 @@ classifiers = [
46
47
  "Operating System :: Unix",
47
48
  "Operating System :: MacOS"
48
49
  ]
49
- requires-python = ">=3.8"
50
+ requires-python = ">=3.10"
50
51
  dependencies = [
51
52
  "npe2",
52
53
  "qtpy",
53
54
  "superqt",
54
- "pip"
55
+ "pip",
56
+ "packaging",
55
57
  ]
56
58
  dynamic = [
57
59
  "version"
@@ -59,14 +61,14 @@ dynamic = [
59
61
 
60
62
  [project.optional-dependencies]
61
63
  dev = [
62
- "PyQt5",
64
+ "PyQt6",
63
65
  "pre-commit",
64
66
  ]
65
67
 
66
68
  testing = [
69
+ "coverage",
67
70
  "flaky",
68
71
  "pytest",
69
- "pytest-cov",
70
72
  "pytest-qt",
71
73
  "virtualenv"
72
74
  ]
@@ -85,7 +87,7 @@ docs = [
85
87
  homepage = "https://github.com/napari/napari-plugin-manager"
86
88
 
87
89
  [tool.black]
88
- target-version = ['py39', 'py310', 'py311']
90
+ target-version = ['py310', 'py311', 'py312', 'py313']
89
91
  skip-string-normalization = true
90
92
  line-length = 79
91
93
 
@@ -98,6 +100,33 @@ ignore = [
98
100
 
99
101
  [tool.ruff]
100
102
  line-length = 79
103
+
104
+ exclude = [
105
+ ".bzr",
106
+ ".direnv",
107
+ ".eggs",
108
+ ".git",
109
+ ".mypy_cache",
110
+ ".pants.d",
111
+ ".ruff_cache",
112
+ ".svn",
113
+ ".tox",
114
+ ".venv",
115
+ "__pypackages__",
116
+ "_build",
117
+ "buck-out",
118
+ "build",
119
+ "dist",
120
+ "node_modules",
121
+ "venv",
122
+ "*vendored*",
123
+ "*_vendor*",
124
+ ]
125
+
126
+ target-version = "py310"
127
+ fix = true
128
+
129
+ [tool.ruff.lint]
101
130
  select = [
102
131
  "E", "F", "W", #flake8
103
132
  "UP", # pyupgrade
@@ -121,6 +150,7 @@ select = [
121
150
  "ICN", # flake8-import-conventions
122
151
  "RUF", # ruff specyfic rules
123
152
  ]
153
+
124
154
  ignore = [
125
155
  "E501", "UP006", "TCH001", "TCH002", "TCH003",
126
156
  "A003", # flake8-builtins - we have class attributes violating these rule
@@ -133,31 +163,6 @@ ignore = [
133
163
 
134
164
  ]
135
165
 
136
- exclude = [
137
- ".bzr",
138
- ".direnv",
139
- ".eggs",
140
- ".git",
141
- ".mypy_cache",
142
- ".pants.d",
143
- ".ruff_cache",
144
- ".svn",
145
- ".tox",
146
- ".venv",
147
- "__pypackages__",
148
- "_build",
149
- "buck-out",
150
- "build",
151
- "dist",
152
- "node_modules",
153
- "venv",
154
- "*vendored*",
155
- "*_vendor*",
156
- ]
157
-
158
- target-version = "py38"
159
- fix = true
160
-
161
166
  [tool.ruff.per-file-ignores]
162
167
  "**/_tests/*.py" = ["B011", "INP001", "TRY301"]
163
168
 
@@ -208,3 +213,25 @@ check_untyped_defs = true
208
213
  # disallow_any_generics = true
209
214
  # no_implicit_reexport = true
210
215
  # disallow_untyped_defs = true
216
+
217
+
218
+ [tool.coverage.run]
219
+ omit = [
220
+ "src/napari_plugin_manager/_version.py",
221
+ ]
222
+ source = ["src"]
223
+ relative_files = true
224
+
225
+
226
+ [tool.coverage.report]
227
+ exclude_also = [
228
+ "raise NotImplementedError",
229
+ ]
230
+
231
+
232
+ [tool.coverage.paths]
233
+ source = [
234
+ "src/",
235
+ "*/src/",
236
+ "*\\src\\",
237
+ ]
@@ -0,0 +1,23 @@
1
+ import pytest
2
+
3
+ from napari_plugin_manager.base_qt_package_installer import (
4
+ AbstractInstallerTool,
5
+ )
6
+
7
+
8
+ def test_not_implemented_methods():
9
+ tool = AbstractInstallerTool('install', ['requests'])
10
+ with pytest.raises(NotImplementedError):
11
+ tool.executable()
12
+
13
+ with pytest.raises(NotImplementedError):
14
+ tool.arguments()
15
+
16
+ with pytest.raises(NotImplementedError):
17
+ tool.environment()
18
+
19
+ with pytest.raises(NotImplementedError):
20
+ tool.constraints()
21
+
22
+ with pytest.raises(NotImplementedError):
23
+ tool.available()