-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
233 lines (222 loc) · 8.42 KB
/
Copy pathpyproject.toml
File metadata and controls
233 lines (222 loc) · 8.42 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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
[project]
name = "fireflyframework-agentic"
version = "26.06.14"
description = "A GenAI metaframework built on Pydantic AI for building production-grade GenAI applications with agents, reasoning patterns, prompt engineering, observability, and more."
readme = "README.md"
license = { text = "Apache-2.0" }
authors = [
{ name = "Firefly Software Foundation" }
]
maintainers = [
{ name = "Firefly Software Foundation" }
]
requires-python = ">=3.13"
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: Pydantic :: 2",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
keywords = ["genai", "agents", "pydantic-ai", "llm", "reasoning", "observability", "framework"]
dependencies = [
# Pinned to the API-stable pydantic-ai 1.x line. The ``<2`` ceiling is
# deliberate: a 2.0 line with breaking changes (capabilities=[...] redesign,
# openai->Responses default, to_ag_ui/to_a2a removal) exists, and an
# unbounded ``>=`` would let a resolver silently pull it and break the Agent
# construction seam in agents/base.py. 2.0 migration is a separate epic.
"pydantic-ai>=1.107.0,<2",
"pydantic>=2.13,<3",
"pydantic-settings>=2.14.2,<3",
"jinja2>=3.1.0",
"httpx>=0.28.0",
"opentelemetry-api>=1.29.0",
"opentelemetry-sdk>=1.29.0",
# Pin to a known-good 0.0.x: this is a pre-1.0 package whose ``Usage``
# dataclass fields / ``calc_price`` signature could change between minors,
# which would break ALL cost resolution at once. Bump deliberately.
"genai-prices>=0.0.66,<0.1",
# markdown-it-py backs content.markdown_chunker (structure-aware markdown
# chunking). content/__init__ imports MarkdownChunker eagerly, which
# imports markdown_it at module load, so this is a core dependency rather
# than an optional extra. (Pure-Python, no native build.)
"markdown-it-py>=3.0",
# The example scripts under ``examples/`` load a project-local .env via
# python-dotenv so a developer can run them without exporting keys by
# hand. Real env vars always win (load_dotenv defaults to override=False).
"python-dotenv>=1.0.0",
]
[project.optional-dependencies]
postgres = [
"asyncpg>=0.30.0",
"sqlalchemy>=2.0.0",
]
mongodb = [
"motor>=3.6.0",
"pymongo>=4.10.0",
]
security = [
"cryptography>=48.0.1",
]
# Secure self-hosted script execution (fireflyframework_agentic.execution): the
# Monty backend is a Rust micro-interpreter with a deny-by-default capability
# model (no FS/network/env; host access only via explicitly registered external
# functions). Pure wheel, no system deps.
script-execution = [
"pydantic-monty>=0.0.18",
]
embeddings = [
"numpy>=1.26.0",
]
openai-embeddings = [
"openai>=1.0.0",
]
cohere-embeddings = [
"cohere>=5.0.0",
]
google-embeddings = [
"google-generativeai>=0.8.0",
]
mistral-embeddings = [
"mistralai>=1.0.0",
]
voyage-embeddings = [
"voyageai>=0.3.0",
]
azure-embeddings = [
"openai>=1.0.0",
]
bedrock-embeddings = [
"boto3>=1.35.0",
]
ollama-embeddings = [
"httpx>=0.28.0",
]
reasoning-eval = [
"numpy>=2.0.0",
"pandas>=2.2.0",
]
vectorstores-chroma = [
"chromadb>=0.5.0",
]
vectorstores-sqlite-vec = [
"sqlite-vec>=0.1.6",
]
vectorstores-pinecone = [
"pinecone>=5.0.0",
]
vectorstores-qdrant = [
"qdrant-client>=1.12.0",
]
vectorstores-pgvector = [
"asyncpg>=0.30.0",
]
watch = ["watchfiles>=0.24.0"]
# Binary normalisation (fireflyframework_agentic.content.binary): convert
# uploaded files (PDF/Office/images/archives/emails) into consumer-ready
# artifacts for document loaders or multimodal LLMs. All imports are lazy;
# ``soffice`` (LibreOffice) is an OS-level dep only the subprocess converter
# needs, and Gotenberg is reached over HTTP via the core ``httpx`` dep.
binary = [
"pypdf>=6.13.3",
"Pillow>=11.0",
"pillow-heif>=0.18",
"cairosvg>=2.7",
"py7zr>=0.22",
"extract-msg>=0.51",
]
all = [
"fireflyframework-agentic[postgres,mongodb,security,embeddings,openai-embeddings,cohere-embeddings,google-embeddings,mistral-embeddings,voyage-embeddings,azure-embeddings,bedrock-embeddings,ollama-embeddings,vectorstores-chroma,vectorstores-pinecone,vectorstores-qdrant,vectorstores-pgvector,vectorstores-sqlite-vec,watch,binary,script-execution]",
]
evaluation = [
"numpy>=1.26.0",
"ragas>=0.2",
"langchain-anthropic>=0.3",
"langchain-ollama>=0.3",
"langchain-openai>=0.3",
]
dev = [
"pytest>=8.3.0",
"pytest-asyncio>=0.24.0",
"pytest-cov>=6.0.0",
"pytest-benchmark>=5.0.0",
"testcontainers>=4.10.0",
"ruff>=0.9.0",
"pyright>=1.1.0",
"httpx>=0.28.0",
"pdfplumber>=0.11.0",
"pre-commit>=3.8.0",
]
[project.urls]
Homepage = "https://fireflyframework.org/"
Documentation = "https://github.com/fireflyframework/fireflyframework-agentic/tree/main/docs"
Repository = "https://github.com/fireflyframework/fireflyframework-agentic"
Issues = "https://github.com/fireflyframework/fireflyframework-agentic/issues"
Changelog = "https://github.com/fireflyframework/fireflyframework-agentic/blob/main/CHANGELOG.md"
[build-system]
requires = ["uv_build>=0.9.5,<0.12.0"]
build-backend = "uv_build"
[tool.uv.build-backend]
module-root = ""
[tool.ruff]
target-version = "py313"
line-length = 120
# Brand assets under assets/ are generated SVG art plus a self-contained build
# script (dense, terse drawing code) — tooling, not framework source. Skip them
# in lint/format; force-exclude so the pre-commit ruff hook skips them too, even
# when files are passed to it explicitly.
extend-exclude = ["assets"]
force-exclude = true
[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP", "B", "SIM", "TC", "PLC0415"]
ignore = ["E501", "TC001", "TC002", "TC003", "UP040", "UP046", "UP047", "B008"]
[tool.ruff.lint.per-file-ignores]
# content.binary lazy-imports its optional heavy deps (pypdf, Pillow,
# pillow-heif, cairosvg, py7zr, extract-msg, httpx) inside the handlers so the
# module imports cleanly without the ``[binary]`` extra; the deferred import
# IS the design (degrade to a typed error only when a format is encountered).
"fireflyframework_agentic/content/binary/*.py" = ["PLC0415"]
# execution.monty_env lazy-imports pydantic_monty (the ``[script-execution]``
# extra) inside its methods so the module imports cleanly without the extra and
# degrades to a typed SandboxUnavailableError only when actually used.
"fireflyframework_agentic/execution/monty_env.py" = ["PLC0415"]
# workflows.runner lazy-imports FireflyAgent / the agent registry inside
# FireflyAgentRunner so the workflows package stays agents-free at import time
# (only this opt-in runner needs them); the deferred import IS the design.
"fireflyframework_agentic/workflows/runner.py" = ["PLC0415"]
# Tests use inline imports for fixture isolation and to control import timing
# around mocks of optional dependencies (asyncpg, motor, qdrant, pinecone, ...).
"tests/**" = ["PLC0415"]
# Examples demonstrate runtime/lazy imports for didactic reasons and to keep
# each demo function self-contained when read in isolation.
"examples/**" = ["PLC0415"]
[tool.ruff.lint.isort]
known-first-party = ["fireflyframework_agentic"]
[tool.pyright]
pythonVersion = "3.13"
typeCheckingMode = "basic"
include = ["fireflyframework_agentic"]
exclude = ["tests/**", "examples/**"]
extraPaths = ["."]
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
pythonpath = ["."]
markers = [
"nightly: runs only in nightly CI. Long-running tests: benchmarks, real LLM/DB/HTTP, or anything not suitable for the PR gate.",
"integration: runs against the real DatabaseStore / vector-store stack (no external network — embedders / LLM agents are stubbed or mocked).",
]
filterwarnings = [
# SP-9 deprecation gate: promote any pydantic / pydantic-ai deprecation to an
# error so a dependency bump that introduces one fails CI immediately. The
# framework's own intentional deprecations (e.g. BranchStep / FanOutStep) are
# plain DeprecationWarning asserted via pytest.warns, so they are unaffected.
# Paths are stable across the pinned pydantic-ai 1.x line.
"error::pydantic.warnings.PydanticDeprecationWarning",
"error::pydantic_ai._warnings.PydanticAIDeprecationWarning",
]