-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (52 loc) · 1.58 KB
/
Makefile
File metadata and controls
67 lines (52 loc) · 1.58 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
.PHONY: help
help: ## Print this help message
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
.PHONY: init
init: ## Locally install all dev dependencies
init:
poetry install
.PHONY: check-format
check-format: ## Check code formatting
poetry run black --check docs mesh2vec scripts tests
.PHONY: format
format: ## Fix code formatting
poetry run black docs mesh2vec scripts tests
.PHONY: lint
lint: ## Lint source files
poetry run pylint docs/examples mesh2vec scripts tests
.PHONY: typecheck
typecheck: ## Typecheck source files
poetry run mypy docs/examples mesh2vec scripts tests
.PHONY: audit
audit: ## Audit project dependencies
poetry run pip-audit
.PHONY: check
check: ## Run all checks
check: check-format lint typecheck audit
.PHONY: doctest
doctest: ## Run doctests
poetry run sphinx-build docs/source build/documentation/ -W -b doctest
.PHONY: unit-test
unit-test: ## Run unit tests
poetry run pytest -s --tb=long tests
.PHONY: test
test: ## Run all tests
test: unit-test doctest
.PHONY: wheel
wheel: ## Build the project wheel
poetry build -f wheel -vvv
.PHONY: check-wheel
check-wheel: ## Build and check the project wheel
check-wheel: wheel
poetry run check-wheel-contents dist/
.PHONY: docs
docs: ## Build documentation
poetry run sphinx-build docs/source build/documentation/ -W -b html
.PHONY: build
build: ## Build all distributables
build: wheel docs