File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ VENV_PYTHON: =venv/bin/python
2+ SRCS: =$(shell find src tests -name '* .py')
3+
4+ all : test
5+
6+ venv : requirements-test.in requirements.in
7+ rm -rf $@
8+ python -m venv venv
9+ $(VENV_PYTHON ) -m pip install -r $^
10+ # Install dependencies from pyproject.toml
11+ $(VENV_PYTHON) -m pip install -e .
12+
13+ lint : venv .lint
14+ .lint : $(SRCS ) $(TSCS )
15+ $(VENV_PYTHON ) -m flake8 $?
16+ touch $@
17+
18+ static : venv .static
19+ .static : $(SRCS ) $(TSCS )
20+ echo " Code: $( SRCS) "
21+ echo " Test: $( TSCS) "
22+ $(VENV_PYTHON ) -m mypy $^
23+ touch $@
24+
25+ autopep8 :
26+ autopep8 --in-place $(SRCS )
27+
28+ unit : venv
29+ $(VENV_PYTHON ) -m pytest
30+
31+ test : lint static unit
32+
33+ clean :
34+ rm -rf .lint .static
35+ rm -rf .mypy_cache
36+ -find src -type d -name __pycache__ -exec rm -fr " {}" \;
37+
38+ force-clean : clean
39+ rm -rf venv
You can’t perform that action at this time.
0 commit comments