-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (47 loc) · 1.65 KB
/
Makefile
File metadata and controls
62 lines (47 loc) · 1.65 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
62
.PHONY: help
help:
@echo "Usage:"
@echo " make dev Run the package with developer settings"
@echo " make prod Run the pacakge with production settings"
@echo " make test CI: Run tests"
@echo " make cov CI: Run test and calculate coverage"
@echo " make check CI: Lint the code"
@echo " make format CI: Format the code"
@echo " make type CI: Check typing"
@echo " make doc Run local documentation server"
@echo " make build Build the package wheel before publishing to Pypi"
@echo " make publish Publish package to Pypi"
@echo " make dockerbuild Build the docker image"
@echo " make dockerrun Run the docker image"
@echo " make allci Run all CI steps (check, format, type, test coverage)"
dev:
uv run modern_python_boilerplate
prod:
uv run modern_python_boilerplate
test:
uv run pytest tests/
cov:
uv run pytest --cov=src/modern_python_boilerplate tests/ --cov-report=term-missing
check:
uv run ruff check $$(git diff --name-only --cached -- '*.py')
format:
uv run ruff format $$(git diff --name-only --cached -- '*.py')
type:
uv run ty check $$(git diff --name-only --cached -- '*.py')
doc:
uvx --with mkdocstrings --with mkdocs-material --with mkdocstrings-python --with mkdocs-include-markdown-plugin mkdocs serve
build:
uv build
publish:
uv publish
commit:
uv run pre-commit
dockerbuild:
docker build -t modern-python-boilerplate:latest .
dockerrun:
docker run --rm modern-python-boilerplate:latest
allci:
$(MAKE) check
$(MAKE) format
$(MAKE) type
$(MAKE) cov