forked from manzt/anywidget
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
101 lines (88 loc) · 2.99 KB
/
pyproject.toml
File metadata and controls
101 lines (88 loc) · 2.99 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
[project]
name = "anywidget"
description = "custom jupyter widgets made easy"
readme = "README.md"
requires-python = ">=3.10"
license = "MIT"
authors = [{ name = "Trevor Manz", email = "trevor.j.manz@gmail.com" }]
classifiers = [
"Framework :: Jupyter",
"Framework :: Jupyter :: JupyterLab",
"Framework :: Jupyter :: JupyterLab :: 4",
"Framework :: Jupyter :: JupyterLab :: Extensions",
"Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
dependencies = ["ipywidgets>=7.6.0", "psygnal>=0.8.1", "typing-extensions>=4.2.0"]
dynamic = ["version"]
[project.urls]
homepage = "https://github.com/manzt/anywidget"
[project.optional-dependencies]
dev = ["watchfiles>=1.1.0"]
[dependency-groups]
dev = [
"comm>=0.1.4",
"jupyterlab>=4.2.4",
"msgspec>=0.20.0",
"pydantic>=2.5.3",
"pytest>=7.4.4",
"ruff>=0.15.9",
"ty>=0.0.29",
"watchfiles>=0.23.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build]
exclude = [".github", "docs", "paper"]
artifacts = [
"anywidget/nbextension/index.*",
"anywidget/labextension/*.tgz",
"anywidget/labextension",
]
[tool.hatch.build.targets.wheel.shared-data]
"anywidget/nbextension" = "share/jupyter/nbextensions/anywidget"
"anywidget/labextension" = "share/jupyter/labextensions/anywidget"
"anywidget.json" = "etc/jupyter/nbconfig/notebook.d/anywidget.json"
[tool.hatch.build.hooks.jupyter-builder]
build-function = "hatch_jupyter_builder.npm_builder"
ensured-targets = ["anywidget/nbextension/index.js", "anywidget/labextension/package.json"]
skip-if-exists = ["anywidget/nbextension/index.js", "anywidget/labextension/package.json"]
dependencies = ["hatch-jupyter-builder>=0.5.0"]
[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
npm = "vp"
build_cmd = "build"
[tool.hatch.version]
path = "packages/anywidget/package.json"
pattern = "\"version\": \"(?P<version>.+?)\""
# https://github.com/charliermarsh/ruff
[tool.ruff]
src = ["anywidget", "tests"]
exclude = ["packages", "docs"]
[tool.ruff.lint]
pydocstyle = { convention = "numpy" }
select = ["ALL"]
ignore = [
"D401", # First line should be in imperative mood (remove to opt in)
"COM812", # Missing trailing comma (conflicts with ruff format)
"ISC001", # Import sorting (conflicts with ruff format)
"FIX002", # Fixable issue
"DOC201", # TODO(manzt) enable in follow-up PR; no doc for return type.
"FBT", # TODO(manzt): enable in follow-up PR; require bool options to be keyword-only.
]
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = [
"D", # No docstrings in tests
"S101", # Use of assert
"B018", # "useless expression", for accessing the Foo._repr_mimbundle_ descriptor
"SLF001", # Access private member
"PLC2701", # Private imports
]
"tests/test_descriptor.py" = [
"FA100", # Don't add 'from __future__ import annotations' because it messes with Pydantic and ClassVar
]
"docs/*.py" = ["D"]
[tool.uv]
required-version = ">=0.11.0"