-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
executable file
路46 lines (37 loc) 路 1.3 KB
/
Copy pathMakefile
File metadata and controls
executable file
路46 lines (37 loc) 路 1.3 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
.DEFAULT_GOAL := help
.PHONY: init
init: ## Sync the venv from uv.lock
$(info --- 馃枼 Init dependencies ---)
@uv sync --all-extras --frozen
.PHONY: format
format: ## Format the code
$(info --- 馃悕 Check Python format ---)
@uv run pre-commit run -a
.PHONY: typecheck
typecheck: ## Run type checking with ty
$(info --- 馃悕 Type checking Python ---)
@uv run ty check tracarbon/
.PHONY: security
security: ## Run security checks
$(info --- 馃悕 Security Python ---)
@uv run bandit -c pyproject.toml -r .
.PHONY: complexity
complexity: ## Run complexity checks
$(info --- 馃悕 Complexity Python ---)
@uv run radon cc -a tracarbon/
.PHONY: test-unit
test-unit: ## Run unit test
$(info --- 馃悕 Run Python test-unit ---)
@uv run python -m pytest -n auto
.PHONY: check-data
check-data: ## Check data of Tracarbon
$(info --- 馃搷 Checking data ---)
@uv run python scripts/check_data.py
@echo "馃憤"
.PHONY: build-documentation
build-documentation: ## Build documentation with Sphinx
$(info --- 馃摎 Run build of the Sphinx documentation ---)
@uv run sphinx-build -Wn -b html -d ./docs/build/doctrees ./docs/source ./docs/build/html
.PHONY: help
help: ## List the rules
grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'