Debian Codegraph @

pyproject.toml

raw ◀ ▶
1 Debian patch touch this file
1 [build-system]
2 requires = ["hatchling>=1.5"]
3 build-backend = "hatchling.build"
4
5 [project]
6 name = "jupyter_client"
7 dynamic = ["version"]
8 description = "Jupyter protocol implementation and client libraries"
9 keywords = [ "Interactive", "Interpreter", "Shell", "Web",]
10 classifiers = [
11 "Framework :: Jupyter",
12 "Intended Audience :: Developers",
13 "Intended Audience :: Education",
14 "Intended Audience :: System Administrators",
15 "Intended Audience :: Science/Research",
16 "License :: OSI Approved :: BSD License",
17 "Operating System :: OS Independent",
18 "Programming Language :: Python",
19 "Programming Language :: Python :: 3"
20 ]
21 requires-python = ">=3.10"
22 dependencies = [
23 "jupyter_core>=5.1",
24 "python-dateutil>=2.8.2",
25 "pyzmq>=25.0",
26 "tornado>=6.4.1",
27 "traitlets>=5.3",
28 ]
29
30 [[project.authors]]
31 name = "Jupyter Development Team"
32 email = "[email protected]"
33
34 [project.readme]
35 file = "README.md"
36 content-type = "text/markdown"
37
38 [project.license]
39 file = "LICENSE"
40
41 [project.urls]
42 Homepage = "https://jupyter.org"
43 Documentation = "https://jupyter-client.readthedocs.io/"
44 Source = "https://github.com/jupyter/jupyter_client"
45
46 [project.optional-dependencies]
47 test = [
48 "anyio",
49 "coverage",
50 "ipykernel>=6.14",
51 "mypy; platform_python_implementation != 'PyPy'",
52 "paramiko; sys_platform == 'win32'",
53 "pre-commit",
54 "pytest",
55 "pytest-jupyter[client]>=0.6.2",
56 "pytest-cov",
57 "pytest-timeout",
58 "msgpack"
59 ]
60 docs = [
61 "ipykernel",
62 "myst-parser",
63 "sphinx>=4",
64 "pydata_sphinx_theme",
65 "sphinxcontrib_github_alt",
66 "sphinxcontrib-spelling",
67 "sphinx-autodoc-typehints",
68 ]
69 orjson = ["orjson"] # When orjson is installed it will be used for faster pack and unpack
70
71 [project.scripts]
72 jupyter-kernelspec = "jupyter_client.kernelspecapp:KernelSpecApp.launch_instance"
73 jupyter-run = "jupyter_client.runapp:RunApp.launch_instance"
74 jupyter-kernel = "jupyter_client.kernelapp:main"
75
76 [project.entry-points."jupyter_client.kernel_provisioners"]
77 local-provisioner = "jupyter_client.provisioning:LocalProvisioner"
78
79 [tool.hatch.version]
80 path = "jupyter_client/_version.py"
81 validate-bump = false
82
83 [tool.hatch.envs.docs]
84 features = ["docs"]
85 [tool.hatch.envs.docs.scripts]
86 build = "make -C docs html SPHINXOPTS='-W'"
87 api = "sphinx-apidoc -o docs/api -f -E jupyter_client"
88
89 [tool.hatch.envs.test]
90 features = ["test"]
91 [tool.hatch.envs.test.scripts]
92 test = "python -m pytest -vv {args}"
93 nowarn = "test -W default {args}"
94
95 [tool.hatch.envs.cov]
96 features = ["test"]
97 dependencies = ["coverage[toml]", "pytest-cov"]
98 [tool.hatch.envs.cov.scripts]
99 test = "python -m pytest -vv --cov jupyter_client --cov-branch --cov-report term-missing:skip-covered {args}"
100 nowarn = "test -W default {args}"
101
102 [tool.hatch.envs.typing]
103 dependencies = ["pre-commit"]
104 detached = true
105 [tool.hatch.envs.typing.scripts]
106 test = "pre-commit run --all-files --hook-stage manual mypy"
107
108 [tool.hatch.envs.lint]
109 dependencies = ["pre-commit"]
110 detached = true
111 [tool.hatch.envs.lint.scripts]
112 build = [
113 "pre-commit run --all-files ruff-check",
114 "pre-commit run --all-files ruff-format"
115 ]
116
117 [tool.pytest.ini_options]
118 minversion = "7.0"
119 xfail_strict = true
120 log_cli_level = "info"
121 addopts = [
•122 "-v", "--durations=10", "--color=no", "--doctest-modules",
123 "--showlocals", "--strict-markers", "--strict-config"
124 ]
125 testpaths = [
126 "jupyter_client",
127 "tests/"
128 ]
129 timeout = 100
130 # Restore this setting to debug failures
131 timeout_method = "thread"
132 filterwarnings= [
133 # Fail on warnings
134 "error",
135 # from python-dateutil
136 "ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning",
137 "ignore:datetime.datetime.utcnow:DeprecationWarning",
138 # from ipykernel 6 (fixed in 7)
139 "ignore:Parsing dates:DeprecationWarning:ipykernel.jsonutil",
140 ]
141
142 [tool.coverage.report]
143 exclude_lines = [
144 "pragma: no cover",
145 "def __repr__",
146 "if self.debug:",
147 "if settings.DEBUG",
148 "raise AssertionError",
149 "raise NotImplementedError",
150 "if 0:",
151 "if __name__ == .__main__.:",
152 "class .*\bProtocol\\):",
153 "@(abc\\.)?abstractmethod",
154 ]
155 omit = [
156 "jupyter_client/ssh/forward.py"
157 ]
158
159 [tool.coverage.run]
160 relative_files = true
161 source = ["jupyter_client"]
162
163 [tool.mypy]
164 files = "jupyter_client"
165 python_version = "3.10"
166 strict = true
167 disallow_any_generics = false
168 enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
169 no_implicit_reexport = false
170 pretty = true
171 show_error_context = true
172 warn_return_any = false
173 warn_unreachable = true
174
175 [tool.ruff]
176 line-length = 100
177
178 [tool.ruff.lint]
179 select = [
180 "A",
181 "B",
182 "C",
183 "DTZ",
184 "E",
185 "EM",
186 "F",
187 "FBT",
188 "I",
189 "ICN",
190 "N",
191 "PLC",
192 "PLE",
193 "PLW",
194 "Q",
195 "RUF",
196 "S",
197 "SIM",
198 "T",
199 "TID",
200 "UP",
201 "W",
202 "YTT",
203 ]
204 ignore = [
205 # Allow non-abstract empty methods in abstract base classes
206 "B027",
207 # Ignore McCabe complexity
208 "C901",
209 # Allow boolean positional values in function calls, like `dict.get(... True)`
210 "FBT003",
211 # Use of `assert` detected
212 "S101",
213 # Line too long
214 "E501",
215 # Relative imports are banned
216 "TID252",
217 # Boolean ... in function definition
218 "FBT001",
219 "FBT002",
220 # Module level import not at top of file
221 "E402",
222 # A001/A002/A003 .. is shadowing a python builtin
223 "A001",
224 "A002",
225 "A003",
226 # Possible hardcoded password
227 "S105",
228 "S106",
229 # Q000 Single quotes found but double quotes preferred
230 "Q000",
231 # N806 Variable `B` in function should be lowercase
232 "N806",
233 # SIM105 Use `contextlib.suppress(ValueError)` instead of try-except-pass
234 "SIM105",
235 # SIM108 [*] Use ternary operator
236 "SIM108",
237 # S110 `try`-`except`-`pass` detected, consider logging the exception
238 "S110",
239 # PLW0603 Using the global statement to update
240 "PLW0603",
241 # Mutable class attributes should be annotated with `typing.ClassVar`
242 "RUF012",
243 # non-pep585-annotation
244 "UP006",
245 # non-pep604-annotation
246 "UP007",
247 #UP031 Use format specifiers instead of percent format,
248 "UP031",
249 # `import` should be at the top-level of a file
250 "PLC0415"
251
252
253 ]
254 unfixable = [
255 # Don't touch print statements
256 "T201",
257 # Don't touch noqa lines
258 "RUF100",
259 # Imported but unused
260 "F401",
261 ]
262
263 [tool.ruff.lint.per-file-ignores]
264 # B011 Do not call assert False since python -O removes these calls
265 # F841 local variable 'foo' is assigned to but never used
266 # C408 Unnecessary `dict` call
267 # E402 Module level import not at top of file
268 # T201 `print` found
269 # B007 Loop control variable `i` not used within the loop body.
270 # N802 Function name `assertIn` should be lowercase
271 # EM101 Exception must not use a string literal, assign to variable first
272 # PLR2004 Magic value used in comparison
273 # S603 `subprocess` call: check for execution of untrusted input
274 "tests/*" = ["B011", "F841", "C408", "E402", "T201", "B007", "N802", "EM101", "EM102", "PLR2004", "S603"]
275 # T201 `print` found
276 "*app.py" = ["T201"]
277 # F401 `._version.__version__` imported but unused
278 "jupyter_client/__init__.py" = ["F401"]
279
280 [tool.interrogate]
281 ignore-init-module=true
282 ignore-private=true
283 ignore-semiprivate=true
284 ignore-property-decorators=true
285 ignore-nested-functions=true
286 ignore-nested-classes=true
287 fail-under=90
288 exclude = ["docs", "test"]
289
290 [tool.repo-review]
291 ignore = ["GH102"]