-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
156 lines (142 loc) · 5.3 KB
/
Copy pathpyproject.toml
File metadata and controls
156 lines (142 loc) · 5.3 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "nullius"
version = "0.0.1"
description = "An artificial research institution with ground truth. Take nobody's word for it."
readme = "README.md"
requires-python = ">=3.12"
license = "Apache-2.0"
authors = [{ name = "martex-dev" }]
keywords = ["autonomous-research", "multi-agent", "reproducibility", "provenance", "ml-benchmark"]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
"pydantic>=2.9",
"pydantic-settings>=2.5",
"sqlalchemy>=2.0.36",
"alembic>=1.14",
"typer>=0.15",
"rich>=13.9",
"numpy>=2.1",
"scipy>=1.14",
"scikit-learn>=1.5",
"pandas>=2.2",
"jinja2>=3.1",
"psutil>=6.1",
"platformdirs>=4.3",
]
[project.optional-dependencies]
anthropic = ["anthropic>=0.40"]
postgres = ["psycopg[binary]>=3.2"]
[project.scripts]
nullius = "nullius.cli:app"
[project.urls]
Homepage = "https://github.com/martex-dev/nullius"
Documentation = "https://github.com/martex-dev/nullius/tree/main/docs"
[dependency-groups]
dev = [
"pytest>=8.3",
"pytest-cov>=6.0",
"hypothesis>=6.119",
"ruff>=0.8",
"mypy>=1.13",
"pandas-stubs",
"types-psutil",
]
[tool.hatch.build.targets.wheel]
packages = ["src/nullius"]
# ---------------------------------------------------------------- ruff
[tool.ruff]
line-length = 100
target-version = "py312"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", "F", "W", # pycodestyle / pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # bugbear
"A", # builtin shadowing
"C4", # comprehensions
"SIM", # simplify
"RUF",
"S", # bandit — this project executes generated code
"PTH", # pathlib
"TID",
# M23: a parameter accepted and never read is a wire that ends in the air.
# `_replicate` took `conservative` and dropped it, so protocol v6 adjudicated
# a prediction about conservative escalation against an arm that sized
# exactly like its comparator. This rule is the cheap half of the guard; the
# other half runs the two arms and compares what they bought.
"ARG",
]
ignore = [
"S101", # assert: used throughout the test suite
# InvariantViolation, BudgetExceeded, ReplayCacheMiss, ProviderRefusal read as
# what they are. An "Error" suffix would make the most-read exception names in
# the project worse, and the base class already ends in Error.
"N818",
# En dashes and similar are correct typography in prose. The ambiguous-unicode
# rules earn their keep in identifiers (RUF001) and comments (RUF003), not in
# docstrings.
"RUF002",
]
[tool.ruff.lint.per-file-ignores]
# ARG: fakes and stubs stand in for a real signature and are free to ignore most
# of what they are handed; that is what makes them fakes.
"tests/**" = ["S", "N806", "ARG"]
# ARG: every function in these modules is registered into a dispatch table and
# called with a fixed argument list -- `@detector`, `@register_view`,
# `@transform_op`, SQLAlchemy's `TypeDecorator` and its event listeners. The
# signature is the interface, so an unused argument is conformance rather than a
# loose wire. `src/nullius/kernel.py` is deliberately absent from this list, and
# `tests/test_switches.py` asserts the same rule over it directly, so no edit to
# this file can switch the check off where it cost something.
"src/nullius/adversarial/detectors.py" = ["ARG"]
"src/nullius/adversarial/roles.py" = ["ARG"]
"src/nullius/build/ops.py" = ["ARG"]
"src/nullius/db/tables.py" = ["ARG"]
"src/nullius/roles/views.py" = ["ARG"]
# The invariant DDL is assembled from a fixed, module-private tuple of table
# names. No user input reaches it, and the whole point of the module is that
# the statements are literal SQL.
# E501: several RAISE messages must be a single string literal (SQLite has no
# adjacent-literal concatenation), which pushes those lines past the limit.
"src/nullius/db/triggers.py" = ["S608", "E501", "ARG"]
# The station reads historical ladder ledgers, whose schemas were written by five
# different milestones. Table names are interpolated from `_TABLES`, a module-private
# literal tuple, and the row limit from a module-level int. No user input reaches
# either, and querying by ORM model would make an old ladder unreadable rather than
# merely partial.
"src/nullius/station/ledger.py" = ["S608"]
# ---------------------------------------------------------------- mypy
[tool.mypy]
python_version = "3.12"
strict = true
warn_unreachable = true
plugins = ["pydantic.mypy"]
files = ["src/nullius"]
[[tool.mypy.overrides]]
module = ["sklearn.*", "scipy.*"]
ignore_missing_imports = true
# ---------------------------------------------------------------- pytest
[tool.pytest.ini_options]
minversion = "8.0"
addopts = "-ra --strict-markers --strict-config"
testpaths = ["tests"]
markers = [
"invariant: proves a scientific invariant cannot be violated through the public API",
"isolation: proves a sandbox or role-visibility boundary holds",
"live: requires a real LLM API key; skipped by default",
"slow: takes more than a few seconds",
]
[tool.coverage.run]
source = ["src/nullius"]
branch = true