Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
70 lines (62 loc) · 2.57 KB
/
Copy pathpyproject.toml
File metadata and controls
70 lines (62 loc) · 2.57 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
[project]
name = "agent-loop-visualizer"
version = "0.1.0"
description = "Chat with a local agent and watch every step of its loop"
requires-python = ">=3.11"
dependencies = [
"accelerate>=1.10",
"av>=15",
"httpx>=0.27",
"pygments>=2.21.0",
"streamlit>=1.66.1",
"torch>=2.6",
"torchvision>=0.29.1",
"transformers>=5.5",
"watchdog>=6.0.0",
]
[dependency-groups]
dev = [
"mypy>=2.4.0",
"openpyxl>=3.1",
"pytest>=9.1.1",
"ruff>=0.17.2",
"types-openpyxl>=3.1.5.20261017",
"types-pygments>=2.21.0.20260819",
"types-pyyaml>=6.0.12.20260906",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = [".", "tests"]
markers = ["model: loads the real model weights; set RUN_MODEL_TESTS=1 to run"]
# Lint only: there is no formatter, so `ruff check` never rewrites a line it has nothing to say about, and no rule
# checks line length. line-length only tells the import sorter when to wrap, and the code keeps an import on one line.
# The tests' own modules (fakes, samples, fake_pi, html_check) are imported from tests/ like the packages are from
# the project's folder, so both are src and sort with agent and app.
[tool.ruff]
src = [".", "tests"]
line-length = 140
[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "I", "B", "UP"]
# zip() pairs sequences built to the same length (a step's calls and their ids, topk's values and indices), so strict=
# would say nothing those lines do not already; and a lambda given a name is how the code picks one of several
# callables (app/page.py's model) or keeps a one-line check beside the asserts that use it.
ignore = ["B905", "E731"]
[tool.mypy]
files = ["agent", "app", "docs", "tests", "streamlit_app.py"]
mypy_path = "tests"
python_version = "3.11"
warn_unused_ignores = true
# The app's and the agent's code is checked inside functions without annotations too; the tests' only where annotated.
[[tool.mypy.overrides]]
module = ["agent.*", "app.*", "docs.*"]
check_untyped_defs = true
# agent/sandbox/agent_loop_figures.py runs inside the sandbox image, where matplotlib is; the project never installs it.
[[tool.mypy.overrides]]
module = ["matplotlib.*"]
ignore_missing_imports = true
# The fixed versions after eMudhra's emSign CA certificates were compromised and removed from the CA bundles
# (https://discuss.python.org/t/109576): older ones still trust them. uv refuses to run below required-version,
# and the constraints keep a lock from ever taking an older certifi, pip or sigstore.
[tool.uv]
required-version = ">=0.13.4"
constraint-dependencies = ["certifi>=2026.10.19", "pip>=26.2.2", "sigstore>=4.5.1"]