mirror of
https://github.com/LerianStudio/ring
synced 2026-04-21 13:37:27 +00:00
Create utils.py with commonly used functions that were duplicated across artifact_index.py, artifact_query.py, and artifact_mark.py: - get_project_root(): Find project root by locating .ring or .git - get_db_path(): Get database path with directory creation - validate_limit(): Validate argparse limit argument (1-100) This addresses the code review finding of 3x duplication that increased maintenance burden and risk of inconsistent fixes.
13 lines
492 B
Python
13 lines
492 B
Python
"""Artifact Index - SQLite-based indexing and search for Ring artifacts.
|
|
|
|
This package provides:
|
|
- artifact_index.py: Index markdown files into SQLite with FTS5
|
|
- artifact_query.py: Search artifacts with BM25 ranking
|
|
- artifact_mark.py: Mark handoff outcomes
|
|
- utils.py: Shared utilities (get_project_root, get_db_path, validate_limit)
|
|
"""
|
|
|
|
from utils import get_project_root, get_db_path, validate_limit
|
|
|
|
__version__ = "1.0.0"
|
|
__all__ = ["get_project_root", "get_db_path", "validate_limit"]
|