-
Notifications
You must be signed in to change notification settings - Fork 58
/
Makefile
58 lines (44 loc) · 1.35 KB
/
Makefile
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
export TERMINAL_WIDTH=132
.PHONY: install
install: ## Install the environment and the pre-commit hooks
@uv run pre-commit install
.PHONY: check
check: ## Run code quality tools.
@uv lock
@uv run pre-commit run -a
@uv run deptry .
.PHONY: check-all
check-all: ## Run code quality tools.
@uv lock
@uv run pre-commit run --hook-stage manual -a
@uv run deptry .
.PHONY: mypy
mypy: ## Run mypy
@uv run mypy
.PHONY: test
test: ## Test the code with pytest
@uv run pytest --cov --cov-config=pyproject.toml --cov-report=xml --junitxml=junit.xml
.PHONY: build
build: clean-build ## Build wheel file
@uvx --from build pyproject-build --installer uv
.PHONY: clean-build
clean-build: ## clean build artifacts
@rm -rf dist
.PHONY: publish
publish: ## publish a release to pypi.
@uvx twine upload dist/*
.PHONY: build-and-publish
build-and-publish: build publish ## Build and publish.
.PHONY: docs-test
docs-test: ## Test if documentation can be built without warnings or errors
@uv run mkdocs build -s
.PHONY: docs
docs: ## Build and serve the documentation
@uv run mkdocs serve
.PHONY: publish-docs
publish-docs: ## Publish the documentation to github pages
@uv run mkdocs gh-deploy --force
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help