-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
34 lines (26 loc) · 891 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
all: format test lint typecheck
test: poetry.lock
poetry run pytest --cov -m "not e2e"
format: poetry.lock
# reformat all files
poetry run black .
poetry run isort .
lint: poetry.lock
poetry run flake8
typecheck: poetry.lock
# install type stubs for 3rd party libraries if they're missing but
# available for installation
# https://mypy.readthedocs.io/en/stable/running_mypy.html#library-stubs-not-installed
poetry run mypy --install-types --non-interactive .
# install the project whenever the pyproject.toml file changes,
# using poetry.lock as an indicator of the last time we updated it
poetry.lock: pyproject.toml
poetry install
# update the modification time in case the file doesn't get updated
touch poetry.lock
dev-setup: ci-setup
pre-commit install
ci-setup:
poetry install
autoformat:
fd | entr -c sh -c "echo && make format && make lint && echo_success"