-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (38 loc) · 1.32 KB
/
Makefile
File metadata and controls
53 lines (38 loc) · 1.32 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
.DEFAULT_GOAL := help
SHELL=/bin/bash
ESCAPE =
RUN=uv run
###### Development
install: install-uv ## Create venv and install dependencies
uv venv
uv sync
install-uv: ## Install the latest uv package
pip install -U uv
install-dev: install ## Install development dependencies
$(RUN) pip install -e ".[dev]"
test: test-static test-unit ## Run tests
test-unit: ## Run unit tests
$(RUN) pytest
test-static: test-lint ## Run static tests
test-lint: ## Run linting
$(RUN) ruff check .
format: ## Format code
$(RUN) ruff check . --fix
###### Release
build: ## Build package with running test
find . -type d -name "dist" -exec rm -rf {} +
uv build
publish: build ## Publish package
uv publish
###### Additional Commands
clean: ## Clean up cache and temporary files
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type d -name ".pytest_cache" -exec rm -rf {} +
find . -type d -name ".ruff_cache" -exec rm -rf {} +
find . -type d -name "build" -exec rm -rf {} +
find . -type d -name "dist" -exec rm -rf {} +
find . -type d -name ".coverage" -exec rm -rf {} +
help: ## Print this help
@grep -E '^([a-zA-Z_-]+:.*?## .*|######* .+)$$' Makefile \
| sed 's/######* \(.*\)/@ $(ESCAPE)[1;31m\1$(ESCAPE)[0m/g' | tr '@' '\n' \
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}'