-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
84 lines (77 loc) · 2.41 KB
/
Copy pathpyproject.toml
File metadata and controls
84 lines (77 loc) · 2.41 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
[project]
name = "lewm-python-edge"
version = "0.1.0"
description = "Python edge helpers for lewm-rs evaluation workflows."
requires-python = ">=3.13,<4"
dependencies = [
"av>=16,<18",
"blake3>=1,<2",
"h5py>=3.14,<4",
"numpy>=2.2,<3",
"pillow>=11,<13",
"pyarrow>=20,<23",
]
[project.optional-dependencies]
sim = [
"gym-pusht==0.1.6",
"pymunk==7.2.0",
]
parity = [
"huggingface_hub>=0.23",
"safetensors>=0.4",
"torch>=2.2",
]
[[tool.uv.index]]
url = "https://download.pytorch.org/whl/cpu"
[dependency-groups]
dev = [
"pytest>=8,<10",
"ruff>=0.13,<1",
]
# Ruff is the project-wide linter for Python helpers. Run `ruff check .` from
# this directory, or `make check` (see `python/Makefile`) to enforce the same
# gate as CI. The selected rule families focus on real bugs (E, F, W, B),
# modernisation (UP), simplifications (SIM), import hygiene (I), and Ruff's
# own ergonomic lints (RUF). Style-only and documentation-coverage families
# are deliberately out of scope: the existing code is already consistently
# formatted, so we lint without prescribing a formatter to keep diffs small.
[tool.ruff]
line-length = 100
target-version = "py313"
extend-exclude = ["uv.lock"]
[tool.ruff.lint]
select = ["E", "F", "W", "B", "UP", "SIM", "RUF", "I"]
ignore = [
# E501 (line length): not enforced as a lint because no formatter is
# configured; long lines are already rare and reviewable per PR.
"E501",
# SIM108 (ternary): subjective; keep explicit if/else for arithmetic clarity.
"SIM108",
# RUF003 (ambiguous unicode in comments): we intentionally use en-dash in prose.
"RUF003",
# RUF046 (redundant int cast of int): defensive `int(round(...))` reads well
# for float inputs whose runtime type is not obvious from context.
"RUF046",
]
[tool.ruff.lint.per-file-ignores]
# Tests routinely use `assert` and module-level fixtures; loosen accordingly.
"tests/**/*.py" = ["B011"]
[tool.ruff.lint.isort]
# Treat sibling helpers as first-party so import ordering is identical whether
# Ruff is invoked from the repository root or from `python/`.
known-first-party = [
"param_name_map",
"convert_reference",
"hf_pricing",
"cost_ledger",
"upload_checkpoints",
"verify_conversion",
"verify_onnx",
"build_parity_fixture",
"compute_so100_stats",
"compute_stats",
"decode_so100_to_h5",
"export_onnx",
"plot_curves",
"pusht_runner",
]