-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpyproject.toml
More file actions
240 lines (209 loc) · 6.76 KB
/
Copy pathpyproject.toml
File metadata and controls
240 lines (209 loc) · 6.76 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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
[build-system]
requires = ["hatchling>=1.27"]
build-backend = "hatchling.build"
[project]
name = "jacobian"
version = "0.13.0"
description = "Atomic mathematical tools for agents over MCP and Python"
readme = "README.md"
requires-python = ">=3.12,<3.14"
license = { text = "MIT" }
authors = [{ name = "Jacobian contributors" }]
classifiers = [
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
]
dependencies = [
"mcp==2.0.0",
"networkx==3.6.1",
"pydantic>=2.12,<3",
"python-flint==0.9.0",
"rfc8785==0.1.4",
"sympy==1.14.0",
"typer>=0.20,<1",
"z3-solver==5.0.0.0",
]
[project.scripts]
jacobian = "jacobian.cli:app"
jacobian-mcp = "jacobian.mcp.stdio_cli:main"
jacobian-remote-mcp = "jacobian.mcp.remote_cli:main"
[dependency-groups]
dev-core = [
"deptry>=0.21,<1",
"hypothesis>=6.130,<7",
"import-linter>=2,<3",
"jsonschema>=4.23,<5",
"mypy>=1.15,<3",
"pip-audit>=2.9,<3",
"pre-commit>=4.4,<5",
"pyperf>=2.9,<3",
"pytest>=8.3,<10",
"pytest-cov>=6,<8",
"pytest-randomly==4.1.0",
"pytest-repeat==0.9.4",
"pytest-split==0.11.0",
"pytest-timeout>=2.4,<3",
"pytest-xdist>=3.6,<4",
"ruff==0.16.3", # pinned to match .pre-commit-config.yaml rev
"tomli-w==1.2.0",
"types-jsonschema>=4.23,<5",
"types-networkx>=3.4,<4",
"vulture>=2.14,<3",
]
dev = [
{ include-group = "dev-core" },
]
[tool.hatch.build.targets.wheel]
packages = ["src/jacobian"]
[tool.hatch.build.targets.sdist]
exclude = [
"/.diagnostics",
"/.diagnostics/**",
]
[tool.pytest.ini_options]
addopts = "-ra --strict-config --strict-markers --import-mode=importlib"
pythonpath = ["."]
# Default collection is Lean-free and xdist-safe. Process, MCP, and optional
# Lean checks stay on explicit paths / Make targets.
testpaths = [
"tests/math",
"tests/catalog",
"tests/dispatch",
"tests/cli",
"tests/tooling",
"tests/integration",
]
# Per-invocation --timeout lives on Make/CI commands, not here: a global
# deadline would interrupt native solvers that process/Lean isolate instead.
timeout_method = "thread"
markers = [
"requires_backend(name): test requires a maintained mathematical backend",
"requires_lean: test requires the fixed external Lean toolchain",
"property: property-based invariant tests",
"exhaustive: broad finite reference sweeps run by scheduled validation",
]
[tool.ruff]
target-version = "py312"
line-length = 88
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"A",
"B",
"C4",
"C90",
"E",
"F",
"I",
"N",
"PIE",
"PTH",
"RUF",
"SIM",
"TD",
"UP",
]
ignore = ["E501"]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.mypy]
python_version = "3.12"
strict = true
packages = ["jacobian"]
[[tool.mypy.overrides]]
module = ["sympy", "sympy.*"]
ignore_missing_imports = true
# Benchmark tooling: structural mypy boundary (see tools/check_benchmark_static.py).
# The following overrides address known third-party stub gaps and platform-
# specific attributes that surface when checking the complete benchmarks.tooling
# package without --follow-imports=skip. Each is narrow and should be removed
# when the underlying issue is resolved.
[[tool.mypy.overrides]]
module = ["yaml", "yaml.*"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["harbor.models.task.task", "harbor.publisher.packager"]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ["benchmarks.tooling.command_runner", "tools.process_supervisor"]
# Windows-only attribute not in subprocess type stubs.
disable_error_code = ["attr-defined"]
[[tool.mypy.overrides]]
module = ["benchmarks.tooling.harbor_digest"]
disable_error_code = ["assignment", "no-any-return"]
[[tool.mypy.overrides]]
module = ["benchmarks.tooling.host_validation"]
disable_error_code = ["redundant-cast"]
[[tool.mypy.overrides]]
module = ["benchmarks.tooling.verifier_audits"]
disable_error_code = ["attr-defined"]
[[tool.mypy.overrides]]
module = ["benchmarks.tooling.benchmark_snapshots"]
disable_error_code = ["no-any-return"]
[[tool.mypy.overrides]]
module = ["benchmarks.tooling.heldout_routing"]
disable_error_code = ["var-annotated"]
[[tool.mypy.overrides]]
module = ["benchmarks.tooling.benchmark_contracts"]
disable_error_code = ["attr-defined"]
[[tool.mypy.overrides]]
module = ["benchmarks.tooling.heldout_smoke"]
disable_error_code = ["str-bytes-safe"]
[[tool.mypy.overrides]]
module = ["tools.benchmark_plan.compiler"]
disable_error_code = ["arg-type"]
[tool.deptry]
extend_exclude = ["benchmarks"]
known_first_party = ["jacobian"]
# Harbor is intentionally executed as a pinned external CLI through uvx; it is
# not part of Jacobian's runtime or locked application dependencies.
# The maintained deployment smoke configures the HTTP client bundled by the
# exactly pinned MCP transport; deploy/ is not part of the Python wheel.
# The Harbor manifest writer is repository tooling and uses the direct dev-only
# tomli-w dependency; it is intentionally absent from the runtime wheel.
per_rule_ignores = { "DEP001" = ["harbor"], "DEP002" = ["python-flint"], "DEP003" = ["httpx2"], "DEP004" = ["jsonschema", "tomli_w"] }
[tool.importlinter]
root_package = "jacobian"
[[tool.importlinter.contracts]]
name = "The public math library does not depend on product layers"
type = "forbidden"
source_modules = ["jacobian.math.**"]
forbidden_modules = [
"jacobian.catalog",
"jacobian.cli",
"jacobian.dispatch",
"jacobian.mcp",
"jacobian.process",
]
ignore_imports = [
# Private publication/admission modules and internal tool-declaration
# helpers may import catalog declaration types to publish built-ins.
"jacobian.math.** -> jacobian.catalog.models",
"jacobian.math.** -> jacobian.catalog._examples",
"jacobian.math.** -> jacobian.catalog.admission",
# The logic domain launches bounded external solvers via jacobian.process.
"jacobian.math.logic._operations -> jacobian.process",
]
[[tool.importlinter.contracts]]
name = "Catalog does not depend on dispatch or delivery boundaries"
type = "forbidden"
source_modules = ["jacobian.catalog"]
forbidden_modules = ["jacobian.cli", "jacobian.dispatch", "jacobian.mcp"]
[[tool.importlinter.contracts]]
name = "Dispatch does not depend on delivery boundaries"
type = "forbidden"
source_modules = ["jacobian.dispatch"]
forbidden_modules = ["jacobian.cli", "jacobian.mcp"]
[[tool.importlinter.contracts]]
name = "Finite-field values do not import the optional FLINT backend"
type = "forbidden"
source_modules = ["jacobian.math.finite_fields.values"]
forbidden_modules = ["jacobian.math.finite_fields._flint"]
[tool.coverage.run]
branch = true
source = ["jacobian"]
[tool.coverage.report]
fail_under = 50
show_missing = true
skip_covered = true