-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (30 loc) · 732 Bytes
/
Makefile
File metadata and controls
39 lines (30 loc) · 732 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
VENV_BIN := .venv/bin
PYTHON ?= $(if $(wildcard $(VENV_BIN)/python),$(VENV_BIN)/python,python3)
PIP ?= $(PYTHON) -m pip
PYTEST ?= $(PYTHON) -m pytest
RUFF ?= $(PYTHON) -m ruff
PYRIGHT ?= $(PYTHON) -m pyright
MKDOCS ?= $(PYTHON) -m mkdocs
PRE_COMMIT ?= $(PYTHON) -m pre_commit
BUMP ?= patch
VERSION ?=
.PHONY: install format lint typecheck test build docs release precommit
install:
$(PIP) install -e ".[dev,docs]"
$(PRE_COMMIT) install
format:
$(RUFF) check --fix .
$(RUFF) format .
lint:
$(RUFF) check .
$(RUFF) format --check .
typecheck:
$(PYRIGHT)
test:
$(PYTEST)
build:
$(PYTHON) -m build
docs:
$(MKDOCS) build --strict
release:
$(PYTHON) scripts/release.py $(if $(VERSION),--set $(VERSION),--bump $(BUMP))