-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (46 loc) · 1.85 KB
/
Makefile
File metadata and controls
51 lines (46 loc) · 1.85 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
########################################################################
# Help
########################################################################
help:
@echo "============================== Commands =============================="
@echo "install - install dependencies"
@echo "clean - clean virtual env and build artifacts"
@echo "format - format code with black and isort"
@echo "lint - lint code with flake8 and mypy"
@echo "help - show this help message"
@echo "======================================================================"
########################################################################
# Commands
########################################################################
install:
@uv sync --all-groups --quiet
format: install
@uv run black -l 79 .
@uv run isort .
lint: install
@uv run flake8 .
@uv run mypy .
########################################################################
# Clean up build artifacts
########################################################################
ifeq ($(OS),Windows_NT)
clean:
@echo Cleaning .mypy_cache directory...
@if exist .mypy_cache (rmdir /S /Q .mypy_cache)
@echo Cleaning .pytest_cache directory...
@if exist .pytest_cache (rmdir /S /Q .pytest_cache)
@echo Cleaning __pycache__ directories...
@powershell -NoProfile -Command "Get-ChildItem -Recurse -Force -Directory -Filter '__pycache__' | Remove-Item -Recurse -Force"
@echo Cleaning .venv directory...
@if exist .venv (rmdir /S /Q .venv)
else
clean:
@echo "Cleaning .mypy_cache directory..."
@rm -rf .mypy_cache
@echo "Cleaning .pytest_cache directory..."
@rm -rf .pytest_cache
@echo "Cleaning __pycache__ directories..."
@find . -type d -name __pycache__ | xargs rm -r
@echo "Cleaning .venv directory..."
@rm -rf .venv
endif