-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
211 lines (196 loc) · 7.22 KB
/
Copy pathpyproject.toml
File metadata and controls
211 lines (196 loc) · 7.22 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
[project]
name = "akd"
version = "0.2.0"
description = "Human-centric Multi-Agent System (MAS) framework for scientific discovery"
readme = "README.md"
license = "Apache-2.0"
authors = [
{name = "Nish", email = "np0069@uah.edu"},
{name = "Kumar", email = "mr0051@uah.edu"}
]
keywords = ["scientific-discovery", "multi-agent", "research", "literature-search", "ai", "accelerated-knowledge-discovery"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Information Analysis",
]
requires-python = ">=3.12,<4.0"
# Lightweight core: schemas, protocols, base agent/tool machinery, guardrail
# contracts, mapping. NO ML / browser / LLM-SDK weight here — those live in the
# extras below and are lazy-imported at their call sites (see the lazy-loading
# regression tests in tests/base/test_lazy_imports.py). Install `akd[all]` to
# restore the previous batteries-included behaviour.
dependencies = [
"loguru>=0.7.3",
"pydantic>=2.10.3",
"pydantic-settings>=2.9.1",
"httpx>=0.28.1",
"rapidfuzz>=3.13.0",
"jsonpath-ng>=1.6.1",
"dateparser>=1.2.2",
]
[project.urls]
Homepage = "https://github.com/NASA-IMPACT/accelerated-discovery"
Repository = "https://github.com/NASA-IMPACT/accelerated-discovery"
Documentation = "https://github.com/NASA-IMPACT/accelerated-discovery/blob/main/README.md"
Issues = "https://github.com/NASA-IMPACT/accelerated-discovery/issues"
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
include = ["akd*"]
exclude = ["tests*", "examples*", "scripts*", "notebooks*"]
[tool.setuptools.package-data]
"akd.guardrails.categories" = ["*.yaml"]
# Pytest configuration
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"-n",
"auto",
"--dist=loadfile",
"--strict-markers",
"--strict-config",
"-ra",
"--cov=akd",
"--cov-report=term-missing",
"--cov-report=xml",
]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"slow: Slow tests",
"requires_ml: Tests requiring ML dependencies (sentence-transformers, etc.)",
]
# Optional dependencies (extras)
#
# Layering (each extra sits on top of the lightweight core; extras compose via
# self-references so `pip install akd[risk_agent]` pulls agents + guardrails too):
#
# core (default) pydantic · loguru · httpx · rapidfuzz · jsonpath-ng · dateparser
# ├─ guardrails + pyyaml schemas · protocol · risk categories · composite
# │ ├─ gg (= guardrails) GraniteGuardianTool (httpx only)
# │ └─ risk_agent = agents + deepeval RiskAgent (deepeval DAG metrics)
# ├─ agents + litellm · instructor · openai · tiktoken
# ├─ scrapers + crawl4ai · playwright · pymupdf · ... web/PDF scrapers, resolvers
# │ └─ omni + docling · docling-core DoclingScraper (torch/transformers)
# ├─ search + numpy · bs4 · requests · pyyaml search tools + resolvers
# └─ ml + sentence-transformers · pandas · numpy rerankers, embeddings
#
# `akd[all]` = every runtime extra (previous batteries-included behaviour).
[project.optional-dependencies]
# ── Guardrails ──────────────────────────────────────────────────────────
# Contracts only: GuardrailInput/Output/Protocol + RiskCategory enums (loaded
# from YAML). Lets a downstream service (e.g. akd-guardrails-service) code
# against the lightweight schemas without any ML/LLM weight.
guardrails = [
"pyyaml>=6.0",
]
# Granite Guardian tool — talks to a served model over HTTP (httpx is in core).
gg = [
"akd[guardrails]",
]
# Risk agent — deepeval DAG metrics + an LLM agent backend.
risk_agent = [
"akd[guardrails]",
"akd[agents]",
# Cap below 4.0: deepeval 4.x reworked the DAG metric API (DAGMetric/TaskNode/
# VerdictNode/DeepAcyclicGraph), which RiskAgent builds against. Unbounded,
# a fresh install pulls 4.x and RiskAgent breaks. Lift once ported to 4.x.
"deepeval>=3.4.0,<4",
]
# ── Agents (LLM stack) ──────────────────────────────────────────────────
agents = [
"litellm>=1.81.0",
"instructor==1.13.0",
"openai>=1.75.0",
"tiktoken>=0.9.0",
# litellm needs orjson on its runtime path but only declares it under its
# own [proxy] extra, so every akd[agents] consumer must pull it explicitly.
"orjson>=3.11.6",
]
# ── Scrapers / search ───────────────────────────────────────────────────
scrapers = [
"crawl4ai>=0.7.6",
"playwright>=1.40.0",
"pymupdf>=1.25.4",
"markdownify>=1.1.0",
"readability-lxml>=0.8.1",
"beautifulsoup4>=4.12.0",
"aiohttp>=3.9.0",
"requests>=2.32.3",
"pyyaml>=6.0",
"gdown>=5.2.0",
"pypaperbot @ git+https://github.com/NISH1001/PyPaperBot.git@develop",
]
# Docling / omni scraper — pulls the docling (torch/transformers) tree.
omni = [
"akd[scrapers]",
"docling>=2.37.0",
"docling-core>=2.0.0",
]
search = [
"numpy>=1.26.0",
"beautifulsoup4>=4.12.0",
"requests>=2.32.3",
"pyyaml>=6.0",
]
# ── ML (rerankers / embeddings) ─────────────────────────────────────────
ml = [
"numpy>=1.26.0",
"sentence-transformers>=5.0.0",
"pandas>=2.3.1",
]
# Install this extra if you plan to use AKDSerializer as a langgraph
# checkpoint serde (e.g. `AsyncPostgresSaver(serde=AKDSerializer())`).
serializer = [
"langgraph==1.0.3",
"numpy>=1.26.0",
]
# Everything above — restores the previous batteries-included install.
all = [
"akd[gg]",
"akd[risk_agent]",
"akd[omni]",
"akd[search]",
"akd[ml]",
"akd[serializer]",
]
# ── Tooling (not part of `all`) ─────────────────────────────────────────
dev = [
"pytest>=8.0.0",
"pytest-asyncio>=1.0.0",
"pytest-cov>=6.0.0",
"pytest-xdist>=3.5.0",
"pre-commit>=4.2.0",
"memray>=1.18.0",
"scalene>=1.5.55",
# litellm imports its proxy pre-call utils (fastapi/starlette) on some
# completion/health-check paths exercised by the real-LLM integration tests.
# Not a runtime dep of akd itself — only needed to run the suite.
"fastapi>=0.110.0",
]
local = [
"marimo==0.15.0",
"jupyter",
"ipykernel>=6.30.0",
"ipywidgets>=8.1.7",
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["F841"]
[tool.ruff]
target-version = "py312"
line-length = 120
[tool.ruff.format]
# Ensure LF line endings across platforms; used by Ruff formatter on save.
line-ending = "lf"
docstring-code-line-length = 120
quote-style = "double"