-
Notifications
You must be signed in to change notification settings - Fork 211
Expand file tree
/
Copy pathpyproject.toml
More file actions
137 lines (126 loc) · 4.31 KB
/
Copy pathpyproject.toml
File metadata and controls
137 lines (126 loc) · 4.31 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build]
exclude = ["src/viser/client/.nodeenv", "src/viser/client/node_modules", "**/__pycache__/**"]
# Client build is in the gitignore, but we still want it in the distribution.
ignore-vcs = true
[tool.hatch.version]
path = "src/viser/__init__.py"
[tool.hatch.build.targets.sdist]
only-include = ["src/viser"]
[tool.hatch.build.targets.wheel]
packages = ["src/viser"]
[project]
name = "viser"
dynamic = ["version"]
description = "3D visualization + Python"
readme = "README.md"
license = { text="MIT" }
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent"
]
dependencies = [
"requests>=2.0.0,<3.0.0",
"websockets>=13.1,<17.0.0",
"numpy>=1.0.0,<3.0.0",
"msgspec>=0.18.6,<1.0.0",
"imageio>=2.0.0,<3.0.0",
"tqdm>=4.0.0,<5.0.0",
"rich>=13.3.3,<15.0.0",
"trimesh>=3.21.7,<5.0.0",
"typing_extensions>=4.0.0",
# TODO: migrate to backports.zstd when we drop Python 3.8 support.
# https://pypi.org/project/backports.zstd/
# Then migrate to stdlib compression.zstd in Python 3.14+.
# https://docs.python.org/3.14/library/compression.zstd.html
"zstandard>=0.20.0,<1.0.0",
]
[project.optional-dependencies]
urdf = [
"yourdfpy>=0.0.53,<1.0.0",
]
dev = [
"viser[examples]",
"pyright>=1.1.308",
"ruff>=0.9.3",
"pre-commit==3.3.2",
"pytest",
"hypothesis[numpy]",
"psutil>=5.9.5,<8.0.0",
"nodeenv>=1.9.1,<2.0.0",
"playwright>=1.40.0",
"pytest-playwright>=0.4.0",
"pytest-xdist>=3.0.0",
"pytest-split>=0.8.0",
]
examples = [
"viser[urdf]",
"torch>=1.13.1",
"torch<2.5.0; python_version<'3.9'", # Last torch with cp38 wheels.
"matplotlib>=3.7.1",
"plotly>=5.21.0",
"robot_descriptions>=1.18.0",
"gdown>=4.6.6",
"plyfile",
"opencv-python",
"pyliblzfse>=0.4.1; platform_system!='Windows'",
"pandas", # https://github.com/viser-project/viser/issues/457
"tyro>=1.0.0",
]
[project.urls]
"GitHub" = "https://github.com/viser-project/viser"
[project.scripts]
viser-build-client = "viser._client_autobuild:build_client_entrypoint"
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"e2e: end-to-end browser tests (require Playwright)",
]
addopts = "--strict-markers"
[tool.pyright]
extraPaths = []
exclude = ["./docs/**/*", "./examples/assets/**/*", "./src/viser/client/.nodeenv", "./build"]
[tool.ruff]
lint.select = [
"E", # pycodestyle errors.
"F", # Pyflakes rules.
"PLC", # Pylint convention warnings.
"PLE", # Pylint errors.
"PLR", # Pylint refactor recommendations.
"PLW", # Pylint warnings.
"I", # Import sorting.
]
lint.ignore = [
"E731", # Do not assign a lambda expression, use a def.
"E741", # Ambiguous variable name. (l, O, or I)
"E501", # Line too long.
"E721", # Do not compare types, use `isinstance()`.
"F722", # Forward annotation false positive from jaxtyping. Should be caught by pyright.
"F821", # Forward annotation false positive from jaxtyping. Should be caught by pyright.
"PLR2004", # Magic value used in comparison.
"PLR0915", # Too many statements.
"PLR0913", # Too many arguments.
"PLR0917", # Too many positional arguments. (stabilized in newer ruff; same intent as PLR0913 above)
"PLW0108", # Lambda may be unnecessary. (stabilized in newer ruff; flags pre-existing callback-style lambdas)
"PLC0414", # Import alias does not rename variable. (this is used for exporting names)
"PLC0415", # Import should be at the top-level of a file.
"PLC1901", # Use falsey strings.
"PLR5501", # Use `elif` instead of `else if`.
"PLR0911", # Too many return statements.
"PLR0912", # Too many branches.
"PLW0603", # Global statement updates are discouraged.
"PLW2901", # For loop variable overwritten.
"PLW0642", # Reassigned self in instance method.
]
exclude = [ ".nodeenv" ]