napari-plugin-manager 0.1.4__tar.gz → 0.1.5rc0__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 (57) hide show
  1. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/.github/workflows/test_and_deploy.yml +85 -19
  2. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/.gitignore +2 -0
  3. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/.pre-commit-config.yaml +5 -5
  4. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/PKG-INFO +26 -6
  5. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/README.md +18 -0
  6. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/docs/developers/contributing.md +4 -4
  7. napari_plugin_manager-0.1.5rc0/images/import-export.png +0 -0
  8. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/pyproject.toml +53 -32
  9. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager/_tests/test_installer_process.py +1 -1
  10. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager/_tests/test_npe2api.py +17 -9
  11. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager/_tests/test_qt_plugin_dialog.py +107 -49
  12. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager/_version.py +9 -4
  13. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager/base_qt_package_installer.py +97 -37
  14. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager/base_qt_plugin_dialog.py +72 -20
  15. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager/npe2api.py +1 -2
  16. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager/qt_package_installer.py +3 -3
  17. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager/qt_plugin_dialog.py +32 -52
  18. napari_plugin_manager-0.1.5rc0/src/napari_plugin_manager/qt_warning_dialog.py +19 -0
  19. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager/utils.py +1 -2
  20. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager.egg-info/PKG-INFO +26 -6
  21. napari_plugin_manager-0.1.5rc0/src/napari_plugin_manager.egg-info/SOURCES.txt +53 -0
  22. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager.egg-info/requires.txt +2 -2
  23. napari_plugin_manager-0.1.5rc0/tox.ini +54 -0
  24. napari_plugin_manager-0.1.4/napari_plugin_manager.egg-info/SOURCES.txt +0 -51
  25. napari_plugin_manager-0.1.4/tox.ini +0 -47
  26. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/.github/dependabot.yml +0 -0
  27. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/.github/workflows/deploy_docs.yml +0 -0
  28. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/LICENSE +0 -0
  29. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/Makefile +0 -0
  30. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/RELEASE.md +0 -0
  31. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/docs/__init__.py +0 -0
  32. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/docs/_static/custom.css +0 -0
  33. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/docs/_static/favicon/logo-noborder-180.png +0 -0
  34. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/docs/_static/favicon/logo-silhouette-192.png +0 -0
  35. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/docs/_static/favicon/logo-silhouette-dark-light.svg +0 -0
  36. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/docs/_templates/navbar-project.html +0 -0
  37. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/docs/_toc.yml +0 -0
  38. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/docs/conf.py +0 -0
  39. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/docs/index.md +0 -0
  40. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/images/description.png +0 -0
  41. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/images/direct-entry.png +0 -0
  42. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/images/filter.png +0 -0
  43. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/images/install.png +0 -0
  44. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/images/logo.png +0 -0
  45. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/images/status.png +0 -0
  46. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/images/uninstall.png +0 -0
  47. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/images/update.png +0 -0
  48. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0}/setup.cfg +0 -0
  49. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager/__init__.py +0 -0
  50. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager/_tests/__init__.py +0 -0
  51. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager/_tests/conftest.py +0 -0
  52. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager/_tests/test_base_installer_process.py +0 -0
  53. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager/_tests/test_utils.py +0 -0
  54. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager/qt_widgets.py +0 -0
  55. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager/styles.qss +0 -0
  56. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager.egg-info/dependency_links.txt +0 -0
  57. {napari_plugin_manager-0.1.4 → napari_plugin_manager-0.1.5rc0/src}/napari_plugin_manager.egg-info/top_level.txt +0 -0
@@ -30,16 +30,27 @@ jobs:
30
30
  strategy:
31
31
  fail-fast: false
32
32
  matrix:
33
- platform: [ubuntu-latest, windows-latest, macos-13]
34
- python-version: ["3.9", "3.10", "3.11"]
33
+ platform: [ubuntu-latest, windows-latest, macos-13, macos-latest]
34
+ python-version: ["3.10", "3.11", "3.12"]
35
35
  napari: ["latest", "repo"]
36
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"
37
43
  exclude:
38
- # TODO: Remove when we have a napari release with the plugin manager changes
39
- - napari: "latest"
40
- # TODO: PyQt / PySide wheels missing
41
- - python-version: "3.11"
42
- platform: "windows-latest"
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
43
54
 
44
55
  steps:
45
56
  - uses: actions/checkout@v4
@@ -55,6 +66,8 @@ jobs:
55
66
  uses: conda-incubator/setup-miniconda@v3
56
67
  with:
57
68
  miniforge-version: latest
69
+ channels: conda-forge
70
+ conda-remove-defaults: "true"
58
71
  python-version: ${{ matrix.python-version }}
59
72
 
60
73
  - uses: tlambert03/setup-qt-libs@v1
@@ -71,7 +84,7 @@ jobs:
71
84
  if: matrix.tool == 'pip'
72
85
  run: |
73
86
  python -m pip install --upgrade pip
74
- python -m pip install setuptools tox tox-gh-actions
87
+ python -m pip install setuptools tox tox-gh-actions tox-uv
75
88
 
76
89
  - name: Install dependencies including tox-conda
77
90
  if: matrix.tool == 'conda'
@@ -84,31 +97,84 @@ jobs:
84
97
  if: matrix.tool == 'pip'
85
98
  uses: aganders3/headless-gui@v2
86
99
  with:
87
- run: python -m tox -vv
100
+ run: python -m tox
88
101
  env:
89
102
  PYVISTA_OFF_SCREEN: True # required for opengl on windows
90
103
  NAPARI: ${{ matrix.napari }}
104
+ TOOL: ${{ matrix.tool }}
91
105
  FORCE_COLOR: 1
92
- # PySide6 only functional with Python 3.10+
93
- TOX_SKIP_ENV: ".*py39-PySide6.*"
94
-
106
+ # Only supported pyside6 is not supported on py312, py313
107
+ TOX_SKIP_ENV: ".*py31[23].*PySide6"
108
+
95
109
  - name: Test with tox - conda
96
110
  if: matrix.tool == 'conda'
97
111
  uses: aganders3/headless-gui@v2
98
112
  with:
99
113
  shell: bash -el {0}
100
- run: python -m tox -vv
114
+ run: python -m tox
101
115
  env:
102
116
  PYVISTA_OFF_SCREEN: True # required for opengl on windows
103
117
  NAPARI: ${{ matrix.napari }}
118
+ TOOL: ${{ matrix.tool }}
104
119
  FORCE_COLOR: 1
105
- # PySide6 only functional with Python 3.10+
106
- TOX_SKIP_ENV: ".*py39-PySide6.*"
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
107
177
 
108
- - name: Coverage
109
- uses: codecov/codecov-action@v4
110
- env:
111
- CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
112
178
 
113
179
  deploy:
114
180
  # this will run when you have tagged a commit, starting with "v*"
@@ -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.10.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.8.1
16
+ rev: v0.9.9
17
17
  hooks:
18
18
  - id: ruff
19
19
  - repo: https://github.com/seddonym/import-linter
20
- rev: v2.1
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.30.0
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.4
3
+ Version: 0.1.5rc0
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,7 +56,7 @@ 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
@@ -64,12 +65,12 @@ Requires-Dist: superqt
64
65
  Requires-Dist: pip
65
66
  Requires-Dist: packaging
66
67
  Provides-Extra: dev
67
- Requires-Dist: PyQt5; extra == "dev"
68
+ Requires-Dist: PyQt6; extra == "dev"
68
69
  Requires-Dist: pre-commit; extra == "dev"
69
70
  Provides-Extra: testing
71
+ Requires-Dist: coverage; extra == "testing"
70
72
  Requires-Dist: flaky; extra == "testing"
71
73
  Requires-Dist: pytest; extra == "testing"
72
- Requires-Dist: pytest-cov; extra == "testing"
73
74
  Requires-Dist: pytest-qt; extra == "testing"
74
75
  Requires-Dist: virtualenv; extra == "testing"
75
76
  Provides-Extra: docs
@@ -80,6 +81,7 @@ Requires-Dist: sphinx-copybutton; extra == "docs"
80
81
  Requires-Dist: sphinx-favicon; extra == "docs"
81
82
  Requires-Dist: myst-nb; extra == "docs"
82
83
  Requires-Dist: napari-sphinx-theme>=0.3.0; extra == "docs"
84
+ Dynamic: license-file
83
85
 
84
86
  # napari-plugin-manager
85
87
 
@@ -230,6 +232,24 @@ You can cancel the process at any time by clicking the `Cancel` button of each p
230
232
 
231
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)
232
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
+
233
253
  ### Batch actions
234
254
 
235
255
  You don't need wait for one action to finish before you can start another one. You can add more
@@ -147,6 +147,24 @@ You can cancel the process at any time by clicking the `Cancel` button of each p
147
147
 
148
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)
149
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
+
150
168
  ### Batch actions
151
169
 
152
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,7 +47,7 @@ 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",
@@ -60,14 +61,14 @@ dynamic = [
60
61
 
61
62
  [project.optional-dependencies]
62
63
  dev = [
63
- "PyQt5",
64
+ "PyQt6",
64
65
  "pre-commit",
65
66
  ]
66
67
 
67
68
  testing = [
69
+ "coverage",
68
70
  "flaky",
69
71
  "pytest",
70
- "pytest-cov",
71
72
  "pytest-qt",
72
73
  "virtualenv"
73
74
  ]
@@ -86,7 +87,7 @@ docs = [
86
87
  homepage = "https://github.com/napari/napari-plugin-manager"
87
88
 
88
89
  [tool.black]
89
- target-version = ['py39', 'py310', 'py311']
90
+ target-version = ['py310', 'py311', 'py312', 'py313']
90
91
  skip-string-normalization = true
91
92
  line-length = 79
92
93
 
@@ -99,6 +100,33 @@ ignore = [
99
100
 
100
101
  [tool.ruff]
101
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]
102
130
  select = [
103
131
  "E", "F", "W", #flake8
104
132
  "UP", # pyupgrade
@@ -122,6 +150,7 @@ select = [
122
150
  "ICN", # flake8-import-conventions
123
151
  "RUF", # ruff specyfic rules
124
152
  ]
153
+
125
154
  ignore = [
126
155
  "E501", "UP006", "TCH001", "TCH002", "TCH003",
127
156
  "A003", # flake8-builtins - we have class attributes violating these rule
@@ -134,31 +163,6 @@ ignore = [
134
163
 
135
164
  ]
136
165
 
137
- exclude = [
138
- ".bzr",
139
- ".direnv",
140
- ".eggs",
141
- ".git",
142
- ".mypy_cache",
143
- ".pants.d",
144
- ".ruff_cache",
145
- ".svn",
146
- ".tox",
147
- ".venv",
148
- "__pypackages__",
149
- "_build",
150
- "buck-out",
151
- "build",
152
- "dist",
153
- "node_modules",
154
- "venv",
155
- "*vendored*",
156
- "*_vendor*",
157
- ]
158
-
159
- target-version = "py38"
160
- fix = true
161
-
162
166
  [tool.ruff.per-file-ignores]
163
167
  "**/_tests/*.py" = ["B011", "INP001", "TRY301"]
164
168
 
@@ -210,7 +214,24 @@ check_untyped_defs = true
210
214
  # no_implicit_reexport = true
211
215
  # disallow_untyped_defs = true
212
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
+
213
226
  [tool.coverage.report]
214
227
  exclude_also = [
215
228
  "raise NotImplementedError",
216
229
  ]
230
+
231
+
232
+ [tool.coverage.paths]
233
+ source = [
234
+ "src/",
235
+ "*/src/",
236
+ "*\\src\\",
237
+ ]
@@ -346,7 +346,7 @@ def test_constraints_are_in_sync():
346
346
 
347
347
  name_re = re.compile(r"([a-z0-9_\-]+).*")
348
348
  for conda_constraint, pip_constraint in zip(
349
- conda_constraints, pip_constraints
349
+ conda_constraints, pip_constraints, strict=False
350
350
  ):
351
351
  conda_name = name_re.match(conda_constraint).group(1)
352
352
  pip_name = name_re.match(pip_constraint).group(1)
@@ -1,3 +1,5 @@
1
+ from urllib.error import HTTPError, URLError
2
+
1
3
  from flaky import flaky
2
4
 
3
5
  from napari_plugin_manager.npe2api import (
@@ -26,20 +28,26 @@ def test_plugin_summaries():
26
28
  "pypi_versions",
27
29
  "conda_versions",
28
30
  ]
29
- data = plugin_summaries()
30
- test_data = dict(data[0])
31
- for key in keys:
32
- assert key in test_data
33
- test_data.pop(key)
31
+ try:
32
+ data = plugin_summaries()
33
+ test_data = dict(data[0])
34
+ for key in keys:
35
+ assert key in test_data
36
+ test_data.pop(key)
34
37
 
35
- assert not test_data
38
+ assert not test_data
39
+ except (HTTPError, URLError):
40
+ pass
36
41
 
37
42
 
38
43
  def test_conda_map():
39
44
  pkgs = ["napari-svg"]
40
- data = conda_map()
41
- for pkg in pkgs:
42
- assert pkg in data
45
+ try:
46
+ data = conda_map()
47
+ for pkg in pkgs:
48
+ assert pkg in data
49
+ except (HTTPError, URLError):
50
+ pass
43
51
 
44
52
 
45
53
  def test_iter_napari_plugin_info():