Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
145 lines (136 loc) · 5.24 KB
/
Copy pathpyproject.toml
File metadata and controls
145 lines (136 loc) · 5.24 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
[project]
name = "leapflow"
dynamic = ["version"]
description = "LeapFlow — Learning and Evolving from Actual Practice"
readme = "README.md"
requires-python = ">=3.11"
license = { text = "Apache-2.0" }
authors = [{ name = "LeapFlow Team" }]
keywords = ["agent", "ai", "macos", "automation", "imitation-learning"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
"openai>=1.40",
# Declared explicitly rather than relied on through openai: web_fetch imports
# it directly, so a transitive-only dependency would break the moment openai
# changed its own HTTP client.
"httpx>=0.27",
"msgpack>=1.0.8",
"duckdb>=1.0.0",
"pyyaml>=6.0",
"cryptography>=42.0",
"Pillow>=10.0",
"mcp>=1.26.0",
"watchdog>=3.0",
"gnureadline>=8.0; sys_platform == 'darwin'",
"pyreadline3>=3.5; sys_platform == 'win32'",
"rich>=13.0",
"prompt_toolkit>=3.0.40",
"pyobjc-framework-Quartz>=12.2; sys_platform == 'darwin'",
"pynput>=1.8.0",
# LeapBoard web server. Part of the core surface (`leap board`), so it ships
# with the base install rather than behind an extra.
"aiohttp>=3.9"
]
[project.optional-dependencies]
dev = [
"pytest>=8.0.0",
"pytest-asyncio>=0.23.0",
"ruff>=0.4.0",
# Parallel execution for the mock-heavy suite, and coverage for the
# impact map that drives change-scoped selection (tools/impact.py).
"pytest-xdist>=3.5",
"pytest-cov>=5.0",
]
hub = ["modelscope-hub>=0.4.5"]
huggingface = ["huggingface-hub>=0.20.0"]
# Native Anthropic Messages API provider. Optional: the core install uses the
# OpenAI-compatible transport by default; this extra enables AnthropicChat for
# endpoints that speak the Anthropic wire format (api.anthropic.com, DeepSeek
# /anthropic compat endpoint, etc.).
anthropic = ["anthropic>=0.39"]
# Better main-content extraction for web_fetch. Optional because the stdlib
# extractor always ships: this upgrades quality, it does not enable the feature.
web = ["trafilatura>=2.2"]
# LeapSpace (src/leapspace) — the optional CUA-sandbox app environment and
# evaluation harness. Its code ships inside the leapflow distribution, but the
# heavy PyQt6/cua-sandbox/pydantic stack is opt-in through this extra so the
# default install stays light. Install it with
# `pip install 'leapflow[leapspace]'` or `uv sync --extra leapspace`. The
# default `--all-extras` syncs deliberately exclude it (`--no-extra leapspace`,
# see Makefile/CI/setup.sh); `make space-sync` opts back in.
leapspace = ["pyqt6>=6.7", "cua-sandbox", "pydantic>=2"]
robot = [
"torch>=2.0",
"torchvision>=0.15",
"safetensors>=0.4",
"huggingface-hub>=0.20",
"numpy>=1.24",
"opencv-python>=4.8",
"pyserial>=3.5",
"Pillow>=10.0",
]
robot-ros2 = [
"rclpy>=3.0; python_version>='3.11'",
]
benchmark = [
"gymnasium>=0.29",
"numpy>=1.24",
"pyarrow>=14.0",
]
[project.scripts]
leap = "leapflow.__main__:main"
leap-bench = "benchmarks.cli:main"
[build-system]
requires = ["setuptools>=68.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools.dynamic]
version = {attr = "leapflow.version.__version__"}
[tool.setuptools.packages.find]
where = ["src"]
include = ["leapflow*", "leapspace*", "benchmarks*"]
[tool.setuptools.package-data]
"leapflow.gateway.action_packs" = ["*.yaml"]
"leapflow.dashboard.templates" = ["*.yaml"]
"leapflow.dashboard.static" = ["*"]
"leapflow.plugins.dsh" = ["*.js"]
"benchmarks.manifests" = ["*.yaml"]
"benchmarks.manifests.native" = ["*.yaml"]
"benchmarks.manifests.external" = ["*.yaml"]
"benchmarks.manifests.hardware" = ["*.yaml"]
# LeapSpace task directories are data, not importable packages (note the
# non-identifier `task-001`). Auto-discovery already ships each task's
# action.py; this keeps its config.yaml beside it so an installed example task
# stays runnable rather than half-packaged.
"leapspace.app_space.tasks.task-001" = ["*.yaml"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
pythonpath = ["src", "tests"]
testpaths = ["tests"]
# Markers are applied by path in tests/conftest.py, so existing files need no
# edit. Only files that do real local IO opt in explicitly with `pytestmark`.
markers = [
"unit: hermetic — no real IO, no LLM. Default for tests/*.py",
"component: real local IO (DuckDB, tmp profile) in-process; LLM via cassette replay",
"integration: real DB/storage, stub LLM — synonym for component",
"e2e: real leapd subprocess driven over RPC; LLM via cassette replay",
"live: real LLM provider, requires credentials (nightly/manual lane only)",
"invariant: always-on guard — never skipped by impact selection",
"slow: takes more than a few seconds",
]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
# Pinned explicitly so a ruff upgrade cannot silently change the enforced set.
# Matches the previously implicit default (pycodestyle errors + pyflakes).
select = ["E4", "E7", "E9", "F"]