-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
228 lines (211 loc) · 7.82 KB
/
Copy pathpyproject.toml
File metadata and controls
228 lines (211 loc) · 7.82 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[project]
name = "a-memory"
version = "1.11.0"
description = "a-memory — persistent, layer-isolated memory for AI agents: 5 primitives, hybrid search, knowledge graphs"
readme = "README.md"
license = "MIT"
requires-python = ">=3.10"
authors = [
{ name = "Ariel Memory Team" }
]
keywords = ["mcp", "memory", "ai-agent", "llm", "knowledge-graph", "rag", "wiki"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
"mcp[cli]>=2,<3",
"pyyaml>=6.0",
"pydantic>=2.0",
"pynacl>=1.5.0",
"python-frontmatter>=1.0.0",
"prometheus-client>=0.26.0",
"aiosqlite>=0.22.1",
"alembic>=1.19.0",
"starlette>=1.3.1",
"uvicorn>=0.52.1",
"numpy>=2.2.6",
"spacy>=3.8.16",
"pymorphy3>=2.0.6",
# lifecycle/ uses both at runtime (best-effort imports); they previously
# arrived transitively via the embeddings extra — declared explicitly
# now that the embeddings extra is optional (remote indexer service).
"scikit-learn>=1.6",
"networkx>=3.0",
# spaCy NER models — privacy gate (hooks ingest) and graph miners.
# Previously installed as unmanaged wheels; declared so uv sync keeps them.
"en-core-web-sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl",
"ru-core-news-sm @ https://github.com/explosion/spacy-models/releases/download/ru_core_news_sm-3.8.0/ru_core_news_sm-3.8.0-py3-none-any.whl",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-asyncio>=0.21",
"pytest-timeout>=2.0",
"pytest-cov>=4.0",
"pytest-xdist>=3.0",
"ruff>=0.1",
"mypy>=1.0",
"hypothesis>=6.0",
]
docs = [
"mkdocs>=1.5",
"mkdocs-material>=9.0",
"mkdocstrings[python]>=0.24",
]
win = [
"aiosqlite>=0.21.0,!=0.22.0",
]
binary = [
"numpy>=1.24",
]
vec = [
"sqlite-vec>=0.1",
]
ann = [
"hnswlib>=0.7",
]
embeddings = [
"sentence-transformers>=3.0",
]
all = [
"a-memory[dev,win,binary,vec,ann,embeddings]",
]
[project.scripts]
a-memory = "mcp_server.server:main"
ariel-memory = "mcp_server.server:main"
mcp-ariel-memory = "mcp_server.server:main"
[project.urls]
Homepage = "https://github.com/Cipher208/a-memory"
Repository = "https://github.com/Cipher208/a-memory"
Issues = "https://github.com/Cipher208/a-memory/issues"
Documentation = "https://cipher208.github.io/a-memory/"
[tool.hatch.build.targets.wheel]
packages = ["."]
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"]
timeout = 60
filterwarnings = [
"ignore::pytest.PytestUnhandledThreadExceptionWarning",
"ignore::DeprecationWarning:features.auth",
]
[tool.ruff]
line-length = 150
target-version = "py310"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"INP001", # Missing __init__.py in subdirs
"ANN", # Missing type annotations (using mypy strict instead)
"EM", # Exception message literals
"TRY003", # Long exception messages
"PLR2004", # Magic numbers
"COM812", # Missing trailing comma
"ISC001", # Implicit string concatenation
"T201", # print() found (we use it in demo/cli)
"S101", # Use of assert (standard for tests)
"PLC0415", # Import at top level (we use dynamic imports)
"E501", # Line too long (SQL strings)
"RUF001", # Ambiguous character (Cyrillic in strings)
"I001", # Import sorting (let developer decide)
"BLE001", # Blind except (legacy code)
"G004", # Logging f-strings (standard in this repo)
"PTH123", # open() is fine in legacy
"PTH101", # os.chmod() is fine in legacy
"S608", # SQL injection false positives (verified)
"S311", # random is fine for non-crypto
"TRY300", # else block suggestions (too noisy)
"PERF203", # try-except in loops (needed for stability)
"A002", # shadowing builtin (next)
"CPY001", # Missing copyright (unnecessary)
"N999", # Invalid module name (hyphen is fine for root dir)
"ARG", # Unused arguments (fine in tests/hooks)
"PLR", # Complexity rules (too strict for legacy)
"SLF001", # Private member access (fine in tests)
"FBT", # Boolean trap (too strict)
"PT011", # Pytest raises too broad (fine for logic)
"ERA001", # Commented out code (standard in dev)
"B017", # Assert Exception (fine in tests)
"B007", # Loop variable unused (pass)
"E402", # Module level import not at top (needed for path inserts)
"S108", # hardcoded-temp-file (used in tests)
"TC010", # runtime-string-union (type alias issues)
"G002", # logging-percent-format (standard here)
"RUF002", # ambiguous-unicode-character-docstring (cyrillic)
"RUF003", # ambiguous-unicode-character-comment (cyrillic)
"PERF401", # manual-list-comprehension (noisy)
"C901", # complex-structure (needed for some logic)
"N806", # non-lowercase-variable-in-function (standard)
"PLW0603", # global-statement (used in some places)
"S603", # subprocess-untrusted-input (demo only)
"RUF012", # mutable-class-default (standard in pydantic/legacy)
"PLW2901", # loop-variable-overwritten (noisy)
"RUF006", # asyncio-task-no-reference (noisy in this setup)
"S324", # hashlib-insecure-hash-function (used for cache)
"DTZ005", # datetime-now-without-tz (legacy)
"PTH", # pathlib-recommendations (legacy)
"W291", # trailing-whitespace (noisy in docs/tests)
"PT", # pytest-recommendations (noisy)
"F811", # redefinition-of-unused (common in tests)
"N817", # camelcase-as-acronym (standard for MM)
"NPY002", # legacy-numpy-random (standard here)
"B023", # loop-variable-non-binding (standard pattern)
"D100", # Missing docstring in public module (handled by Lucy)
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"D203", # One blank line before class (incompatible with D211)
"D213", # Multi-line docstring summary should start at second line
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/*" = ["S101", "ANN", "D", "SLF001", "PLR", "ARG", "FBT", "PT", "B011", "B023", "B904", "RET504", "TRY", "EM", "S", "PLW", "PLR", "ASYNC240"]
[tool.mypy]
python_version = "3.12"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
check_untyped_defs = true
ignore_missing_imports = false
explicit_package_bases = true
exclude = ["tests", ".venv"]
strict = true
[[tool.mypy.overrides]]
module = [
"yaml.*",
"alembic.*",
"keyring.*",
"sentence_transformers.*",
]
ignore_missing_imports = true
[tool.coverage.run]
omit = ["demo.py", "__main__.py"]
[tool.skylos]
# SKY-D260 (cyrillic homoglyphs) is disabled project-wide: RU text here is
# product data (classification keywords, synonyms, RU morphology) and a
# deliberate language policy, not obfuscated code. Revisit only if a
# homoglyph-attack audit is actually needed.
ignore = ["SKY-D260"]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.uv.sources]
torch = { index = "pytorch-cpu" }