forked from napari/napari
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
827 lines (771 loc) · 24.4 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
[build-system]
requires = [
"setuptools >= 69",
"setuptools_scm[toml]>=8"
]
build-backend = "setuptools.build_meta"
[project]
name = "napari"
description = "n-dimensional array viewer in Python"
authors = [
{ name = "napari team", email = "napari-steering-council@googlegroups.com" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: X11 Applications :: Qt",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Programming Language :: C",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Utilities",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
]
requires-python = ">=3.9"
dependencies = [
"appdirs>=1.4.4",
"app-model>=0.3.0,<0.4.0",
"cachey>=0.2.1",
"certifi>=2018.1.18",
"dask[array]>=2021.10.0",
"imageio>=2.20,!=2.22.1",
"jsonschema>=3.2.0",
"lazy_loader>=0.2",
"magicgui>=0.7.0",
"napari-console>=0.1.1",
"napari-plugin-engine>=0.1.9",
"napari-svg>=0.1.8",
"npe2>=0.7.6",
"numpy>=1.22.2 ; python_version >= '3.10'",
"numpy >=1.22.2, <2 ; python_version < '3.10'",
"numpydoc>=0.9.2",
"pandas>=1.3.0",
"Pillow>=9.0",
"pint>=0.17",
"psutil>=5.0",
"psygnal>=0.5.0",
"pydantic>=1.9.0",
"pygments>=2.6.0",
"PyOpenGL>=3.1.0",
"pywin32 ; platform_system == 'Windows'",
"PyYAML>=5.1",
"qtpy>=1.10.0",
"scikit-image[data]>=0.19.1",
"scipy>=1.5.4",
"superqt>=0.6.7",
"tifffile>=2022.4.8",
"toolz>=0.10.0",
"tqdm>=4.56.0",
"typing_extensions>=4.2.0",
"vispy>=0.14.1,<0.15",
"wrapt>=1.11.1",
]
dynamic = [
"version",
]
[project.license]
text = "BSD 3-Clause"
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.urls]
Homepage = "https://napari.org"
Download = "https://github.com/napari/napari"
"Bug Tracker" = "https://github.com/napari/napari/issues"
Documentation = "https://napari.org"
"Source Code" = "https://github.com/napari/napari"
[project.optional-dependencies]
pyside2 = [
"PySide2>=5.13.2,!=5.15.0 ; python_version < '3.11' and platform_machine != 'arm64'",
]
pyside6_experimental = [
"PySide6 < 6.5 ; python_version < '3.12'"
]
pyqt6 = [
"PyQt6 > 6.5",
"PyQt6 != 6.6.1 ; platform_system == 'Darwin'"
]
pyside = [
"napari[pyside2]"
]
pyqt5 = [
"PyQt5>=5.13.2,!=5.15.0",
]
pyqt = [
"napari[pyqt5]"
]
qt = [
"napari[pyqt]"
]
all = [
"napari[pyqt,optional]",
"napari-plugin-manager >=0.1.3, <0.2.0",
]
optional = [
"triangle ; platform_machine != 'arm64'",
"numba>=0.57.1",
"zarr>=2.12.0", # needed by `builtins` (dask.array.from_zarr) to open zarr
]
testing = [
"babel>=2.9.0",
"fsspec>=2023.10.0",
"hypothesis>=6.8.0",
"lxml[html_clean]>5",
"matplotlib >= 3.6.1",
"numba>=0.57.1",
"pooch>=1.6.0",
"coverage>7",
"docstring_parser>=0.15",
"pretend>=1.0.9",
"pyautogui>=0.9.54",
"pytest-qt>=4.3.1",
"pytest-pretty>=1.1.0",
"pytest>=8.1.0",
"tensorstore>=0.1.13",
"virtualenv>=20.17",
"xarray>=0.16.2",
"zarr>=2.12.0",
"IPython>=7.25.0",
"qtconsole>=4.5.1",
"rich>=12.0.0",
"napari-plugin-manager >=0.1.0a2, <0.2.0",
]
testing_extra = [
"torch>=1.7",
]
release = [
"PyGithub>=1.44.1",
"twine>=3.1.1",
"gitpython>=3.1.0",
"requests-cache>=0.9.2",
]
dev = [
"ruff",
"check-manifest>=0.42",
"pre-commit>=2.9.0",
"pydantic",
"python-dotenv",
"napari[testing]",
]
build = [
"ruff",
"pyqt5",
]
[project.entry-points.pytest11]
napari = "napari.utils._testsupport"
[project.entry-points."napari.manifest"]
napari_builtins = "napari_builtins:builtins.yaml"
[project.scripts]
napari = "napari.__main__:main"
[tool.setuptools]
zip-safe = false
include-package-data = true
license-files = [
"LICENSE",
]
[tool.setuptools.packages.find]
namespaces = false
[tool.setuptools.package-data]
"*" = [
"*.pyi",
]
napari_builtins = [
"builtins.yaml",
]
[tool.setuptools_scm]
write_to = "napari/_version.py"
[tool.check-manifest]
ignore = [
".cirrus.yml",
".pre-commit-config.yaml",
"asv.conf.json",
"codecov.yml",
"Makefile",
"napari/_version.py", # added during build by setuptools_scm
"tools/minreq.py",
"tox.ini",
"napari/_qt/qt_resources/_qt_resources_*.py",
"*.pyi", # added by make typestubs
"binder/*",
".env_sample",
".devcontainer/*",
"napari/resources/icons/_themes/*/*.svg"
]
[tool.ruff]
line-length = 79
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".mypy_cache",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"*vendored*",
"*_vendor*",
]
fix = true
[tool.ruff.format]
quote-style = "single"
[tool.ruff.lint]
select = [
"E", "F", "W", #flake8
"UP", # pyupgrade
"I", # isort
"YTT", #flake8-2020
"TC", # flake8-type-checing
"BLE", # flake8-blind-exception
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"ISC", # flake8-implicit-str-concat
"G", # flake8-logging-format
"PIE", # flake8-pie
"COM", # flake8-commas
"SIM", # flake8-simplify
"INP", # flake8-no-pep420
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"TID", # flake8-tidy-imports # replace absolutify import
"TRY", # tryceratops
"ICN", # flake8-import-conventions
"RUF", # ruff specyfic rules
"NPY201", # checks compatibility with numpy version 2.0
"ASYNC", # flake8-async
"EXE", # flake8-executable
"FA", # flake8-future-annotations
"LOG", # flake8-logging
"SLOT", # flake8-slots
"PT", # flake8-pytest-style
"T20", # flake8-print
]
ignore = [
"E501", "TC001", "TC002", "TC003",
"A003", # flake8-builtins - we have class attributes violating these rule
"COM812", # flake8-commas - we don't like adding comma on single line of arguments
"COM819", # conflicts with ruff-format
"SIM117", # flake8-simplify - we some of merged with statements are not looking great with black, reanble after drop python 3.9
"RET504", # not fixed yet https://github.com/charliermarsh/ruff/issues/2950
"TRY003", # require implement multiple exception class
"RUF005", # problem with numpy compatybility, see https://github.com/charliermarsh/ruff/issues/2142#issuecomment-1451038741
"B028", # need to be fixed
"PYI015", # it produces bad looking files (@jni opinion)
"W191", "Q000", "Q001", "Q002", "Q003", "ISC001", # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
]
[tool.ruff.lint.per-file-ignores]
"napari/_vispy/__init__.py" = ["E402"]
"**/_tests/*.py" = ["B011", "INP001", "TRY301", "B018", "RUF012"]
"napari/utils/_testsupport.py" = ["B011"]
"tools/validate_strings.py" = ["F401"]
"tools/**" = ["INP001", "T20"]
"examples/**" = ["ICN001", "INP001", "T20"]
"**/vendored/**" = ["TID"]
"napari/benchmarks/**" = ["RUF012", "TID252"]
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "single"
multiline-quotes = "double"
[tool.ruff.lint.flake8-tidy-imports]
# Disallow all relative imports.
ban-relative-imports = "all"
[tool.ruff.lint.isort]
known-first-party=['napari']
combine-as-imports = true
[tool.ruff.lint.flake8-import-conventions]
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
# Declare a custom alias for the `matplotlib` module.
"dask.array" = "da"
xarray = "xr"
[tool.pytest.ini_options]
# These follow standard library warnings filters syntax. See more here:
# https://docs.python.org/3/library/warnings.html#describing-warning-filters
addopts = ["--maxfail=5", "--durations=10", "-ra", "--strict-markers", "--strict-config"]
console_output_style = "count"
minversion = "8"
# log_cli_level = "INFO"
xfail_strict = true
testpaths = ["napari", "napari_builtins"]
# NOTE: only put things that will never change in here.
# napari deprecation and future warnings should NOT go in here.
# instead... assert the warning with `pytest.warns()` in the relevant test,
# That way we can clean them up when no longer necessary
filterwarnings = [
"error:::napari", # turn warnings from napari into errors
"error:::test_.*", # turn warnings in our own tests into errors
"default:::napari.+vendored.+", # just print warnings inside vendored modules
"ignore::DeprecationWarning:shibokensupport",
"ignore::DeprecationWarning:ipykernel",
"ignore::DeprecationWarning:tensorstore",
"ignore:Accessing zmq Socket:DeprecationWarning:jupyter_client",
"ignore:pythonw executable not found:UserWarning:",
"ignore:data shape .* exceeds GL_MAX_TEXTURE_SIZE:UserWarning",
"ignore:For best performance with Dask arrays in napari:UserWarning:",
"ignore:numpy.ufunc size changed:RuntimeWarning",
"ignore:Multiscale rendering is only supported in 2D. In 3D, only the lowest resolution scale is displayed",
"ignore:Alternative shading modes are only available in 3D, defaulting to none",
"ignore:distutils Version classes are deprecated::",
"ignore:There is no current event loop:DeprecationWarning:",
"ignore:(?s).*Pyarrow will become a required dependency of pandas:DeprecationWarning", # pandas pyarrow (pandas<3.0),
# TODO: remove once xarray is updated to avoid this warning
# https://github.com/pydata/xarray/blame/b1f3fea467f9387ed35c221205a70524f4caa18b/pyproject.toml#L333-L334
# https://github.com/pydata/xarray/pull/8939
"ignore:__array__ implementation doesn't accept a copy keyword, so passing copy=False failed.",
"ignore:pkg_resources is deprecated",
"ignore:Deprecated call to `pkg_resources.declare_namespace",
"ignore:Use Group.create_array instead."
]
markers = [
"examples: Test of examples",
"disable_qthread_start: Disable thread start in this Test",
"disable_qthread_pool_start: Disable strarting QRunnable using QThreadPool start in this Test",
"disable_qtimer_start: Disable timer start in this Test",
"disable_qanimation_start: Disable animation start in this Test",
"enable_console: Don't mock the IPython console (in QtConsole) in this Test",
"key_bindings: Test of keybindings",
]
[tool.mypy]
files = "napari"
# This file triggers an internal mypy error, so exclude collection
# TODO: fix this
exclude = "napari/utils/events/_tests/test_evented_model\\.py"
plugins = "numpy.typing.mypy_plugin, pydantic.mypy"
ignore_missing_imports = true
hide_error_codes = false
warn_redundant_casts = true
disallow_incomplete_defs = true
disallow_untyped_calls = true
disallow_untyped_defs = true
warn_unused_ignores = true
check_untyped_defs = true
no_implicit_optional = true
disable_error_code = [
# See discussion at https://github.com/python/mypy/issues/2427;
# mypy cannot run type checking on method assignment, but we use
# that in several places, so ignore the error
'method-assign'
]
# see `$ qtpy mypy-args` and qtpy readme. This will be used by `tox -e mypy`
# to properly infer with PyQt6 installed
always_false=['PYSIDE6', 'PYSIDE2', 'PYQT5']
always_true=['PYQT6']
# gloabl ignore error
[[tool.mypy.overrides]]
module = [
'*._tests.*',
'*.experimental.*',
'*._vendor.*',
'*.benchmarks.*',
'napari_builtins.*'
]
ignore_errors = true
# individual ignore error
# we should strive to remove those
# See https://github.com/napari/napari/issues/2751
# you can regenerate this list with the following command \047 is single quote.
# mypy napari | cut -f1 -d: | sort | uniq | tr '/' '.' | sed 's/\.py//' | awk '{ print " \047" $0 "\047," }'
[[tool.mypy.overrides]]
module = [
'napari._qt.code_syntax_highlight',
'napari._qt.containers._base_item_model',
'napari._qt.containers._base_item_view',
'napari._qt.containers._layer_delegate',
'napari._qt.containers.qt_axis_model',
'napari._qt.containers.qt_layer_model',
'napari._qt.containers.qt_list_model',
'napari._qt.containers.qt_list_view',
'napari._qt.containers.qt_tree_model',
'napari._qt.containers.qt_tree_view',
'napari._qt.dialogs.confirm_close_dialog',
'napari._qt.dialogs.preferences_dialog',
'napari._qt.dialogs.qt_about',
'napari._qt.dialogs.qt_activity_dialog',
'napari._qt.dialogs.qt_modal',
'napari._qt.dialogs.qt_notification',
'napari._qt.dialogs.qt_package_installer',
'napari._qt.dialogs.qt_plugin_dialog',
'napari._qt.dialogs.qt_plugin_report',
'napari._qt.dialogs.qt_reader_dialog',
'napari._qt.dialogs.screenshot_dialog',
'napari._qt.experimental.qt_chunk_receiver',
'napari._qt.experimental.qt_poll',
'napari._qt.layer_controls.qt_colormap_combobox',
'napari._qt.layer_controls.qt_image_controls',
'napari._qt.layer_controls.qt_image_controls_base',
'napari._qt.layer_controls.qt_labels_controls',
'napari._qt.layer_controls.qt_layer_controls_base',
'napari._qt.layer_controls.qt_layer_controls_container',
'napari._qt.layer_controls.qt_points_controls',
'napari._qt.layer_controls.qt_shapes_controls',
'napari._qt.layer_controls.qt_surface_controls',
'napari._qt.layer_controls.qt_tracks_controls',
'napari._qt.layer_controls.qt_vectors_controls',
'napari._qt.menus._util',
'napari._qt.menus.file_menu',
'napari._qt.perf.qt_event_tracing',
'napari._qt.perf.qt_performance',
'napari._qt.qt_event_filters',
'napari._qt.qt_event_loop',
'napari._qt.qt_main_window',
'napari._qt.qt_resources._svg',
'napari._qt.qt_viewer',
'napari._qt.qthreading',
'napari._qt.utils',
'napari._qt.widgets._slider_compat',
'napari._qt.widgets.qt_color_swatch',
'napari._qt.widgets.qt_dict_table',
'napari._qt.widgets.qt_dims',
'napari._qt.widgets.qt_dims_slider',
'napari._qt.widgets.qt_dims_sorter',
'napari._qt.widgets.qt_extension2reader',
'napari._qt.widgets.qt_font_size',
'napari._qt.widgets.qt_highlight_preview',
'napari._qt.widgets.qt_keyboard_settings',
'napari._qt.widgets.qt_message_popup',
'napari._qt.widgets.qt_mode_buttons',
'napari._qt.widgets.qt_plugin_sorter',
'napari._qt.widgets.qt_progress_bar',
'napari._qt.widgets.qt_range_slider_popup',
'napari._qt.widgets.qt_scrollbar',
'napari._qt.widgets.qt_size_preview',
'napari._qt.widgets.qt_spinbox',
'napari._qt.widgets.qt_splash_screen',
'napari._qt.widgets.qt_theme_sample',
'napari._qt.widgets.qt_tooltip',
'napari._qt.widgets.qt_viewer_buttons',
'napari._qt.widgets.qt_viewer_dock_widget',
'napari._qt.widgets.qt_viewer_status_bar',
'napari._qt.widgets.qt_welcome',
'napari._vispy.canvas',
'napari._vispy.experimental.texture_atlas',
'napari._vispy.experimental.tile_set',
'napari._vispy.experimental.tiled_image_visual',
'napari._vispy.experimental.vispy_tiled_image_layer',
'napari._vispy.overlays.base',
'napari._vispy.utils.cursor',
'napari.components.layerlist',
'napari.layers._layer_actions',
'napari.layers._multiscale_data',
'napari.layers.intensity_mixin',
'napari.layers.points._points_key_bindings',
'napari.layers.points._points_utils',
'napari.layers.points.points',
'napari.layers.shapes._shapes_mouse_bindings',
'napari.layers.shapes.shapes',
'napari.layers.utils.color_encoding',
'napari.layers.utils.color_manager',
'napari.layers.utils.stack_utils',
'napari.layers.utils.string_encoding',
'napari.layers.utils.style_encoding',
'napari.layers.utils.text_manager',
'napari.utils._magicgui',
'napari.utils._testsupport',
'napari.utils._tracebacks',
'napari.utils.action_manager',
'napari.utils.events.containers._evented_dict',
'napari.utils.events.containers._evented_list',
'napari.utils.events.containers._nested_list',
'napari.utils.events.custom_types',
'napari.utils.events.debugging',
'napari.utils.events.event',
'napari.utils.events.evented_model',
'napari.utils.interactions',
'napari.utils.key_bindings',
'napari.utils.mouse_bindings',
'napari.utils.progress',
'napari.utils.shortcuts',
'napari.utils.stubgen',
'napari.utils.transforms.transforms',
'napari.utils.tree.group',
'napari.view_layers',
'napari._app_model.injection._processors',
]
ignore_errors = true
[[tool.mypy.overrides]]
module = [
"napari.settings",
"napari.settings._yaml",
"napari.plugins.exceptions",
"napari._app_model.actions._toggle_action",
"napari._vispy.filters.tracks",
"napari._vispy.utils.text",
"napari._vispy.utils.visual",
"napari._vispy.visuals.clipping_planes_mixin",
"napari._vispy.visuals.markers",
"napari._vispy.visuals.surface",
"napari.layers.shapes._shapes_models.path",
"napari.layers.shapes._shapes_models.polygon",
"napari.layers.shapes._shapes_models._polygon_base",
"napari.layers.shapes._shapes_models.ellipse",
"napari.layers.shapes._shapes_models.line",
"napari.layers.shapes._shapes_models.rectangle",
"napari.layers.shapes._shapes_models.shape",
"napari.resources._icons",
"napari.utils.color",
"napari.utils.events.containers._dict",
"napari.utils.events.event_utils",
"napari.utils.migrations",
"napari.utils.validators",
"napari.window"
]
disallow_incomplete_defs = false
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = [
"napari._event_loop",
"napari._vispy.utils.quaternion",
"napari._vispy.visuals.bounding_box",
"napari._vispy.visuals.image",
"napari._vispy.visuals.interaction_box",
"napari._vispy.visuals.points",
"napari._vispy.visuals.scale_bar",
"napari.components._layer_slicer",
"napari.components._viewer_mouse_bindings",
"napari.components.overlays.base",
"napari.components.overlays.interaction_box",
"napari.utils.colormaps.categorical_colormap_utils",
]
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = [
"napari.components.viewer_model",
"napari.settings._fields",
"napari.settings._migrations",
"napari.settings._base",
"napari.types",
"napari.plugins._npe2",
"napari.settings._napari_settings",
"napari.plugins._plugin_manager",
"napari.plugins.utils",
"napari._qt._qapp_model.qactions._file",
"napari._qt._qapp_model.qactions._help",
"napari._qt._qapp_model.qactions._view",
"napari._vispy.camera",
"napari._vispy.layers.image",
"napari._vispy.layers.scalar_field",
"napari._vispy.layers.tracks",
"napari._vispy.layers.vectors",
"napari._vispy.overlays.axes",
"napari._vispy.overlays.interaction_box",
"napari._vispy.overlays.labels_polygon",
"napari._vispy.overlays.scale_bar",
"napari._vispy.overlays.text",
"napari.layers.labels._labels_key_bindings",
"napari.layers.utils._slice_input",
"napari.utils._register",
"napari.utils.colormaps.categorical_colormap",
"napari.utils.colormaps.standardize_color",
"napari.utils.geometry",
"napari.utils.io",
"napari.utils.notebook_display",
"napari.utils.transforms.transform_utils",
"napari.utils.translations",
"napari.utils.tree.node",
"napari.viewer",
"napari.layers.shapes._shape_list",
"napari.layers.vectors.vectors",
]
disallow_incomplete_defs = false
disallow_untyped_calls = false
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = [
"napari.plugins",
"napari._vispy.layers.base",
"napari._vispy.visuals.axes",
"napari.layers.labels._labels_mouse_bindings",
"napari.layers.utils.color_manager_utils",
"napari.utils.colormaps.vendored._cm",
"napari.utils.colormaps.vendored.cm",
"napari.utils.status_messages",
"napari.layers.shapes._shapes_utils"
]
disallow_untyped_calls = false
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = [
"napari._app_model._app",
"napari.utils.theme",
]
disallow_incomplete_defs = false
disallow_untyped_calls = false
disallow_untyped_defs = false
warn_unused_ignores = false
[[tool.mypy.overrides]]
module = [
"napari._app_model.context._context",
"napari._qt.containers._factory"
]
disallow_incomplete_defs = false
disallow_untyped_defs = false
warn_unused_ignores = false
[[tool.mypy.overrides]]
module = [
"napari._qt.menus.plugins_menu",
"napari._vispy.layers.labels",
"napari._vispy.layers.points",
"napari._vispy.layers.shapes",
"napari._vispy.layers.surface",
"napari.components._viewer_key_bindings",
"napari.layers.labels.labels",
"napari.layers.surface.surface",
"napari.layers.tracks.tracks",
"napari.layers.utils.layer_utils",
"napari.utils._dtype",
"napari.utils.colormaps.colormap_utils",
"napari.utils.misc",
]
check_untyped_defs = false
disallow_incomplete_defs = false
disallow_untyped_calls = false
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = [
"napari.components.camera",
"napari.components.dims",
"napari.conftest",
"napari.layers.labels._labels_utils",
"napari.layers.points._points_mouse_bindings",
"napari.utils.colormaps.colormap",
"napari.utils.notifications",
]
check_untyped_defs = false
disallow_incomplete_defs = false
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = [
"napari.utils.events.containers._typed",
]
check_untyped_defs = false
disallow_incomplete_defs = false
disallow_untyped_calls = false
disallow_untyped_defs = false
warn_unused_ignores = false
[[tool.mypy.overrides]]
module = [
"napari.__main__",
"napari.utils.colormaps.vendored.colors",
"napari.layers.image.image",
"napari.layers._scalar_field.scalar_field",
]
check_untyped_defs = false
disallow_untyped_calls = false
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = [
"napari._app_model.context._layerlist_context",
"napari.components.overlays.labels_polygon",
"napari.plugins.io",
"napari.utils.colormaps.vendored._cm_listed"
]
disallow_untyped_calls = false
[[tool.mypy.overrides]]
module = [
"napari._qt.containers.qt_layer_list",
"napari.layers.base.base"
]
check_untyped_defs = false
disallow_untyped_calls = false
disallow_untyped_defs = false
warn_unused_ignores = false
[[tool.mypy.overrides]]
module = [
"napari._vispy.overlays.bounding_box",
"napari._vispy.overlays.brush_circle",
"napari.utils._test_utils",
]
check_untyped_defs = false
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = [
"napari._pydantic_compat",
]
ignore_errors = true
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError()",
"except ImportError:",
"^ +\\.\\.\\.$",
]
[tool.coverage.run]
omit = [
"*/_vendor/*",
"*/_version.py",
"*/benchmarks/*",
"napari/utils/indexing.py",
"**/add_layer.py_tmpl"
]
source = [
"napari",
"napari_builtins",
]
[tool.coverage.paths]
source = [
"napari/",
"D:\\a\\napari\\napari\\napari",
"/home/runner/work/napari/napari/napari",
"/Users/runner/work/napari/napari/napari",
]
builtins = [
"napari_builtins/",
"D:\\a\\napari\\napari\\napari_builtins",
"/home/runner/work/napari/napari/napari_builtins",
"/Users/runner/work/napari/napari/napari_builtins",
]
[tool.importlinter]
root_package = "napari"
include_external_packages = true
[[tool.importlinter.contracts]]
name = "Forbid import PyQt and PySide"
type = "forbidden"
source_modules = "napari"
forbidden_modules = ["PyQt5", "PySide2", "PyQt6", "PySide6"]
ignore_imports = [
"napari._qt -> PySide2",
"napari.plugins._npe2 -> napari._qt._qplugins",
]
[[tool.importlinter.contracts]]
name = "Block import from qt module in napari.layers"
type = "layers"
layers = ["napari.qt","napari.layers"]
ignore_imports = [
"napari.plugins._npe2 -> napari._qt._qplugins",
# TODO: remove once npe1 deprecated
"napari._qt.qt_main_window -> napari._qt._qplugins",
]
[[tool.importlinter.contracts]]
name = "Block import from qt module in napari.components"
type = "layers"
layers = ["napari.qt","napari.components"]
ignore_imports = [
"napari.plugins._npe2 -> napari._qt._qplugins",
# TODO: remove once npe1 deprecated
"napari._qt.qt_main_window -> napari._qt._qplugins",
]