forked from jupyter-server/enterprise_gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
209 lines (186 loc) · 5.96 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
[build-system]
requires = ["hatchling>=1.5"]
build-backend = "hatchling.build"
[project]
name = "jupyter_enterprise_gateway"
version = "3.3.0.dev0"
description = "A web server for spawning and communicating with remote Jupyter kernels"
license = { file = "LICENSE.md" }
keywords = ["Interactive","Interpreter","Kernel", "Web", "Cloud"]
classifiers = [
"Intended Audience :: Developers", "Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"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",
]
requires-python = ">=3.7"
dependencies = [
"docker>=3.5.0",
"future",
"jinja2>=3.1",
"jupyter_client>=6.1.12,<7", # Remove cap once EG supports kernel provisioners
"jupyter_core>=4.7.0",
"kubernetes>=18.20.0",
"jupyter_server>=1.3,<2.0", # Remove cap (increase floor) once EG suport kernel provisioners
"paramiko>=2.11",
"pexpect>=4.8.0",
"pycryptodomex>=3.9.7",
"pyzmq>=17.0,<25.0", # Pyzmq 25 removes deprecated code that jupyter_client 6 uses, remove if v6 gets updated
"requests>=2.14.2",
"tornado>=6.1",
"traitlets>=5.3.0",
"watchdog>=2.1.3",
"yarn-api-client>=1.0"
]
[[project.authors]]
name = "Jupyter Development Team"
email = "[email protected]"
[project.readme]
text = "A lightweight, multi-tenant, scalable, and secure gateway that enables\nJupyter Notebooks to share resources across distributed clusters such as\nApache Spark, Kubernetes and others."
content-type = "text/plain"
[project.urls]
Homepage = "http://github.com/jupyter/enterprise_gateway"
[project.scripts]
jupyter-enterprisegateway = "enterprise_gateway.enterprisegatewayapp:launch_instance"
[project.optional-dependencies]
test = [
"coverage",
"pytest",
"pytest-tornasync",
"ipykernel",
"pre-commit",
"websocket-client"
]
lint = [
"black[jupyter]==23.3.0",
"mdformat>0.7",
"mdformat-gfm>=0.3.5",
"ruff==0.0.263"
]
[tool.ruff.pylint]
max-args = 10
max-statements = 60
[tool.hatch.build.targets.wheel]
include = ["enterprise_gateway"]
[tool.tbump.version]
current = "3.3.0.dev0"
regex = '''
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
((?P<channel>a|b|rc|.dev)(?P<release>\d+))?
'''
[tool.tbump.git]
message_template = "Bump to {new_version}"
tag_template = "v{new_version}"
[[tool.tbump.file]]
src = "enterprise_gateway/_version.py"
[[tool.tbump.file]]
src = "pyproject.toml"
[[tool.tbump.file]]
src = "Makefile"
[[tool.tbump.file]]
src = "etc/kubernetes/helm/enterprise-gateway/Chart.yaml"
search = 'appVersion: {current_version}'
[[tool.tbump.field]]
name = "channel"
default = ""
[[tool.tbump.field]]
name = "release"
default = ""
[tool.pytest.ini_options]
addopts = "-raXs --durations 10 --color=yes --doctest-modules"
testpaths = [
"enterprise_gateway/tests/"
]
filterwarnings = [
"error",
"ignore:There is no current event loop:DeprecationWarning",
"ignore:Passing unrecognized arguments to super:DeprecationWarning:jupyter_client",
"ignore:Jupyter is migrating its paths to use standard platformdirs:DeprecationWarning",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
[tool.black]
line-length = 100
target-version = ["py37"]
skip-string-normalization = true
extend-exclude = "enterprise_gateway/.*ipynb"
[tool.ruff]
target-version = "py37"
line-length = 100
select = [
"A", "B", "C", "DTZ", "E", "EM", "F", "FBT", "I", "ICN", "ISC", "N",
"PLC", "PLE", "PLW", "Q", "RUF", "S", "SIM", "T", "TID", "UP",
"W", "YTT",
]
ignore = [
# Q000 Single quotes found but double quotes preferred
"Q000",
# FBT001 Boolean positional arg in function definition
"FBT001", "FBT002", "FBT003",
# E501 Line too long (158 > 100 characters)
"E501",
# SIM105 Use `contextlib.suppress(...)`
"SIM105",
# S311 Standard pseudo-random generators are not suitable for cryptographic purposes
"S311",
# S603 `subprocess` call: check for execution of untrusted input
"S603",
# TID252 Relative imports from parent modules are banned
"TID252",
# N806 Variable `sqlContext` in function should be lowercase
"N806",
# PLR2004 Magic value used in comparison
"PLR2004",
# PLW0603 Using the global statement to update is discouraged
"PLW0603",
# PLW1508 Invalid type for environment variable default
"PLW1508",
]
unfixable = [
# Don't touch print statements
"T201",
# Don't touch noqa lines
"RUF100",
]
[tool.ruff.per-file-ignores]
# S101 Use of `assert` detected
# F841 local variable 'foo' is assigned to but never used
# S105 Possible hardcoded password: `"NeverHeardOf"`
# T201 `print` found
"enterprise_gateway/tests/*" = ["S101", "F841", "S105", "T201"]
"enterprise_gateway/itests/*" = ["S101", "F841", "S105", "T201"]
# T201 `print` found
"etc/*" = ["T201"]
# C901 Function is too complex
"enterprise_gateway/client/gateway_client.py" = ["C901"] # `_read_responses` is too complex (12)
"etc/docker/kernel-image-puller/kernel_image_puller.py" = ["C901"] # `fetch_image_names` is too complex (13)
"enterprise_gateway/services/processproxies/k8s.py" = ["C901"] # `terminate_container_resources` is too complex (13)
"etc/kernel-launchers/kubernetes/scripts/launch_kubernetes.py" = ["C901"] # `launch_kubernetes_kernel` is too complex (32)
"etc/docker/kernel-image-puller/image_fetcher.py" = ["C901"] # `fetch_image_names` is too complex (11)
[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=100
exclude = ["docs", "*/tests", "*/itests","conftest"]