-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
29 lines (22 loc) · 908 Bytes
/
Makefile
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
VENV_DIR := .venv
all: venv test type-check format
help:
@echo "Available commands:"
@echo " make all - Run all tasks: venv, test, type-check, format"
@echo " make venv - Create a virtual environment and install dependencies"
@echo " make test - Run unittests and check coverage"
@echo " make type-check - Check typing with mypy"
@echo " make format - Format the codebase"
venv:
python3 -m venv $(VENV_DIR) --clear
$(VENV_DIR)/bin/pip install -r requirements-dev.txt
test:
$(VENV_DIR)/bin/python -m coverage run -m unittest --failfast
$(VENV_DIR)/bin/coverage report -m
$(VENV_DIR)/bin/coverage html
type-check:
$(VENV_DIR)/bin/python -m mypy --install-types --non-interactive streamable tests
format:
$(VENV_DIR)/bin/python -m ruff format streamable tests
format-check:
$(VENV_DIR)/bin/python -m ruff format --check streamable tests