-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (31 loc) · 1.27 KB
/
Makefile
File metadata and controls
42 lines (31 loc) · 1.27 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
.PHONY: all help venv test type-check format format-check lint lint-check docs
VENV_DIR := .venv
all: venv format lint type-check test docs
qa: format lint type-check
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 unit tests and check coverage"
@echo " make type-check - Check typing via mypy"
@echo " make format - Format via ruff"
@echo " make format-check - Check the formatting via ruff"
@echo " make docs - Build the docs via sphinx
venv:
uv venv $(VENV_DIR) --clear
uv pip install -e ".[dev]"
test:
$(VENV_DIR)/bin/python -m pytest --cov=streamable --cov-report=term-missing --cov-fail-under=100 -sx
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
lint:
$(VENV_DIR)/bin/python -m ruff check streamable tests --fix
lint-check:
$(VENV_DIR)/bin/python -m ruff check streamable tests
docs:
uv pip install -e ".[docs]"
sphinx-build -b html docs docs/_build/html