forked from ChelseaKR/cairn
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
110 lines (98 loc) · 4.27 KB
/
Copy pathpyproject.toml
File metadata and controls
110 lines (98 loc) · 4.27 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
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[project]
name = "cairn-assistant"
version = "0.2.0"
description = "Retrieval-grounded question answering for public agencies: answers only from an operator-supplied corpus, cites its sources, refuses cleanly when it has none."
readme = "README.md"
requires-python = ">=3.11"
license = { text = "Apache-2.0" }
authors = [{ name = "Chelsea Kelly-Reif" }]
keywords = ["retrieval", "grounded", "question-answering", "public-sector", "citations"]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Text Processing :: Indexing",
]
# Deliberately empty: the runtime is standard-library only so the demo path
# works offline from a clean checkout (see DESIGN.md, "Core stance").
dependencies = []
# The runtime stays empty. These are the development toolchain, floored rather
# than left open: an unpinned linter is a gate whose rules change under you, and
# "ruff passed" stops meaning anything specific.
[project.optional-dependencies]
dev = [
"pytest>=8.3",
"ruff>=0.15",
"mypy>=1.18",
"coverage>=7.6",
]
# Separate from `dev`: contributors running the test suite have no use for a
# build frontend, and .github/workflows/release.yml's pypi job — the only
# thing that installs this extra — has no use for pytest or mypy.
release = [
"build>=1.2",
]
[project.scripts]
cairn = "cairn.cli:main"
[tool.setuptools]
packages = ["cairn", "cairn.ui"]
[tool.setuptools.package-data]
"cairn.ui" = ["static/*.css", "static/*.js"]
[tool.ruff]
line-length = 96
target-version = "py311"
# The auditor is resolved into this directory at run time. It is somebody
# else's code at a pinned commit; linting it here would be linting a
# dependency.
extend-exclude = [".plumbline-cache"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "B", "UP"]
# The complexity limit is configured, and `C90` is deliberately not in `select`
# yet, because eight functions are over it today and would fail the lint step:
# audit_guard.py `harness_defaults` (11), `regression_findings` (11), and
# `render_terminal` (11); cairn/lint.py `lint_corpus` (11);
# cairn/tabular.py `parse_count_query` (11); cairn/session.py
# `_retry_with_context` (18); cairn/server.py `_handle_ask` (19) and
# `build_handler` (56). Six features landed in one session (2026-08-22, see
# WORKLOG.md sessions 11-16) roughly doubled `build_handler`'s own number by
# wiring streaming and sessions into the same request handler that already
# carried tables, follow-ups and refusal analytics — the shape of what this
# gap actually costs, not a one-time count. Turning the rule on is a
# refactor, not a configuration change, so it is separate work rather than
# eight silent per-file ignores. The numbers here are the bar that refactor
# is aiming at. See the "good first issue" label for individually-scoped
# pieces of it.
[tool.ruff.lint.mccabe]
max-complexity = 10
# Not `--strict`. Strict mode reports 44 findings on this tree today (was 28;
# five modules landed in one session, 2026-08-22, each adding its own share —
# see WORKLOG.md sessions 11-16), and silencing them to claim a level this
# repository has not reached would be the opposite of what the rest of it
# argues for. What runs here is the default check, which is clean, and the
# gap is written down in the README's conformance table rather than hidden
# behind a passing badge. Most of the 44 are mechanical (a missing return
# type, a bare `dict` needing type arguments) — see the "good first issue"
# label for bounded slices of it.
[tool.mypy]
python_version = "3.12"
files = ["cairn"]
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
[tool.coverage.run]
branch = true
source = ["cairn"]
[tool.coverage.report]
# The floor is a minimum, not the measurement. Measured 89% branch coverage on
# 2026-08-17, 92% on 2026-08-22 after six features landed in one session
# (WORKLOG.md sessions 11-16); the floor sits below whichever is current so a
# real regression trips the gate without a routine refactor tripping it for
# no reason.
fail_under = 85
show_missing = true