-
Notifications
You must be signed in to change notification settings - Fork 90
/
Makefile
55 lines (45 loc) · 1.24 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
46
47
48
49
50
51
52
53
54
55
.PHONY: clean install develop lint test types docs livedocs
JOBS ?= 1
help:
@echo "make"
@echo " clean"
@echo " Remove Python/build artifacts."
@echo " develop"
@echo " Configure development environment for questionary."
@echo " install"
@echo " Install questionary."
@echo " lint"
@echo " Check the code style and apply black formatting."
@echo " test"
@echo " Run the unit tests."
@echo " types"
@echo " Check for type errors using pytype."
@echo " docs"
@echo " Build the documentation."
@echo " livedocs"
@echo " Build the documentation with a live preview for quick iteration."
clean:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
rm -rf build/
rm -rf questionary.egg-info/
rm -rf .mypy_cache/
rm -rf .pytest_cache/
rm -rf dist/
poetry run make -C docs clean
install:
poetry install --with="docs"
develop: install
poetry run pre-commit install
lint:
poetry run pre-commit run -a
test:
poetry run pytest --cov questionary -v
types:
poetry run mypy --version
poetry run mypy questionary
docs:
poetry run make -C docs html
livedocs:
poetry run sphinx-autobuild docs docs/build/html