generated from coulomb/repo-seed
51 lines
1.4 KiB
Makefile
51 lines
1.4 KiB
Makefile
.PHONY: help install dev test test-minio lint format type migrate migrate-fresh clean
|
|
|
|
help:
|
|
@echo "artifact-store — make targets"
|
|
@echo " install install / sync dependencies via uv"
|
|
@echo " dev run the FastAPI app with reload (uvicorn)"
|
|
@echo " test run the pytest suite"
|
|
@echo " test-minio run opt-in live MinIO compatibility tests"
|
|
@echo " lint ruff check + ruff format --check"
|
|
@echo " format ruff format (write changes)"
|
|
@echo " type mypy --strict over src and tests"
|
|
@echo " migrate alembic upgrade head"
|
|
@echo " migrate-fresh drop the local SQLite DB and re-run migrations"
|
|
@echo " clean remove caches and build artefacts"
|
|
|
|
install:
|
|
uv sync --all-extras
|
|
|
|
dev:
|
|
uv run uvicorn artifactstore.api.http:app --reload --host 127.0.0.1 --port 8000
|
|
|
|
test:
|
|
uv run pytest
|
|
|
|
test-minio:
|
|
uv run --all-extras pytest tests/integration/test_storage_s3_minio.py -m integration
|
|
|
|
lint:
|
|
uv run ruff check .
|
|
uv run ruff format --check .
|
|
|
|
format:
|
|
uv run ruff format .
|
|
uv run ruff check --fix .
|
|
|
|
type:
|
|
uv run mypy
|
|
|
|
migrate:
|
|
@mkdir -p var
|
|
uv run alembic upgrade head
|
|
|
|
migrate-fresh:
|
|
@rm -f var/artifactstore.db var/artifactstore.db-journal
|
|
@mkdir -p var
|
|
uv run alembic upgrade head
|
|
|
|
clean:
|
|
rm -rf .pytest_cache .mypy_cache .ruff_cache build dist *.egg-info
|
|
find . -type d -name __pycache__ -prune -exec rm -rf {} +
|