-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
38 lines (31 loc) · 960 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
30
31
32
33
34
35
36
37
38
SHELL := /bin/bash
.PHONY: lint
## Run linting
lint:
pre-commit run --all-files
.PHONY: test
## Run tests
test:
python -m pytest tests/
.PHONY: showcov
## Open the test coverage overview using the default HTML viewer
showcov:
xdg-open htmlcov/index.html || open htmlcov/index.html
.PHONY: install
## Install this repo, plus dev requirements, in editable mode
install:
pip install -r requirements/ci.txt -r requirements/docs.txt -e .
pre-commit install || true # not installed on older python versions
.PHONY: builddocs
## Build documentation using Sphinx
builddocs:
cd docs && make docs
.PHONY: showdocs
## Open the docs using the default HTML viewer
showdocs:
xdg-open docs/_build/html/index.html || open docs/_build/html/index.html
.DEFAULT_GOAL := help
.PHONY: help
## Print Makefile documentation
help:
@perl -0 -nle 'printf("\033[36m %-15s\033[0m %s\n", "$$2", "$$1") while m/^##\s*([^\r\n]+)\n^([\w.-]+):[^=]/gm' $(MAKEFILE_LIST) | sort