-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
63 lines (44 loc) · 1.3 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
SETTINGS := postgres
ALGONAUT_SETTINGS_D := settings:algonaut_tests/settings/$(SETTINGS)
all: format flake mypy test
lint: venv/bin/pylint
venv/bin/pylint -E algonaut
flake: venv/bin/autoflake
venv/bin/autoflake --remove-all-unused-imports -i algonaut/**/*.py
venv/bin/autoflake --remove-unused-variables -i algonaut/**/*.py
venv/bin/autoflake:
make requirements
venv/bin/pylint:
make requirements
venv/bin/black:
make requirements
venv/bin/mypy:
make requirements
format: venv/bin/black
venv/bin/black algonaut/
venv/bin/black algonaut_tests/
mypy: venv/bin/mypy
venv/bin/mypy algonaut/
venv/bin/mypy algonaut_tests/
venv/bin/pur: venv
venv/bin/pip install pur
update: venv pur
venv/bin/pur -r requirements.txt
venv/bin/pur -r requirements-test.txt
venv/bin/twine: venv
venv/bin/pip install twine
release: twine
venv/bin/python setup.py sdist
venv/bin/twine upload dist/* -u ${TWINE_USER} -p ${TWINE_PASSWORD}
setup: requirements
teardown:
rm -rf venv
rm -rf docs/build/*
venv:
virtualenv --python python3 venv
requirements: venv
venv/bin/pip install -r requirements.txt
venv/bin/pip install -r requirements-test.txt
test:
ALGONAUT_SETTINGS_D=$(ALGONAUT_SETTINGS_D) venv/bin/pytest $(testargs) algonaut_tests
#ALGONAUT_SETTINGS_D=$(ALGONAUT_SETTINGS_D) pytest $(testargs) algonaut/plugins