-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
79 lines (69 loc) · 2.4 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
SHELL := bash
PYTHON_VERSION := 3.8
install:
{ rm -R venv || echo "" ; } && \
{ python$(PYTHON_VERSION) -m venv venv || py -$(PYTHON_VERSION) -m venv venv ; } && \
{ . venv/bin/activate || venv/Scripts/activate.bat ; } && \
pip install --upgrade pip wheel && \
pip install -c requirements.txt flake8 mypy black tox pytest -e . && \
{ mypy --install-types --non-interactive || echo "" ; } && \
echo "Installation complete"
ci-install:
{ python3 -m venv venv || py -3 -m venv venv ; } && \
{ . venv/bin/activate || venv/Scripts/activate.bat ; } && \
python3 -m pip install --upgrade pip wheel && \
pip install -c requirements.txt tox -e . && \
echo "Installation complete"
reinstall:
{ rm -R venv || echo "" ; } && \
{ python$(PYTHON_VERSION) -m venv venv || py -$(PYTHON_VERSION) -m venv venv ; } && \
{ . venv/bin/activate || venv/Scripts/activate.bat ; } && \
pip install --upgrade pip wheel && \
pip install flake8 mypy black tox pytest isort -e . && \
{ mypy --install-types --non-interactive || echo "" ; } && \
make requirements && \
echo "Installation complete"
editable:
{ . venv/bin/activate || venv/Scripts/activate.bat ; } && \
daves-dev-tools install-editable --upgrade-strategy eager -ed . && \
make upgrade
clean:
{ . venv/bin/activate || venv/Scripts/activate.bat ; } && \
daves-dev-tools uninstall-all\
-e .\
-e pyproject.toml\
-e tox.ini\
-e requirements.txt && \
daves-dev-tools clean
distribute:
{ . venv/bin/activate || venv/Scripts/activate.bat ; } && \
daves-dev-tools distribute --skip-existing
upgrade:
{ . venv/bin/activate || venv/Scripts/activate.bat ; } && \
daves-dev-tools requirements freeze\
-nv '*' . pyproject.toml tox.ini \
> .requirements.txt && \
pip install --upgrade --upgrade-strategy eager\
-r .requirements.txt && \
rm .requirements.txt && \
make requirements
requirements:
{ . venv/bin/activate || venv/Scripts/activate.bat ; } && \
daves-dev-tools requirements update\
-i more-itertools -aen all\
setup.cfg pyproject.toml tox.ini && \
daves-dev-tools requirements freeze\
-e pip\
-e wheel\
. pyproject.toml tox.ini\
> requirements.txt
# Run all tests
test:
{ . venv/bin/activate || venv/Scripts/activate.bat ; } && \
if [[ "$$(python -V)" = "Python $(PYTHON_VERSION)."* ]] ;\
then tox -r -p -o ;\
else tox -r -e pytest ;\
fi
format:
{ . venv/bin/activate || venv/Scripts/activate.bat ; } && \
isort . && black . && flake8 && mypy