-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
119 lines (104 loc) · 3.46 KB
/
pyproject.toml
File metadata and controls
119 lines (104 loc) · 3.46 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "agentsh"
version = "0.1.0"
description = "A virtual Bash environment for AI agents — pure Python, pure in-memory"
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.11"
authors = [{name = "Mayflower GmbH"}]
keywords = ["bash", "shell", "virtual", "ai", "agent", "langchain", "sandbox"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Interpreters",
"Topic :: System :: Shells",
]
dependencies = [
"tree-sitter>=0.24.0",
"tree-sitter-bash>=0.23.0",
"langchain-core>=0.3.0",
]
[project.urls]
Homepage = "https://github.com/mayflower/agentsh"
Repository = "https://github.com/mayflower/agentsh"
Issues = "https://github.com/mayflower/agentsh/issues"
[dependency-groups]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"ruff>=0.4.0",
"pyright>=1.1",
"tach>=0.20",
"pre-commit>=4.0",
]
[project.scripts]
agentsh = "agentsh.cli.main:main"
[tool.hatch.build.targets.wheel]
packages = ["src/agentsh"]
[tool.uv]
default-groups = ["dev"]
# --------------------------------------------------------------------------
# Testing
# --------------------------------------------------------------------------
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]
addopts = "--import-mode=importlib"
# --------------------------------------------------------------------------
# Ruff — linter AND formatter (replaces flake8, pylint, black, isort)
# --------------------------------------------------------------------------
[tool.ruff]
target-version = "py311"
line-length = 88
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"C90", # mccabe complexity
"PL", # pylint
"SIM", # flake8-simplify
"RUF", # ruff-specific rules
]
ignore = [
"PLC0415", # import-outside-top-level — deferred imports break circular deps
"PLR0913", # too-many-arguments — unavoidable in evaluator constructors
"PLR2004", # magic-value-comparison — noisy for exit codes and test assertions
"PLR0911", # too-many-return-statements — pattern-matching dispatch is fine
"PLR0912", # too-many-branches — same reason
"PLR0915", # too-many-statements — complex evaluators are inherently long
]
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
# --------------------------------------------------------------------------
# Pyright — type checking in strict mode (replaces mypy)
# --------------------------------------------------------------------------
[tool.pyright]
pythonVersion = "3.11"
pythonPlatform = "All"
typeCheckingMode = "strict"
venvPath = "."
venv = ".venv"
include = ["src"]
exclude = ["tests", "**/__pycache__"]
# Relaxations — only what's genuinely unfixable
reportIncompatibleVariableOverride = false # LangChain SDK args_schema override
reportUnusedFunction = "warning"
reportUnnecessaryComparison = "warning"
reportMissingTypeArgument = "warning"