-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (31 loc) · 935 Bytes
/
Makefile
File metadata and controls
37 lines (31 loc) · 935 Bytes
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
SRC_DIR := mabel
PYTHON := python
UV := $(PYTHON) -m uv
PIP := $(UV) pip
define print_green
@echo "\033[0;32m$(1)\033[0m"
endef
define print_blue
@echo "\033[0;34m$(1)\033[0m"
endef
lint: ## Run all linting tools
$(call print_blue,"Installing linting tools...")
@$(PIP) install --quiet --upgrade pycln isort ruff
$(call print_blue,"Cleaning unused imports...")
@$(PYTHON) -m pycln .
$(call print_blue,"Sorting imports...")
@$(PYTHON) -m isort .
$(call print_blue,"Formatting code...")
@$(PYTHON) -m ruff format $(SRC_DIR)
$(call print_green,"Linting complete!")
update: ## Update all dependencies
$(call print_blue,"Updating dependencies...")
@$(PYTHON) -m pip install --upgrade pip uv
@$(UV) pip install --upgrade -r tests/requirements.txt
@$(UV) pip install --upgrade -r requirements.txt
test:
clear
python -m pytest
coverage:
python -m coverage run -m pytest
python -m coverage report --include=mabel/** -m