* refactor(memory): rename package second-brain to memory * refactor(memory): use OpenAI env naming and fix trailing slash * feat(memory): add chunking with env-configurable size and overlap * feat(memory): dedup search results by source in top-K * test(memory): add chunking, batching, dedup, live tests * docs(memory): update README and project map after rename * docs(handoff): add handoff and ADR-032 for memory refactor * docs(handoff): set PR number * fix(ci): reduce index.py complexity to rank A --------- Co-authored-by: opencode-agent <agent@opencode.local>
131 lines
3.2 KiB
TOML
131 lines
3.2 KiB
TOML
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "memory"
|
|
version = "0.1.0"
|
|
description = "Docker-based AI coding assistant with persistent memory"
|
|
readme = "README.md"
|
|
license = "MIT"
|
|
requires-python = ">=3.12"
|
|
authors = [{ name = "slaid098" }]
|
|
keywords = []
|
|
classifiers = [
|
|
"Development Status :: 4 - Beta",
|
|
"Environment :: Console",
|
|
"Intended Audience :: End Users/Desktop",
|
|
"License :: OSI Approved :: MIT License",
|
|
"Operating System :: POSIX :: Linux",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
"Programming Language :: Python :: 3.14",
|
|
]
|
|
|
|
dependencies = [
|
|
"httpx",
|
|
"numpy",
|
|
"tenacity",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=8.0",
|
|
"pytest-cov>=5.0",
|
|
"pytest-timeout>=2.2",
|
|
"mypy>=1.10",
|
|
"ruff>=0.5",
|
|
"xenon>=0.9",
|
|
"pre-commit>=3.7",
|
|
]
|
|
|
|
[project.scripts]
|
|
rag = "src.memory.cli:main"
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/slaid098/opencode-config"
|
|
Repository = "https://github.com/slaid098/opencode-config"
|
|
Issues = "https://github.com/slaid098/opencode-config/issues"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src"]
|
|
|
|
# ── Ruff ──────────────────────────────────────────────────────────────────
|
|
|
|
[tool.ruff]
|
|
target-version = "py312"
|
|
line-length = 100
|
|
src = ["src", "tests"]
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", "W",
|
|
"F",
|
|
"I",
|
|
"B",
|
|
"UP",
|
|
"SIM",
|
|
"C90",
|
|
"PL",
|
|
"RUF",
|
|
"S",
|
|
"TRY",
|
|
"LOG",
|
|
]
|
|
ignore = [
|
|
"S101",
|
|
"S311",
|
|
"RUF001",
|
|
"RUF002",
|
|
"RUF003",
|
|
"TRY003",
|
|
"PLR2004",
|
|
"S106",
|
|
]
|
|
|
|
[tool.ruff.lint.mccabe]
|
|
max-complexity = 10
|
|
|
|
[tool.ruff.lint.pylint]
|
|
max-args = 5
|
|
max-branches = 12
|
|
max-returns = 5
|
|
max-statements = 50
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"tests/*" = ["S101", "PLR2004", "S106", "S603", "S607"]
|
|
".opencode/scripts/*" = ["S603", "S607"]
|
|
|
|
# ── mypy ──────────────────────────────────────────────────────────────────
|
|
|
|
[tool.mypy]
|
|
python_version = "3.12"
|
|
strict = true
|
|
explicit_package_bases = true
|
|
warn_return_any = true
|
|
disallow_untyped_defs = true
|
|
disallow_incomplete_defs = true
|
|
check_untyped_defs = true
|
|
no_implicit_optional = true
|
|
warn_redundant_casts = true
|
|
warn_unused_ignores = true
|
|
|
|
# ── pytest ────────────────────────────────────────────────────────────────
|
|
|
|
[tool.pytest.ini_options]
|
|
addopts = "--cov=src --cov=.opencode/scripts --cov-report=term-missing --cov-fail-under=80 --timeout=120"
|
|
testpaths = ["tests"]
|
|
asyncio_mode = "auto"
|
|
|
|
# ── coverage ──────────────────────────────────────────────────────────────
|
|
|
|
[tool.coverage.run]
|
|
source = ["src", ".opencode/scripts"]
|
|
branch = true
|
|
|
|
[tool.coverage.report]
|
|
exclude_lines = [
|
|
"pragma: no cover",
|
|
"if __name__ == .__main__.:",
|
|
"if TYPE_CHECKING:",
|
|
]
|