-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (47 loc) · 1.21 KB
/
Makefile
File metadata and controls
59 lines (47 loc) · 1.21 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
SHELL := /bin/bash
## help: print this help message
.PHONY: help
help:
@echo 'Usage:'
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
## init: setup a virtual environment
.PHONY: init
init:
uv venv
. .venv/bin/activate
## install: install project with optional dependencies
.PHONY: install
install:
uv sync --all-extras --group mypy --group test
## install: install pydantic v1
.PHONY: install/pydantic/v1
install/pydantic/v1:
uv pip install pydantic===1.13.0
## install: install pydantic v2
.PHONY: install/pydantic/v2
install/pydantic/v2:
uv pip install -r pyproject.toml install --with=pydantic
## clean: remove virtual environment
.PHONY: clean
clean:
.venv/bin/deactivate
rm -Rf .venv
## test: run tests
.PHONY: test
test:
uv run pytest
.PHONY: test/cover
test/cover:
uv run pytest --cov=src --cov-report=term-missing
## audit: run static analysis tools
.PHONY: audit
audit:
pre-commit run --all && uv run mypy --install-types --non-interactive src/**
## docs/serve: run mkdocs server in development mode
.PHONY: docs/serve
docs/serve:
uv run mkdocs serve
## docs/build: build mkdocs documentation
.PHONY: docs/build
docs/build:
uv run mkdocs build --strict --site-dir dist/html