forked from ChelseaKR/sprout
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
143 lines (125 loc) · 3.93 KB
/
Copy pathpyproject.toml
File metadata and controls
143 lines (125 loc) · 3.93 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "sprout"
version = "0.1.0"
description = "A grounded, evaluated, multilingual plant-care assistant: retrieval-mandatory extractive generation with enforced citations, a never-certify-safe toxicity guard, calibrated abstention, a WCAG 2.2 chat UI, and a public evaluation harness (groundedness, safety, calibration, refusal, multilingual) wired into CI from day one."
readme = "README.md"
requires-python = ">=3.12"
license = "Apache-2.0"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Text Processing :: Linguistic",
]
authors = [{ name = "Chelsea Kelly-Reif", email = "ckellyreif@gmail.com" }]
keywords = [
"rag",
"retrieval-augmented-generation",
"plant-care",
"houseplants",
"groundedness",
"citations",
"toxicity-safety",
"calibration",
"accessibility",
"wcag",
"multilingual",
"responsible-ai",
"evaluation",
]
dependencies = [
"pydantic>=2.7",
"pyyaml>=6.0",
"typer>=0.12",
"jinja2>=3.1",
]
[project.optional-dependencies]
serve = ["fastapi>=0.115", "uvicorn>=0.29", "sse-starlette>=2.1"]
bedrock = ["boto3>=1.35"]
anthropic = ["httpx>=0.27"]
identify = ["httpx>=0.27"]
lang = ["langdetect>=1.0.9"]
[project.scripts]
sprout = "sprout.cli:app"
[project.urls]
Homepage = "https://github.com/ChelseaKR/sprout"
Repository = "https://github.com/ChelseaKR/sprout"
Documentation = "https://github.com/ChelseaKR/sprout/tree/main/docs"
Changelog = "https://github.com/ChelseaKR/sprout/blob/main/CHANGELOG.md"
# The eval harness ships in-repo as the `sprout.eval` subpackage (the headline
# artifact), not as an external dependency: `make eval` runs entirely offline.
[dependency-groups]
dev = [
"pytest>=8.2",
"pytest-cov>=5.0",
"ruff>=0.6",
"mypy>=1.11",
"pip-audit>=2.7",
"hypothesis>=6.100",
"types-pyyaml>=6.0",
"httpx>=0.27",
"fastapi>=0.115",
"uvicorn>=0.29",
"sse-starlette>=2.1",
]
docs = ["mkdocs>=1.6", "mkdocs-material>=9.5"]
[tool.hatch.build.targets.wheel]
packages = ["src/sprout"]
[tool.hatch.build.targets.sdist]
include = ["src/sprout", "corpus", "eval", "config", "web/dist", "README.md", "LICENSE", "NOTICE"]
[tool.ruff]
line-length = 100
target-version = "py312"
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "F", "I", "B", "UP", "SIM", "C90", "RUF"]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]
[tool.mypy]
python_version = "3.12"
strict = true
warn_unreachable = true
disallow_any_unimported = true
files = ["src", "tests"]
[[tool.mypy.overrides]]
module = ["boto3.*", "botocore.*", "sse_starlette.*", "langdetect.*", "uvicorn.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
minversion = "8.0"
addopts = "--cov=sprout --cov-report=term-missing --cov-fail-under=90 -ra --strict-markers --strict-config --import-mode=importlib -q"
testpaths = ["tests"]
markers = [
"integration: end-to-end tests over the bundled corpus (still offline/deterministic)",
]
filterwarnings = [
"error",
# starlette's TestClient warns when paired with httpx<2; not our code, dev-only.
"ignore:Using .httpx. with .starlette.testclient. is deprecated",
]
[tool.coverage.run]
branch = true
source = ["sprout"]
omit = [
"src/sprout/providers/bedrock.py",
"src/sprout/providers/anthropic_native.py",
"src/sprout/providers/plantnet.py",
"src/sprout/eval/llm_judge.py",
]
[tool.coverage.paths]
source = ["src/sprout", "*/site-packages/sprout"]
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING:",
"raise NotImplementedError",
"@(abc\\.)?abstractmethod",
"\\.\\.\\.",
"if __name__ == .__main__.:",
]