-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
138 lines (118 loc) · 3.21 KB
/
pyproject.toml
File metadata and controls
138 lines (118 loc) · 3.21 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "medha-archai"
version = "0.2.0"
description = "Semantic Memory for AI Text-to-Query systems"
readme = "README.md"
license = { text = "Apache-2.0" }
requires-python = ">=3.10"
authors = [
{ name = "Nicola Procopio", email = "nicola.procopio@acsoftware.it" },
]
keywords = ["semantic-cache", "llm", "text-to-sql", "text-to-cypher", "vector-search"]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Intended Audience :: Developers",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
# --- Core dependencies (minimal) ---
dependencies = [
"pydantic>=2.0,<3",
"pydantic-settings>=2.0,<3",
"qdrant-client>=1.9,<2",
]
[project.optional-dependencies]
# Embedding providers
fastembed = ["fastembed>=0.3,<1"]
openai = ["openai>=1.0,<2"]
# NLP utilities
nlp = ["spacy>=3.7,<4"]
gliner = ["gliner>=0.2,<1"]
# Fuzzy matching
fuzzy = ["rapidfuzz>=3.0,<4"]
# Distributed L1 cache
redis = ["redis[asyncio]>=5.0,<6"]
# All optional providers
pgvector = [
"asyncpg>=0.29,<1",
"pgvector>=0.3,<1",
]
all = ["medha-archai[fastembed,openai,nlp,gliner,fuzzy,redis,pgvector]"]
# Development
dev = [
"pytest>=8.0",
"pytest-asyncio>=0.23",
"pytest-cov>=5.0",
"ruff>=0.4",
"mypy>=1.10",
"pre-commit>=3.0",
]
[project.urls]
Homepage = "https://github.com/ArchAI-Labs/medha"
Repository = "https://github.com/ArchAI-Labs/medha"
Issues = "https://github.com/ArchAI-Labs/medha/issues"
# --- Tool configuration ---
[tool.hatch.build.targets.wheel]
packages = ["src/medha"]
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
addopts = "-v --tb=short"
markers = [
"slow: tests that require heavy models or real embedders",
"pgvector: tests that require a running PostgreSQL with pgvector extension",
]
[tool.ruff]
target-version = "py310"
line-length = 120
src = ["src"]
[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP", "B", "A", "SIM", "TCH"]
# TC001/TC003: imports ARE needed at runtime (Pydantic models, ABC signatures, isinstance)
# B017: broad pytest.raises(Exception) is intentional in hierarchy tests
ignore = ["TC001", "TC003"]
[tool.ruff.lint.per-file-ignores]
# E402: imports after pytest.importorskip are intentional
# A002: `id` arg in test helpers is conventional and clear in context
# B017: broad Exception in hierarchy tests is intentional
"tests/**" = ["E402", "A002", "B017"]
[tool.coverage.run]
source = ["medha"]
[tool.coverage.report]
omit = [
"src/medha/embeddings/openai_adapter.py",
]
[tool.mypy]
python_version = "3.10"
strict = true
warn_return_any = true
warn_unused_configs = true
[[tool.mypy.overrides]]
module = [
"spacy",
"spacy.*",
"gliner",
"gliner.*",
"openai",
"openai.*",
"fastembed",
"fastembed.*",
"rapidfuzz",
"rapidfuzz.*",
"asyncpg",
"asyncpg.*",
"pgvector",
"pgvector.*",
"redis",
"redis.*",
"numpy",
"numpy.*",
]
ignore_missing_imports = true