-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
54 lines (41 loc) · 1.16 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
checkfiles = automapper/ tests/
black_opts = -l 100 -t py37
py_warn = PYTHONDEVMODE=1
help:
@echo "Py-Automapper development makefile"
@echo
@echo "usage: make <target>"
@echo "Targets:"
@echo " update Updates dev/test dependencies"
@echo " install Ensure dev/test dependencies are installed"
@echo " style Auto-formats the code"
@echo " flake8 Runs linter on the code"
@echo " mypy Runs mypy on the code for type checks"
@echo " check Auto-fomats and then checks the code"
@echo " test Runs all tests"
@echo " verify Runs code style, check and runs all tests"
@echo " build Produces dist/ package folder"
@echo " publish Publishes package to repository"
@echo " docs [Not-Implemented] Builds the documentation"
update:
@poetry update
install:
@poetry install
style: install
black $(black_opts) $(checkfiles)
flake8: install
flake8 $(checkfiles)
mypy: install
mypy $(checkfiles)
check: style flake8 mypy
test:
@poetry run pytest
verify: check test
build: install
rm -fR dist/
@poetry build
publish: install
@poetry publish
docs: install
rm -fR ./build
sphinx-build -M html docs build