1- # do any initial setup
2- setup :
3- poetry install
1+ .DEFAULT_GOAL = help
42
5- # commands to run after git update
6- update :
3+ bootstrap :
74 poetry install
85
9- # commands as run by CI
10- ci : lint
11- HYPOTHESIS_PROFILE=slow poetry run pytest -vv --cov
12-
13- # launch the interpreter in repl mode
14- repl :
15- poetry run python
6+ # : build the projects output files
7+ build : update
8+ poetry build
169
17- lint :
10+ # : run continuous integration tasks
11+ ci :
1812 poetry run isort --check-only .
1913 poetry run black --check .
20- poetry run pydocstyle
21- poetry run pylint src/conjecture
22- poetry run pylint --disable=missing-function-docstring,duplicate-code tests
23- poetry run mypy --strict --pretty .
14+ HYPOTHESIS_PROFILE=slow poetry run pytest -vvv --mypy --pylint --pydocstyle --cov --typeguard-packages=conjecture,tests src tests
2415
25- # run the tests locally
26- test :
27- poetry run pytest --testdox --cov --cov-report html
16+ clean :
17+ rm -rf .mypy_cache/ .pytest_cache/ .coverage dist
18+
19+ # : open a repl console
20+ console :
21+ poetry run python
22+
23+ docs : update
24+ exit
2825
29- # automatically format codebase to pass linting rules
26+ # : format all source files
3027format :
31- poetry run isort --atomic .
32- poetry run black .
28+ poetry run shed --refactor --py39-plus src/** /* .py tests/** /* .py
29+
30+ # : list avalible make targets
31+ help :
32+ @grep -B1 -E " ^[a-zA-Z0-9_-]+\:([^\=]|$$ )" Makefile \
33+ | grep -v -- -- \
34+ | sed ' N;s/\n/###/' \
35+ | sed -n ' s/^#: \(.*\)###\(.*\):.*/make \2### \1/p' \
36+ | column -t -s ' ###' \
37+ | sort
38+
39+ # : run project server locally
40+ server : update
41+ exit
42+
43+ # : setup the project after a `git clone`
44+ setup : bootstrap
45+
46+ # : run the projects test suite
47+ test :
48+ poetry run pytest -vvv --mypy --pylint --pydocstyle --cov --cov-report term-missing --typeguard-packages=conjecture,tests src tests
49+
50+ # : update the project after a `git pull`
51+ update : bootstrap
3352
34- .PHONY : setup update ci repl test format
53+ .PHONY : bootstrap build ci clean console docs format help server setup test update
0 commit comments