Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
206 lines (176 loc) · 4.9 KB
/
Copy pathpyproject.toml
File metadata and controls
206 lines (176 loc) · 4.9 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
[project]
name = "bench-mac"
version = "0.4.0"
description = "A benchmark for evaluating AI agents on Angular version migration tasks."
readme = "README.md"
authors = [
{ name = "Samuel Mallet", email = "69467005+SuperMuel@users.noreply.github.com" },
]
requires-python = ">=3.12"
dependencies = [
"cyclopts>=3.20.0",
"docker>=7.1.0",
"loguru>=0.7.3",
"pydantic>=2.11.7",
"pydantic-settings>=2.10.1",
"python-slugify>=8.0.4",
"requests>=2.32.4",
"rich>=14.0.0",
"uuid6>=2025.0.1",
]
[project.urls]
Homepage = "https://github.com/SuperMuel/BenchMac"
Repository = "https://github.com/SuperMuel/BenchMac"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/bench_mac", "experiments", "explorer"]
[tool.hatch.build.targets.sdist]
include = ["src/bench_mac", "experiments", "explorer", "README.md", "LICENSE"]
[dependency-groups]
dev = [
"pytest>=8.4.1",
"pytest-cov>=6.2.1",
"ruff>=0.12.0",
"python-dotenv>=1.1.1",
]
experiments = [
"logfire>=4.3.6",
"mini-swe-agent>=1.13.0",
"opentelemetry-api==1.25.0",
"opentelemetry-exporter-otlp==1.25.0",
"opentelemetry-sdk==1.25.0",
"typer>=0.16.1",
"litellm>=1.77.4",
]
explorer = ["pandas>=2.3.2", "plotly>=6.3.0", "streamlit>=1.49.1"]
[tool.coverage.run]
source = ["src"]
omit = [
"tests/*",
"src/**/__init__.py",
"scripts/*",
"src/bench_mac/core/config.py",
"src/bench_mac/core/logging_config.py",
"src/bench_mac/cli.py",
"src/bench_mac/core/version.py",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
[tool.coverage.html]
directory = "htmlcov"
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
# Same as Black.
line-length = 88
indent-width = 4
target-version = "py312"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes
"I", # isort
"UP", # pyupgrade
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"RUF", # Ruff-specific rules
"N", # pep8-naming
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
"ANN001", # Checks that function arguments have type annotations.
"ANN201", # Missing return type annotation for public function {name}
"DTZ", # flake8-datetimez: checks for naive datetime usage
"T201", # Report print statements
]
ignore = []
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# --- Per-File Ignores ---
[tool.ruff.lint.per-file-ignores]
# Allow unused imports in __init__.py files for exposing package APIs.
"**/__init__.py" = ["F401"]
"tests/*" = [
"S101", # Allow `assert` statements
"ANN", # Relax annotation requirements
"RUF012", # Allow mutable class attributes
"T201", # Allow print statements in tests
]
"scripts/*" = [
"T201", # Allow print statements in scripts
]
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"unit: fast, isolated tests",
"integration: cross-component or external-resource tests",
"e2e: end-to-end tests",
"slow: slow tests",
"instance_validation: validates the baseline state of benchmark data as well as silvers; very slow and runs manually",
]
addopts = [
"--strict-markers",
"-ra", # extra summary
"-m",
"not integration and not e2e and not slow and not instance_validation", # run only unit tests by default
]
[project.scripts]
benchmac = "bench_mac.cli:app"
explorer = "bench_mac.explorer_entry:main"
[tool.uv]
default-groups = "all"