-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (47 loc) · 1.7 KB
/
Copy pathMakefile
File metadata and controls
61 lines (47 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.PHONY: help install test test-unit test-integration coverage db-up db-down lint typecheck fix build deploy clean
.DEFAULT_GOAL := help
help:
@echo "etchdb development targets"
@echo ""
@echo " make install install package + dev deps in a uv venv"
@echo " make test run the full test suite (postgres tests skip if DB is down)"
@echo " make test-unit run only the dialect-neutral unit tests"
@echo " make test-integration bring up postgres, then run integration tests"
@echo " make coverage run the test suite with line-coverage reporting"
@echo " make db-up start the postgres container on localhost:5532"
@echo " make db-down stop and remove the postgres container + volumes"
@echo " make lint check lint + formatting"
@echo " make typecheck run static type checking (ty)"
@echo " make fix auto-format + auto-fix lint"
@echo " make build build sdist + wheel into dist/"
@echo " make deploy build then upload to PyPI (needs UV_PUBLISH_TOKEN)"
@echo " make clean remove build artifacts"
install:
uv sync --extra dev --extra all
test:
uv run pytest
test-unit:
uv run pytest tests/unit -v
test-integration: db-up
uv run pytest tests/integration -v
coverage:
uv run pytest --cov=etchdb --cov-report=term-missing
db-up:
docker compose up -d --wait postgres
@echo "postgres ready on localhost:5532"
db-down:
docker compose down -v
lint:
uv run ruff check .
uv run ruff format --check .
typecheck:
uv run ty check src
fix:
uv run ruff format .
uv run ruff check --fix .
build: clean
uv build
deploy: build
uv publish
clean:
rm -rf dist/ build/ src/*.egg-info