-
Notifications
You must be signed in to change notification settings - Fork 450
Expand file tree
/
Copy pathpyproject.toml
More file actions
240 lines (206 loc) · 5.72 KB
/
Copy pathpyproject.toml
File metadata and controls
240 lines (206 loc) · 5.72 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
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
[project]
name = "jupyterlite-root"
version = "0.9.0a1"
# Dependency groups (PEP 735) for development dependencies
# Install with: pip install --group dev
[dependency-groups]
# Minimal build dependencies
build = [
"hatch>=1.6.3,<2",
"jupyter-builder>=1.2.2,<2",
]
# Demo site extensions
demo = [
{ include-group = "pyodide-kernel" },
"altair",
"bqplot~=0.13.1",
"folium",
"ipycanvas~=0.14.3",
"ipycytoscape~=1.3.3",
"ipyleaflet~=0.20.0",
"ipympl~=0.10.0",
"ipython>=9.16.1",
"ipyvue~=1.12.0",
"ipyvuetify~=1.11.3",
"ipywidgets~=8.1.3",
"jupyterlab-fasta~=3.3.0",
"jupyterlab-geojson~=3.4.0",
"jupyterlab-kernelspy~=4.0.0",
"jupyterlab-night~=0.5.2",
"jupyterlab-tour~=4.0.1",
"jupyterlite-p5-kernel~=0.4.0a0",
"matplotlib-inline~=0.2.2",
"nbformat",
"plotly~=6.8.0",
"seaborn",
"tenacity",
"vega-datasets",
]
# Core development
dev = [
{ include-group = "build" },
{ include-group = "pyodide-kernel" },
"jupyterlab>=4.7.0a1,<4.8",
"notebook>=7.7.0a1,<7.8",
"pkginfo",
"ruff>=0.16.0",
"twine>=5.1.1",
"watchfiles>=0.21",
]
# Documentation building
docs = [
"docutils>=0.18",
"myst-nb>=1",
"pydata-sphinx-theme",
"pytest-check-links",
"sphinx>=8.2",
"sphinx-autodoc-typehints",
"sphinx-autobuild",
"sphinx-jsonschema",
"sphinxcontrib-mermaid",
"sphinxext-rediraffe",
]
# Linting
lint = [
"jsonschema>=3",
"nbconvert",
"nbstripout",
"pre-commit",
"ruff>=0.16.0",
]
# An example downstream kernel
pyodide-kernel = [
"jupyterlite-pyodide-kernel[lock] @ https://jupyterlite-pyodide-kernel--338.org.readthedocs.build/en/338/_static/jupyterlite_pyodide_kernel-0.9.0a1-py3-none-any.whl ; sys_platform != 'emscripten'",
]
## Documentation build platform
readthedocs = [
{include-group = "demo"},
{include-group = "dev"},
{include-group = "docs"},
]
# Release process
release = [
{ include-group = "build" },
{ include-group = "lint" },
"jupyter-releaser",
]
# Testing
test = [
"ansi2html",
"jsonschema>=3",
"jupyter_server>=1.11,<3",
"jupyterlab_server>=2.8.1,<3",
"pytest>=7",
"pytest-console-scripts>=1.4.0",
"pytest-cov>=7",
"pytest-html",
"pytest-xdist",
]
# UI tests
ui-tests = [
{ include-group = "build" },
{ include-group = "pyodide-kernel" },
"jupyterlab==4.7.0a1",
"jupyterlab-language-pack-fr-FR",
"jupyterlite-javascript-kernel==0.4.0a0",
"jupyterlite-p5-kernel==0.4.0a0",
"notebook==7.7.0a1",
"jupyterlab-night==0.5.2",
]
# All development dependencies (excludes demo)
all-dev = [
{ include-group = "dev" },
{ include-group = "docs" },
{ include-group = "lint" },
{ include-group = "test" },
]
[tool.jupyter-releaser]
skip = ["build-python", "check-links", "check-python"]
[tool.jupyter-releaser.hooks]
before-bump-version = ["python -m pip install --group release", "jlpm install"]
after-bump-version = ["jlpm deduplicate", "jlpm install", "jlpm lint"]
before-build-npm = ["jlpm build:prod", "jlpm pack:app"]
after-check-npm = ["jlpm build:py"]
[tool.jupyter-releaser.options]
version-cmd = "python scripts/bump-version.py"
changelog-path = "docs/changelog.md"
[tool.check-wheel-contents]
ignore = ["W002"]
[tool.coverage.run]
patch = ["subprocess"]
[tool.ruff]
target-version = "py310"
line-length = 100
extend-include = ["*.ipynb"]
[tool.ruff.lint]
exclude = ["*.ipynb"]
select = [
"A", "B", "C", "DTZ", "E", "EM", "F", "FBT", "I", "ICN", "N",
"PLC", "PLE", "PLR", "PLW", "Q", "RUF", "S", "SIM", "T", "TID", "UP",
"W", "YTT",
]
ignore = [
# EM101 [*] Exception must not use a string literal, assign to variable first
# EM102 [*] Exception must not use an f-string literal, assign to variable first
"EM101", "EM102",
# FBT001 Boolean positional arg in function definition
"FBT001", "FBT002", "FBT003",
# S101 Use of `assert` detected
"S101",
# T201 `print` found
"T201",
# T203 `print` found
"T203",
# C408 Unnecessary `dict` call (rewrite as a literal)
"C408", "C416",
# RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
"RUF012",
# PLC0415 `import` should be at the top-level of a file (allow lazy imports for optional deps)
"PLC0415",
]
[tool.ruff.lint.per-file-ignores]
# A001 Variable `copyright` is shadowing a Python builtin
# S603 `subprocess` call: check for execution of untrusted input
# S607 Starting a process with a partial executable path
"docs/conf.py" = ["A001", "S603", "S607"]
"scripts/dev-build.py" = ["S603"]
"scripts/bump-version.py" = ["S603"]
"scripts/check-bump-version.py" = ["S603", "S607"]
"scripts/upgrade-dependencies.py" = ["S310"]
"**/conftest.py" = ["S603", "S607"]
# TID252 [*] Relative imports from parent modules are banned
"py/*" = ["TID252"]
# S101 Use of `assert` detected
"**/tests/*" = ["S101", "PLR2004"]
# E501 Line too long
"ui-tests/build.py" = ["E501", "S602"]
[tool.tbump.version]
current = "0.9.0a1"
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 = "package.json"
search = "\"version\": \"{current_version}\""
[[tool.tbump.file]]
src = "pyproject.toml"
search = 'version = "{current_version}"'
[[tool.tbump.file]]
src = "py/jupyterlite/jupyterlite/__init__.py"
[[tool.tbump.file]]
src = "py/jupyterlite/pyproject.toml"
search = "jupyterlite-core >={current_version}"
[[tool.tbump.file]]
src = "py/jupyterlite-core/jupyterlite_core/__init__.py"
[[tool.tbump.field]]
name = "channel"
default = ""
[[tool.tbump.field]]
name = "release"
default = ""