forked from edanliahovetsky/BLine-GUI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 902 Bytes
/
Makefile
File metadata and controls
40 lines (30 loc) · 902 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
38
39
PYTHON ?= python3
ROOT_DIR := $(shell pwd)
VENV_DIR ?= $(ROOT_DIR)/.venv
ACTIVATE := . $(VENV_DIR)/bin/activate
.PHONY: help install run fmt lint test clean
help:
@echo "Available targets:"
@echo " install - create venv and install requirements"
@echo " run - launch the GUI via main.py"
@echo " fmt - run black and ruff format"
@echo " lint - run ruff lint and mypy"
@echo " test - run pytest suite"
@echo " clean - remove the virtualenv"
$(VENV_DIR)/bin/activate:
$(PYTHON) -m venv $(VENV_DIR)
install: $(VENV_DIR)/bin/activate
$(ACTIVATE) && pip install --upgrade pip
$(ACTIVATE) && pip install -r $(ROOT_DIR)/requirements.txt
run:
./scripts/dev_env.sh
fmt: install
$(ACTIVATE) && black .
$(ACTIVATE) && ruff format .
lint: install
$(ACTIVATE) && ruff check .
$(ACTIVATE) && mypy .
test: install
$(ACTIVATE) && pytest
clean:
rm -rf $(VENV_DIR)