-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
116 lines (102 loc) · 2.7 KB
/
pyproject.toml
File metadata and controls
116 lines (102 loc) · 2.7 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "device-use"
version = "0.1.1"
description = "Like browser-use, but for scientific instruments — GUI agent framework for lab software"
readme = "README.md"
license = "Apache-2.0"
requires-python = ">=3.11"
dependencies = [
"pydantic>=2.0",
"pyyaml>=6.0",
"pillow>=10.0",
"pyautogui>=0.9",
"pyperclip>=1.8",
"mss>=9.0",
"anthropic>=0.40",
"openai>=1.0",
"backoff>=2.0",
]
[project.optional-dependencies]
nmr = [
"nmrglue>=0.9",
"numpy>=1.24",
"scipy>=1.10",
"matplotlib>=3.7",
]
web = [
"fastapi>=0.100",
"uvicorn>=0.23",
]
mcp = [
"mcp>=1.0",
]
tools = [
"tooluniverse>=1.0",
]
dev = [
"pytest>=8.0",
"pytest-asyncio>=0.23",
"pytest-cov>=5.0",
"pytest-timeout>=2.0",
]
[project.scripts]
device-use = "device_use.cli:main"
[project.entry-points."labclaw.plugins"]
device_use = "device_use.integrations.labclaw:create_plugin"
[tool.hatch.build.targets.wheel]
packages = ["src/device_use"]
[tool.ruff]
target-version = "py311"
line-length = 100
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP"]
[tool.ruff.lint.per-file-ignores]
# Cached expert responses / HTML templates contain intentionally long text lines
"src/device_use/instruments/nmr/demo_cache.py" = ["E501"]
"src/device_use/instruments/plate_reader/brain.py" = ["E501"]
"src/device_use/web/app.py" = ["E402", "E501"]
# Test data / late imports for conditional test sections
"tests/test_backends.py" = ["E402"]
"tests/test_ai_scientist_loop.py" = ["N806"]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
markers = [
"network: tests that require network access (deselect with -m 'not network')",
"skipif: conditional skip",
]
filterwarnings = [
# nmrglue uses deprecated NumPy 2.0 dtype aliases (fixed in their repo, pending release)
"ignore::DeprecationWarning:nmrglue.*",
]
[tool.coverage.run]
source = ["device_use"]
omit = [
"*/tests/*",
"*/demos/*",
"*/operators/a11y.py", # macOS-only (CoreFoundation/ApplicationServices)
]
[tool.coverage.report]
show_missing = true
fail_under = 100
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.",
"if TYPE_CHECKING:",
"raise NotImplementedError",
]
[tool.mypy]
python_version = "3.11"
warn_return_any = true
check_untyped_defs = true
[tool.bandit]
# device-use is a device-control application that uses subprocess
# to interact with instrument CLI tools (adb, scrcpy, etc.).
# B404/B603/B607 are expected and valid for this codebase.
skips = ["B404", "B603", "B607", "B110", "B311", "B108", "B104", "B310"]
[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "v$version"