forked from ipython/ipykernel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
208 lines (186 loc) · 5.34 KB
/
pyproject.toml
File metadata and controls
208 lines (186 loc) · 5.34 KB
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
[build-system]
requires = ["hatchling>=1.4", "jupyter_client>=8"]
build-backend = "hatchling.build"
[project]
name = "async-kernel"
dynamic = ["version"]
authors = [{name = "", email = "ipython-dev@python.org"}]
license = {file = "LICENSE"}
readme = "README.md"
description = "A python kernel for Jupyter running inside an anyio (asyncio or trio) event loop."
keywords = ["Interactive", "Interpreter", "Shell", "Web", "Jupyter"]
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
requires-python = ">=3.11"
dependencies = [
"ipython>=9.4",
"comm>=0.2.2",
"traitlets>=5.14.3",
"jupyter_client>=8.6.3",
"pyzmq>=26.0",
"anyio>=4.8.0,<5.0.0",
"typing_extensions>=4.14.1",
"sniffio",
"matplotlib-inline>=0.1"
]
[project.urls]
Homepage = "https://fleming79.github.io/async-kernel"
Documentation = "https://fleming79.github.io/async-kernel"
Source = "https://github.com/fleming79/async-kernel"
Tracker = "https://github.com/fleming79/async-kernel/issues"
[project.scripts]
async-kernel = "async_kernel.__main__:main"
[dependency-groups]
docs = ["mkdocs-material",
"mkdocstrings[python]",
"mkdocs-jupyter",
"mkdocs-open-in-new-tab",
"mkdocs-git-revision-date-localized-plugin",
"jupyterlab",
"ipywidgets",
"pandas"
]
dev = [
"debugpy",
"ruff",
"hatch",
"pre-commit",
"pytest-cov",
"pytest-timeout",
"pytest-mock",
"pytest-retry",
"pytest>=8.4,<9",
"matplotlib",
"trio",
"basedpyright>=1.31.1",
]
cov = [
"coverage[toml]",
"pytest-cov",
"matplotlib",
"trio",
]
[tool.hatch.version]
path = "src/async_kernel/_version.py"
# Used to call hatch_build.py
[tool.hatch.build.hooks.custom]
[tool.hatch.build.targets.wheel.shared-data]
"data_kernelspec" = "share/jupyter/kernels"
[tool.pytest.ini_options]
minversion = "6.0"
xfail_strict = true
log_cli_level = "INFO"
addopts = [
"-raXs", "--durations=10", "--color=yes", "--doctest-modules",
"--showlocals", "--strict-markers", "--strict-config",
"-s",
]
testpaths = ["tests"]
filterwarnings= []
[tool.coverage.report]
exclude_lines = [
"def __repr__",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\bProtocol\\):",
"@(abc\\.)?abstractmethod",
"except .*",
"def excepthook.*", # Pytest overrides excepthook so it's not possible to test it.
".*sys.platform == \"win32\".*"
]
[tool.coverage.run]
parallel = true
relative_files = true
source = ["async_kernel"]
omit = ["tests/*", "hatch_build.py"]
[tool.ruff]
required-version = ">=0.12.8"
line-length = 120
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"F", # Pyflakes
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"G", # flake8-logging-format
"PERF", # Perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PLR", # Refactor
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T20", # flake8-print
"TRY", # tryceratops
"FURB", # Refurb
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
"NPY", # NumPy specific rules
"PD", # pandas-vet
"PYI", # flake8-pyi
"TC", # flake8-type-checking
]
ignore = [
"PLR", # Design related pylint codes
"B027", # Allow non-abstract empty methods in abstract base classes
"T201", # `print` found
"SIM105", # Use `contextlib.suppress(ValueError)` instead of try-except-pass
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"ARG001", # Unused function argument
"ARG002", # Unused method argument
"PTH123", # `open()` should be replaced by `Path.open()`
"UP031", # Use format specifiers instead of percent format
"PT023", # Use `@pytest.mark.skip` over `@pytest.mark.skip()`
]
[tool.ruff.lint.per-file-ignores]
"*.ipynb" = ["PLC0415"]
[tool.ruff.format]
docstring-code-format = true
[tool.interrogate]
ignore-init-module=true
ignore-private=true
ignore-semiprivate=true
ignore-property-decorators=true
ignore-nested-functions=true
ignore-nested-classes=true
fail-under=95
exclude = ["docs", "tests"]
[tool.check-wheel-contents]
toplevel = ["async_kernel/"]
ignore = ["W002"]
[tool.repo-review.ignore]
PC140 = "doesn't detect basedpyright as a typechecker" # Use a type checker
MY = "Not using mypy yet" # Skip all MyPy
PY007 = "Uses github workflows to run tests for all python and os versions"# Supports an easy task runner
[tool.hatch.metadata]
allow-direct-references = true
[tool.basedpyright]
include = ['src/**']
reportMissingParameterType = false
reportExplicitAny = false
reportUnknownParameterType = false
reportUnannotatedClassAttribute = false
reportMissingTypeArgument = false
reportMissingImports = false
reportUnusedCallResult = false
reportUninitializedInstanceVariable = false
reportUnknownVariableType = false
reportAny = false
reportUnknownMemberType = false
reportUnknownArgumentType = false
reportImportCycles = false
reportMissingTypeStubs = false
reportUnusedParameter = false