-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathpyproject.toml
232 lines (208 loc) · 5.79 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
# 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.9"
license = { text = "BSD 3-Clause License" }
authors = [{ name = "Talley Lambert", email = "[email protected]" }]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
dynamic = ["version"]
dependencies = [
# typing-extensions is in the source code, but not actually required
# at runtime. All uses are guarded by if TYPE_CHECKING
]
# extras
# https://peps.python.org/pep-0621/#dependencies-optional-dependencies
[project.optional-dependencies]
dev = [
"ipython",
"mypy",
"mypy_extensions",
"pre-commit",
"PyQt5",
"pytest-mypy-plugins",
"rich",
"ruff",
"typing-extensions",
]
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-cov",
"wrapt",
"msgspec; python_version < '3.13'",
"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",
# FIXME: something happened in 1.14.0 that broke the build
# https://github.com/pyapp-kit/psygnal/issues/350
"mypy==1.13.0",
"mypy_extensions >=0.4.2",
"pydantic!=2.10.0",
"types-attrs",
"msgspec",
]
exclude = [
"src/psygnal/__init__.py",
"src/psygnal/_evented_model.py",
"src/psygnal/utils.py",
"src/psygnal/containers",
"src/psygnal/qt.py",
"src/psygnal/_pyinstaller_util",
"src/psygnal/_throttler.py",
]
[tool.cibuildwheel]
# Skip 32-bit builds & PyPy wheels on all platforms
skip = ["*-manylinux_i686", "*-musllinux_i686", "*-win32", "pp*"]
build = ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*"]
test-extras = ["test"]
test-command = "pytest {project}/tests -v"
test-skip = ["*-musllinux*", "cp312-win*", "*-macosx_arm64"]
[[tool.cibuildwheel.overrides]]
select = "*-manylinux_i686*"
before-all = "yum install -y python3-devel"
[tool.cibuildwheel.environment]
HATCH_BUILD_HOOKS_ENABLE = "1"
# https://docs.astral.sh/ruff/
[tool.ruff]
line-length = 88
target-version = "py39"
src = ["src", "tests"]
[tool.ruff.lint]
pydocstyle = { convention = "numpy" }
select = [
"E", # style errors
"F", # flakes
"W", # warnings
"D", # pydocstyle
"D417", # Missing argument descriptions in Docstrings
"I", # isort
"UP", # pyupgrade
"S", # bandit
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"A001", # flake8-builtins
"TCH", # flake8-typecheck
"TID", # flake8-tidy-imports
"RUF", # ruff-specific rules
]
ignore = [
"D401", # First line should be in imperative mood
]
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["D", "S", "RUF012"]
"benchmarks/*.py" = ["D", "RUF012"]
# https://docs.astral.sh/ruff/formatter/
[tool.ruff.format]
docstring-code-format = true
# 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
"ignore:.*not using a cooperative constructor:pytest.PytestDeprecationWarning:",
"ignore:Failed to disconnect::pytestqt",
]
# 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]]
module = ["wrapt"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["tests.*"]
disallow_untyped_defs = false
# 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()",
]
show_missing = true
[tool.coverage.run]
source = ["psygnal"]
omit = ["*/_pyinstaller_util/*"]
# 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",
]