forked from long2ice/asynch
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (33 loc) · 944 Bytes
/
Makefile
File metadata and controls
42 lines (33 loc) · 944 Bytes
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
checkfiles = asynch/ tests/ benchmark/
black_opts = -l 100 -t py38
py_warn = PYTHONDEVMODE=1
help:
@echo "asynch development makefile"
@echo
@echo "usage: make <target>"
@echo "Targets:"
@echo " up Ensure dev/test dependencies are updated"
@echo " deps Ensure dev/test dependencies are installed"
@echo " check Checks that build is sane"
@echo " test Runs all tests"
@echo " style Auto-formats the code"
@echo " build Build package"
@echo " clean Clean old build"
up:
@poetry update
deps:
@poetry install --no-root
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)
@pflake8 $(checkfiles)
@bandit -x tests -r $(checkfiles) -s B107
test: deps
$(py_warn) pytest
build: deps clean
@poetry build
clean:
@rm -rf ./dist
ci: check test