-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
148 lines (131 loc) · 6.03 KB
/
pyproject.toml
File metadata and controls
148 lines (131 loc) · 6.03 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
[tool.poetry]
name = "trustandverify"
version = "0.2.1"
description = "Agentic knowledge verification using Subjective Logic confidence algebra"
authors = ["Muntaser Syed <jemsbhai@gmail.com>"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/jemsbhai/trustandverify"
repository = "https://github.com/jemsbhai/trustandverify"
documentation = "https://github.com/jemsbhai/trustandverify#readme"
keywords = [
"knowledge-verification", "subjective-logic", "confidence-algebra",
"agentic-ai", "hallucination-detection", "provenance", "json-ld",
"uncertainty-quantification", "fact-checking",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
packages = [{include = "trustandverify", from = "src"}]
# ── Core dependencies (always installed) ──────────────────────────────────────
[tool.poetry.dependencies]
python = "^3.10"
jsonld-ex = ">=0.7.0" # Subjective Logic confidence algebra
httpx = ">=0.24" # Async HTTP client for search backends
# ── Optional extras ───────────────────────────────────────────────────────────
# Search backends
tavily-python = {version = ">=0.3", optional = true}
# LLM backends
openai = {version = ">=1.0", optional = true}
anthropic = {version = ">=0.25", optional = true}
litellm = {version = ">=1.0", optional = true} # gemini + many others
ollama = {version = ">=0.1", optional = true}
# Storage backends
asyncpg = {version = ">=0.28", optional = true} # postgres
neo4j = {version = ">=5.0", optional = true}
motor = {version = ">=3.0", optional = true} # mongodb async
redis = {version = ">=5.0", optional = true}
# Export
weasyprint = {version = ">=60", optional = true} # pdf
# CLI
typer = {version = ">=0.9", optional = true}
rich = {version = ">=13.0", optional = true}
# UI
streamlit = {version = ">=1.30", optional = true}
[tool.poetry.extras]
tavily = ["tavily-python"]
serpapi = [] # uses httpx directly
brave = [] # uses httpx directly
bing = [] # uses httpx directly
openai = ["openai"]
anthropic = ["anthropic"]
gemini = ["litellm"]
ollama = ["ollama"]
sqlite = [] # stdlib, no extra dep
postgres = ["asyncpg"]
neo4j = ["neo4j"]
mongo = ["motor"]
redis = ["redis"]
ui = ["streamlit"]
cli = ["typer", "rich"]
pdf = ["weasyprint"]
all = [
"tavily-python", "openai", "anthropic", "litellm", "ollama",
"asyncpg", "neo4j", "motor", "redis",
"weasyprint", "typer", "rich", "streamlit",
]
# ── Dev dependencies ───────────────────────────────────────────────────────────
[tool.poetry.group.dev.dependencies]
pytest = "^8.0"
pytest-asyncio = "^0.24"
pytest-cov = "^6.0"
ruff = ">=0.2"
mypy = ">=1.8"
nest-asyncio = ">=1.5"
# ── Entry points ───────────────────────────────────────────────────────────────
typer = "^0.24.1"
rich = "^14.3.3"
[tool.poetry.scripts]
trustandverify = "trustandverify.cli.main:main"
# ── Build ──────────────────────────────────────────────────────────────────────
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
# ── Pytest ─────────────────────────────────────────────────────────────────────
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
addopts = "-m 'not integration'"
markers = [
"integration: requires external API keys or services",
"slow: takes more than 5 seconds",
]
filterwarnings = [
"error",
# AsyncMock coroutines from mocked async methods leak across tests on Windows
"ignore::pytest.PytestUnraisableExceptionWarning",
]
# ── Ruff ───────────────────────────────────────────────────────────────────────
[tool.ruff]
target-version = "py310"
line-length = 100
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B"]
# ── Mypy ───────────────────────────────────────────────────────────────────────
[tool.mypy]
python_version = "3.10"
ignore_missing_imports = true
# Useful checks (not full strict — tighten incrementally)
warn_return_any = false
warn_unused_configs = true
warn_unused_ignores = false
check_untyped_defs = false
disallow_untyped_defs = false
no_implicit_optional = true
# Protocol-based design uses `object` type hints intentionally;
# mypy can't see protocol methods on `object`. Tighten when
# pipeline/agent params are typed with Protocol classes.
disable_error_code = ["attr-defined", "arg-type", "call-overload", "index"]