forked from long2ice/fastapi-limiter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (30 loc) · 871 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
checkfiles = fastapi_limiter/ tests/ examples/ conftest.py
black_opts = -l 100 -t py38
py_warn = PYTHONDEVMODE=1
help:
@echo "fastapi-limiter development makefile"
@echo
@echo "usage: make <target>"
@echo "Targets:"
@echo " up Updates dev/test dependencies"
@echo " deps Ensure dev/test dependencies are installed"
@echo " check Checks that build is sane"
@echo " build Build package"
@echo " test Runs all tests"
@echo " style Auto-formats the code"
up:
@poetry update
deps:
@poetry install
style: deps
isort -src $(checkfiles)
black $(black_opts) $(checkfiles)
check: deps
black --check $(black_opts) $(checkfiles) || (echo "Please run 'make style' to auto-fix style issues" && false)
flake8 $(checkfiles)
bandit -x tests -r $(checkfiles)
test: deps
$(py_warn) pytest
build: deps
@poetry build
ci: check test