-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathpyproject.toml
189 lines (172 loc) · 5.24 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
# https://peps.python.org/pep-0517/
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.targets.wheel]
only-include = ["src"]
sources = ["src"]
# https://peps.python.org/pep-0621/
[project]
name = "napari-omero"
dynamic = ["version"]
description = "napari/OMERO interoperability"
readme = "README.md"
requires-python = ">=3.9"
license = { text = "GPL-2.0-or-later" }
authors = [
{ name = "Talley Lambert", email = "[email protected]" },
{ name = "Will Moore", email = "[email protected]" },
{ name = "Johannes Soltwedel", email = "[email protected]" },
{ name = "Peter Sobolewski" },
]
keywords = ["OMERO.CLI", "plugin", "napari", "napari-plugin"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: X11 Applications :: Qt",
"Framework :: napari",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Visualization",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Typing :: Typed",
]
# add your package dependencies here
dependencies = [
"napari>=0.4.13",
"omero-py",
"omero-rois",
# these come with napari ...
# but are directly imported here as well so are included explicitly
"qtpy>=1.10.0",
"dask[array]>=2021.10.0",
"vispy>=0.14.1,<0.15",
"superqt>=0.6.7",
]
# https://peps.python.org/pep-0621/#dependencies-optional-dependencies
# "extras" (e.g. for `pip install .[test]`)
[project.optional-dependencies]
all = ["napari[all]"]
test = [
"pytest",
"pytest-cov",
"pytest-qt",
"pytest-regressions",
"pywin32; sys_platform == 'win32'",
]
dev = [
"napari-omero[all, test]",
"ipython",
"mypy",
"pdbpp",
"pre-commit",
"rich",
"ruff",
]
[project.urls]
homepage = "https://github.com/tlambert03/napari-omero"
repository = "https://github.com/tlambert03/napari-omero"
# Entry points
# https://peps.python.org/pep-0621/#entry-points
# same as console_scripts entry point
[project.scripts]
napari-omero = "napari_omero.__main__:main"
[project.entry-points."napari.manifest"]
napari-omero = "napari_omero:napari.yaml"
# https://docs.astral.sh/ruff
[tool.ruff]
line-length = 88
target-version = "py39"
src = ["src"]
# https://docs.astral.sh/ruff/rules
[tool.ruff.lint]
pydocstyle = { convention = "numpy" }
select = [
"E", # style errors
"W", # style warnings
"F", # flakes
"D", # pydocstyle
"D417", # Missing argument descriptions in Docstrings
"I", # isort
"UP", # pyupgrade
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"A001", # flake8-builtins
"RUF", # ruff-specific rules
"TC", # flake8-type-checking
"TID", # flake8-tidy-imports
]
ignore = [
"D401", # First line should be in imperative mood
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
]
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["D", "S"]
# https://docs.astral.sh/ruff/formatter/
[tool.ruff.format]
docstring-code-format = true
skip-magic-trailing-comma = false # default is false
# https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
files = "src/**/"
strict = false
check_untyped_defs = true
ignore_missing_imports = true
disallow_any_generics = false
disallow_subclassing_any = false
show_error_codes = true
pretty = true
# https://docs.pytest.org/en/6.2.x/customize.html
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
filterwarnings = [
"error",
"ignore:distutils Version classes are deprecated:",
"ignore:the imp module is deprecated in:",
"ignore:'U' mode is deprecated",
"ignore:Please import PackageMetadata from 'npe2'",
"ignore:`np.bool8` is a deprecated alias for `np.bool_`:DeprecationWarning:skimage",
]
# https://coverage.readthedocs.io/en/6.4/config.html
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"@overload",
"except ImportError",
"\\.\\.\\.",
"raise NotImplementedError()",
"pass",
]
[tool.coverage.run]
source = ["src"]
# https://github.com/mgedmin/check-manifest#configuration
# add files that you want check-manifest to explicitly ignore here
# (files that are in the repo but shouldn't go in the package)
[tool.check-manifest]
ignore = [
".github_changelog_generator",
".pre-commit-config.yaml",
".ruff_cache/**/*",
"setup.py",
"tests/**/*",
]