generated from coulomb/repo-seed
Lands the smallest credible foundation per ADR-0005:
- pyproject.toml: hatchling build, runtime deps (FastAPI, uvicorn, SQLAlchemy 2.0,
asyncpg, aiosqlite, alembic, blake3, cbor2, typer, structlog, pydantic,
pydantic-settings); dev deps (pytest, pytest-asyncio, httpx, hypothesis, ruff,
mypy); ruff + mypy --strict + pytest configured.
- uv.lock committed.
- Makefile thin shims: install / dev / test / lint / format / type / migrate / clean.
- src/artifactstore/ package skeleton with placeholder __init__.py per concern:
identity, manifest, events, retention, audit, storage, dataplane, registry,
api/http (minimal FastAPI app, GET / scaffold banner), cli (typer app with
version subcommand), config (pydantic-settings).
- tests/{unit,integration}/conftest.py present; unit smoke tests assert package
imports, HTTP root route, CLI version round-trip, settings defaults.
- .env.example documents ARTIFACTSTORE_DATABASE_URL,
ARTIFACTSTORE_STORAGE_LOCAL_ROOT, ARTIFACTSTORE_LOG_LEVEL.
- README updated with install / dev / test instructions.
- .gitignore: claude local state, local runtime data (var/, sqlite db).
make lint && make type && make test pass on a clean checkout (4 tests, 20
source files type-clean under mypy --strict).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
36 lines
1.0 KiB
Python
36 lines
1.0 KiB
Python
"""Smoke tests asserting the scaffold imports cleanly."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typer.testing import CliRunner
|
|
|
|
import artifactstore
|
|
from artifactstore.api.http import app as http_app
|
|
from artifactstore.cli import app as cli_app
|
|
from artifactstore.config import Settings, get_settings
|
|
|
|
|
|
def test_package_version_exposed() -> None:
|
|
assert isinstance(artifactstore.__version__, str)
|
|
assert artifactstore.__version__
|
|
|
|
|
|
def test_http_app_root_route_registered() -> None:
|
|
routes = {getattr(r, "path", None) for r in http_app.routes}
|
|
assert "/" in routes
|
|
|
|
|
|
def test_cli_version_command_round_trips() -> None:
|
|
runner = CliRunner()
|
|
result = runner.invoke(cli_app, ["version"])
|
|
assert result.exit_code == 0, result.output
|
|
assert artifactstore.__version__ in result.output
|
|
|
|
|
|
def test_settings_defaults_loadable() -> None:
|
|
settings = get_settings()
|
|
assert isinstance(settings, Settings)
|
|
assert settings.log_level
|
|
assert settings.database_url
|
|
assert settings.storage_local_root
|