diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 8837c94..9dde676 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -1,12 +1,48 @@ name: CI -on: push + +on: + push: + branches: [main] + pull_request: + branches: [main] + jobs: test: runs-on: ubuntu-latest steps: - - name: Install + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install dependencies run: | - pip3 install --no-cache-dir -e /app 2>&1 | tail -30 || echo "Exit code: $?" + pip install -e ".[dev]" + + - name: Run linting + run: ruff check src/ + - name: Run tests - run: | - pytest /app/tests/ -v 2>&1 | tail -30 || echo "Exit code: $?" \ No newline at end of file + run: pytest tests/ -v + + build: + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install dependencies + run: pip install -e . + + - name: Verify import + run: python -c "import memory_manager; print(memory_manager.__version__)" + + - name: Verify CLI + run: memory --version diff --git a/pyproject.toml b/pyproject.toml index ef5ebcd..2221bfd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,70 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "memory-manager" +version = "0.1.0" +description = "A centralized memory store for AI coding agents" +readme = "README.md" +requires-python = ">=3.11" +license = {text = "MIT"} +authors = [ + {name = "Agentic Team"} +] +keywords = ["ai", "coding", "memory", "agent", "codebase"] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] + +dependencies = [ + "sqlalchemy>=2.0.25", + "click>=8.1.7", + "textual>=0.50.1", + "fastapi>=0.109.0", + "uvicorn>=0.27.0", + "aiosqlite>=0.19.0", + "pydantic>=2.5.3", + "httpx>=0.26.0", + "python-dotenv>=1.0.0", + "shellingham>=1.1.4", +] + +[project.optional-dependencies] +dev = [ + "pytest>=8.0.0", + "pytest-asyncio>=0.23.0", + "mypy>=1.8.0", + "ruff>=0.2.0", +] + +[project.scripts] +memory = "memory_manager.cli.main:cli" + +[tool.setuptools] +packages = ["memory_manager"] +package-dir = {"" = "src"} + +[tool.pytest.ini_options] +testpaths = ["tests"] +asyncio_mode = "auto" +python_files = ["test_*.py"] + +[tool.mypy] +python_version = "3.11" +warn_return_any = true +warn_unused_configs = true +ignore_missing_imports = true + [tool.ruff] -include = ["snip/**/*.py", "tests/**/*.py"] +target-version = "py311" +line-length = 100 +select = ["E", "F", "I", "N", "W", "UP"] +ignore = ["E501"] -[tool.ruff.lint] -select = ["F", "E", "W"] -ignore = [] - -[tool.ruff.lint.per-file-ignores] -"tests/*" = ["F401"] \ No newline at end of file +[tool.ruff.per-file-ignores] +"__init__.py" = ["F401"]