-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
45 lines (36 loc) · 1.03 KB
/
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Source: http://clarkgrubb.com/makefile-style-guide
MAKEFLAGS += --warn-undefined-variables
.DEFAULT_GOAL := help
.PHONY: install
install: ## Install package in editable mode
python -m pip install --upgrade pip wheel
python -m pip install --editable ".[dev]"
.PHONY: format
format: ## Format code
black src/ tests/ noxfile.py
isort src/ tests/ noxfile.py
ruff check --fix src/ tests/ noxfile.py
.PHONY: test
test: ## Run the test suite
nox
.PHONY: docs-build
docs-build: ## Build docs
mkdocs build
.PHONY: docs-serve
docs-serve: ## Serve docs
mkdocs serve
.PHONY: build
build: ## Build package
python -m flit build
.PHONY: publish
publish: ## Publish package
python -m flit publish
.PHONY: clean
clean: ## Clean dev artifacts
rm -rf .coverage coverage.xml .mypy_cache/ .nox/ .pytest_cache/ .ruff_cache/ dist/ htmlcov/ site/
# Source: https://www.client9.com/self-documenting-makefiles/
.PHONY: help
help: ## Show help message
@awk -F ':|##' '/^[^\t].+?:.*?##/ {\
printf "\033[36m%-40s\033[0m %s\n", $$1, $$NF \
}' $(MAKEFILE_LIST)