-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
211 lines (188 loc) · 5.33 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
[build-system]
requires = [
"setuptools >= 42",
"wheel",
"setuptools_scm[toml]>=3.4"
]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
write_to = "napari_update_checker/_version.py"
[tool.setuptools.packages.find]
where = ["."]
include = ["napari_update_checker"]
exclude = []
namespaces = false
[project]
name = "napari-update-checker"
description = "Updates checker plugin for napari."
readme = "README.md"
authors = [
{name = "napari team", email = "[email protected]"}
]
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: X11 Applications :: Qt",
"Framework :: napari",
"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",
"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.8"
dependencies = [
"qtpy",
"superqt",
"pip"
]
dynamic = [
"version"
]
[project.optional-dependencies]
dev = [
"PyQt5",
"pre-commit",
]
testing = [
"pytest",
"pytest-cov",
"pytest-qt",
"virtualenv"
]
docs = [
"sphinx>6",
"sphinx-autobuild",
"sphinx-external-toc",
"sphinx-copybutton",
"sphinx-favicon",
"myst-nb",
"napari-sphinx-theme>=0.3.0",
]
[project.urls]
homepage = "https://github.com/napari/napari-plugin-manager"
[tool.black]
target-version = ['py39', 'py310', 'py311']
skip-string-normalization = true
line-length = 79
[tool.check-manifest]
ignore = [
".pre-commit-config.yaml",
"napari_update_checker/_version.py", # added during build by setuptools_scm
"*.pyi", # added by make typestubs
]
[tool.ruff]
line-length = 79
select = [
"E", "F", "W", #flake8
"UP", # pyupgrade
"I", # isort
"YTT", #flake8-2020
"TCH", # 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
"Q", # flake8-quotes
"RET", # flake8-return
"TID", # flake8-tidy-imports # replace absolutify import
"TRY", # tryceratops
"ICN", # flake8-import-conventions
"RUF", # ruff specyfic rules
]
ignore = [
"E501", "UP006", "TCH001", "TCH002", "TCH003",
"A003", # flake8-builtins - we have class attributes violating these rule
"COM812", # flake8-commas - we don't like adding comma on single line of arguments
"SIM117", # flake8-simplify - we some of merged with statements are not looking great with black, reanble after drop python 3.9
"Q000",
"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
]
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*",
]
target-version = "py38"
fix = true
[tool.ruff.per-file-ignores]
"**/_tests/*.py" = ["B011", "INP001", "TRY301"]
[tool.ruff.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.flake8-tidy-imports]
# Disallow all relative imports.
ban-relative-imports = "all"
[tool.ruff.pyupgrade]
# Preserve types, even if a file imports `from __future__ import annotations`.
keep-runtime-typing = true
[tool.ruff.isort]
known-first-party=['napari_update_checker']
[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 -rXxs"
# 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_update_checker", # turn warnings from napari into errors
"error:::test_.*", # turn warnings in our own tests into errors
]
markers = [
"enabledialog: Allow to use dialog in test"
]
[tool.mypy]
files = "napari_update_checker"
ignore_missing_imports = true
exclude = [
"_tests",
]
show_error_codes = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
check_untyped_defs = true
# # maybe someday :)
# disallow_any_generics = true
# no_implicit_reexport = true
# disallow_untyped_defs = true
[project.entry-points."napari.manifest"]
napari_update_checker = "napari_update_checker:napari.yaml"