forked from pyapp-kit/psygnal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
229 lines (209 loc) · 5.69 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
# https://peps.python.org/pep-0517/
[build-system]
requires = ["hatchling>=1.8.0", "hatch-vcs"]
build-backend = "hatchling.build"
# https://peps.python.org/pep-0621/
[project]
name = "psygnal"
description = "Fast python callback/event system modeled after Qt Signals"
readme = "README.md"
requires-python = ">=3.7"
license = { text = "BSD 3-Clause License" }
authors = [{ name = "Talley Lambert", email = "[email protected]" }]
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Typing :: Typed",
]
dynamic = ["version"]
dependencies = [
"typing-extensions",
"mypy_extensions",
"importlib_metadata ; python_version < '3.8'",
]
# extras
# https://peps.python.org/pep-0621/#dependencies-optional-dependencies
[project.optional-dependencies]
dev = [
"black",
"cruft",
"dask",
"ipython",
"mypy",
"numpy",
"pre-commit",
"pydantic",
"PyQt5",
"pytest-cov",
"pytest-mypy-plugins",
"pytest-qt",
"pytest",
"qtpy",
"rich",
"ruff",
"wrapt",
]
docs = [
"griffe==0.25.5",
"mkdocs-material==8.5.10",
"mkdocs-minify-plugin",
"mkdocs==1.4.2",
"mkdocstrings-python==0.8.3",
"mkdocstrings==0.20.0",
"mkdocs-spellcheck[all]",
]
proxy = ["wrapt"]
pydantic = ["pydantic"]
test = [
"dask",
"attrs",
"numpy",
"pydantic",
"pyinstaller>=4.0",
"pytest>=6.0",
"pytest-codspeed",
"pytest-cov",
"wrapt",
"msgspec ; python_version >= '3.8'",
"toolz",
]
testqt = ["pytest-qt", "qtpy"]
[project.urls]
homepage = "https://github.com/pyapp-kit/psygnal"
repository = "https://github.com/pyapp-kit/psygnal"
documentation = "https://psygnal.readthedocs.io"
[project.entry-points.pyinstaller40]
hook-dirs = "psygnal._pyinstaller_util._pyinstaller_hook:get_hook_dirs"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.targets.sdist]
include = ["src", "tests", "CHANGELOG.md"]
[tool.hatch.build.targets.wheel]
only-include = ["src"]
sources = ["src"]
[tool.hatch.build.targets.wheel.hooks.mypyc]
mypy-args = ["--ignore-missing-imports"]
enable-by-default = false
require-runtime-dependencies = true
dependencies = [
"hatch-mypyc>=0.13.0",
"mypy>=0.991",
"pydantic",
"types-attrs",
"msgspec ; python_version >= '3.8'",
]
exclude = [
"src/psygnal/__init__.py",
"src/psygnal/_evented_model_v1.py",
"src/psygnal/_evented_model_v2.py",
"src/psygnal/utils.py",
"src/psygnal/containers",
"src/psygnal/qt.py",
"src/psygnal/_pyinstaller_util",
]
[tool.cibuildwheel]
# Skip 32-bit builds & PyPy wheels on all platforms
skip = ["*-manylinux_i686", "*-musllinux_i686", "*-win32", "pp*"]
test-extras = ["test"]
test-command = "pytest {project}/tests -v"
test-skip = "*-musllinux*"
[tool.cibuildwheel.environment]
HATCH_BUILD_HOOKS_ENABLE = "1"
# https://github.com/charliermarsh/ruff
[tool.ruff]
line-length = 88
target-version = "py37"
src = ["src", "tests"]
select = [
"E", # style errors
"F", # flakes
"D", # pydocstyle
"I", # isort
"UP", # pyupgrade
# "N", # pep8-naming
"S", # bandit
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"A001", # flake8-builtins
"TID", # flake8-tidy-imports
"RUF", # ruff-specific rules
]
ignore = [
"D100", # Missing docstring in public module
"D107", # Missing docstring in __init__
"D203", # 1 blank line required before class docstring
"D212", # Multi-line docstring summary should start at the first line
"D213", # Multi-line docstring summary should start at the second line
"D401", # First line should be in imperative mood
"D413", # Missing blank line after last section
"D416", # Section name should end with a colon
"RUF009", # Do not perform function call in dataclass defaults
]
[tool.ruff.per-file-ignores]
"tests/*.py" = ["D", "S", "RUF012"]
"benchmarks/*.py" = ["D", "RUF012"]
"setup.py" = ["D"]
# https://docs.pytest.org/en/6.2.x/customize.html
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests"]
filterwarnings = [
"error",
"ignore:The distutils package is deprecated:DeprecationWarning:",
"ignore:.*BackendFinder.find_spec()", # pyinstaller import
]
# https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
files = "src/**/*.py"
strict = true
disallow_any_generics = false
disallow_subclassing_any = false
show_error_codes = true
pretty = true
[[tool.mypy.overrides]]
module = ["numpy.*", "wrapt", "pydantic.*"]
ignore_errors = true
[[tool.mypy.overrides]]
# msgspec is only available on Python 3.8+ ... so we need to ignore it
module = ["wrapt", "msgspec"]
ignore_missing_imports = true
# 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()",
]
[tool.coverage.run]
source = ["src"]
omit = ["src/psygnal/_pyinstaller_util/hook-psygnal.py"]
# https://github.com/mgedmin/check-manifest#configuration
[tool.check-manifest]
ignore = [
".ruff_cache/**/*",
".github_changelog_generator",
".pre-commit-config.yaml",
"tests/**/*",
"typesafety/*",
".devcontainer/*",
".readthedocs.yaml",
"Makefile",
"asv.conf.json",
"benchmarks/*",
"docs/**/*",
"mkdocs.yml",
"src/**/*.c",
"codecov.yml",
"CHANGELOG.md",
"setup.py",
]