forked from ChelseaKR/disclosed
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
76 lines (64 loc) · 2.69 KB
/
Copy pathpyproject.toml
File metadata and controls
76 lines (64 loc) · 2.69 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "disclosed"
version = "0.1.0.dev0"
description = "Grades US higher-education institutions on what they disclose, not on how they perform"
readme = "README.md"
requires-python = ">=3.12"
license = { text = "Apache-2.0" }
authors = [{ name = "Chelsea Kelly-Reif" }]
dependencies = []
# The grading pipeline and the static site need nothing. The optional question-answering layer
# (ADR 0006, `disclosed.ask`) is the only thing with dependencies, and it is an extra: the public
# Anthropic SDK and a defensive XML parser for the corpus workbooks. `ask-bedrock` adds the AWS
# signing needed to reach the same models through Amazon Bedrock, which is the route the
# evaluation suites run on when no first-party key is in the environment.
[project.optional-dependencies]
ask = ["anthropic>=1.0", "defusedxml>=0.7"]
ask-bedrock = ["anthropic[bedrock]>=1.0", "defusedxml>=0.7"]
# Dev tooling lives in a PEP 735 dependency group (CODE-QUALITY-STANDARD section 5), not in
# optional-dependencies: nothing downstream may ever install the linters by accident, and
# `uv sync` installs them by default for anyone working on the repo. Floors match the
# portfolio-wide minimums; raising them is fine, lowering them is not.
[dependency-groups]
dev = [
"anthropic[bedrock]>=1.0",
"defusedxml>=0.7",
"types-defusedxml>=0.7",
"pytest>=8",
"pytest-cov>=5",
"hypothesis>=6",
"mypy>=1.18",
"ruff>=0.15",
]
[project.scripts]
disclosed = "disclosed.cli:main"
[tool.hatch.build.targets.wheel]
packages = ["src/disclosed"]
[tool.mypy]
strict = true
python_version = "3.12"
# `.github/scripts` alongside `src`, because check_site_origin.py is the gate that decides
# whether the published site may name the origin it names, and it was the one executable here
# that no gate looked at: outside the lint targets, outside `files`, outside the coverage
# source. A coverage floor is a floor over its denominator, and that file was not in it.
files = ["src", ".github/scripts"]
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = ["E", "F", "I", "B", "S", "C90", "UP", "RUF"]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]
[tool.pytest.ini_options]
testpaths = ["tests"]
# Bare `--cov`, so the measured set is the one named in [tool.coverage.run] below and there is
# one place to change it. `--cov=disclosed` named the package, which quietly meant the coverage
# floor could never see anything that is not in it.
addopts = "--strict-markers --strict-config --import-mode=importlib --cov --cov-branch --cov-fail-under=90"
[tool.coverage.run]
source = ["src/disclosed", ".github/scripts"]