-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
242 lines (225 loc) · 6.81 KB
/
pyproject.toml
File metadata and controls
242 lines (225 loc) · 6.81 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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
[project]
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
name = "nublado"
description = "Nublado Jupyter service for the Rubin Science Platform."
license = "MIT"
license-files = ["LICENSE"]
readme = "README.md"
keywords = ["rubin", "lsst"]
# https://pypi.org/classifiers/
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.14",
"Natural Language :: English",
"Operating System :: POSIX",
"Private :: Do Not Upload",
"Typing :: Typed",
]
requires-python = ">=3.14"
dependencies = [
"aiojobs>=1",
"bitmath>=2",
"google-api-core>=2",
"google-cloud-artifact-registry>=1",
"httpx>=0.28",
"fastapi>=0.100",
"jinja2>=3",
"kubernetes-asyncio>=33",
"pydantic>=2.10",
"pydantic-settings>=2.7",
"pyyaml>=6",
"rubin-gafaelfawr",
"rubin-repertoire>=0.6.0",
"safir[kafka,kubernetes]>=15",
"semver>=3",
"sse-starlette>=3",
"uvicorn[standard]>=0.37",
]
dynamic = ["version"]
[project.urls]
Homepage = "https://nublado.lsst.io"
Source = "https://github.com/lsst-sqre/nublado"
"Change log" = "https://nublado.lsst.io/changelog.html"
"Issue tracker" = "https://github.com/lsst-sqre/nublado/issues"
[build-system]
requires = ["setuptools>=61", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
[project.scripts]
nublado = "nublado.cli:main"
[dependency-groups]
dev = [
"anys",
"asgi-lifespan",
"coverage[toml]",
"httpx-sse",
"pyfakefs>=6",
"pytest",
"pytest-asyncio",
"pytest-cov",
"pytest-sugar",
"pytest-timeout",
"respx",
"rubin-nublado-startup",
"types-Deprecated",
"types-requests",
]
docs = [
"documenteer[guide]>=2.3",
"scriv[toml]>=1.5",
"sphinx-click",
"sphinx-diagrams",
# Required to generate API documentation.
"respx",
"rubin-nublado-authenticator",
"rubin-nublado-client",
"rubin-nublado-spawner",
]
lint = [
"prek",
"ruff>=0.15",
"uv",
]
nox = [
"nox",
"nox-uv",
]
typing = [
"mypy>=1.15",
"types-pyyaml",
]
[tool.black]
line-length = 79
target-version = ["py314"]
[tool.mypy]
disallow_untyped_defs = true
disallow_incomplete_defs = true
enable_error_code = [
"deprecated",
"exhaustive-match",
"explicit-override",
"ignore-without-code",
"redundant-expr",
"redundant-self",
"truthy-iterable",
]
ignore_missing_imports = true
local_partial_types = true
plugins = ["pydantic.mypy"]
no_implicit_reexport = true
show_error_codes = true
strict_equality = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_ignores = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[tool.pytest.ini_options]
asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "strict"
filterwarnings = [
# dataclases-avroschema hasn't been fully updated for Python 3.14
"ignore:.*Core Pydantic V1 functionality.*:UserWarning",
]
norecursedirs = ["client/*", "hub/*"]
# The python_files setting is not for test detection (pytest will pick up any
# test files named *_test.py without this setting) but to enable special
# assert processing in any non-test supporting files under tests. We
# conventionally put test support functions under tests.support and may
# sometimes use assert in test fixtures in conftest.py, and pytest only
# enables magical assert processing (showing a full diff on assert failures
# with complex data structures rather than only the assert message) in files
# listed in python_files.
python_files = ["tests/*.py", "tests/*/*.py", "tests/*/*/*.py"]
# Use the generic Ruff configuration in ruff.toml and extend it with only
# project-specific settings.
[tool.ruff]
extend = "ruff-shared.toml"
[tool.ruff.format]
skip-magic-trailing-comma = true
[tool.ruff.lint.extend-per-file-ignores]
"*/noxfile.py" = [
"INP001", # subdirectory nox configuration isn't in a package
]
"assets/20-logging.py" = [
"INP001", # logging config isn't in a package
]
"client/src/rubin/nublado/client/_http.py" = [
"UP037", # quotes are required for Python 3.13 support
]
"client/src/rubin/nublado/client/_mock.py" = [
"S101", # test support functions are allowed to use assert
"SLF001", # used in a private decorator
"UP037", # Ruff bug, quotes are required
]
"client/tests/support/hello.ipynb" = [
"T201", # test support notebooks are allowed to print
]
"hub/plugins/spawner/src/rubin/nublado/spawner/_internals.py" = [
"UP037", # quotes are required for Python 3.13 support
]
"jupyterlab-base/jupyter_server/jupyter_server_config.py" = [
"INP001", # Jupyter server configuration file, so has no namespace
"F821", # Jupyter configuration uses a magic c variable
]
"jupyterlab-base/src/rubin/nublado/startup/_launch.py" = [
"S606", # intentionally calling os.execvpe
]
"src/nublado/controller/constants.py" = [
"S108", # constructing /tmp paths for Kubernetes Pods
]
"src/nublado/controller/services/builder/lab.py" = [
"S108", # constructing /tmp paths for Kubernetes Pods
]
"src/nublado/controller/services/builder/prepuller.py" = [
"S108", # constructing /tmp paths for Kubernetes Pods
]
"src/nublado/startup/services/environment.py" = [
"S108", # constructing /tmp paths for Kubernetes Pods
]
"src/nublado/startup/services/preparer.py" = [
"S108", # constructing /tmp paths for Kubernetes Pods
]
"tests/models/images/image_test.py" = [
"PLW0127", # self-assignment clears mypy type narrowing
]
"tests/models/images/tag_test.py" = [
"PLR0124", # testing comparison dunder methods requires strange assertions
]
"tests/data/**" = [
"INP001", # configuration, not a module in a namespace
]
"tests/startup/startup_test.py" = [
"S108", # constructing /tmp paths for Kubernetes Pods
]
[tool.ruff.lint.isort]
known-first-party = ["nublado", "rubin.nublado", "tests"]
[tool.scriv]
categories = [
"Backwards-incompatible changes",
"New features",
"Bug fixes",
"Other changes",
]
entry_title_template = "{{ version }} ({{ date.strftime('%Y-%m-%d') }})"
format = "md"
md_header_level = "2"
new_fragment_template = "file:changelog.d/_template.md.jinja"
skip_fragments = "_template.md.jinja"
[tool.setuptools_scm]
[tool.uv]
required-environments = [
"sys_platform == 'manylinux' and platform_machine == 'x86_64'",
"sys_platform == 'manylinux' and platform_machine == 'aarch64'",
]
[tool.uv.sources]
rubin-nublado-authenticator = { path = "hub/plugins/authenticator", editable = true }
rubin-nublado-client = { path = "client", editable = true }
rubin-nublado-spawner = { path = "hub/plugins/spawner", editable = true }
rubin-nublado-startup = { workspace = true }
[tool.uv.workspace]
members = ["jupyterlab-base"]