summaryrefslogtreecommitdiff
path: root/Makefile
blob: 1aa1e36d720527fed49b51ac7e97fffd615937d2 (plain)
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
ENV_BIN=env/bin

all: run

env:
	python3 -m venv env
	${ENV_BIN}/pip install --upgrade pip pip-tools setuptools
	${ENV_BIN}/pip install -e ".[tests]"
	${ENV_BIN}/pip install -e .

lint:
	pycodestyle ickapi
	pylint -j0 -d missing-docstring ickapi

apitest:
	gunicorn --config gunicorn.conf ickapi.main:app > /dev/null 2>&1 &
	pytest --rootdir=apitest || true
	pkill -F ickapi.pid

test: lint apitest

run:
	gunicorn --config gunicorn.conf --reload ickapi.main:app

clean:
	rm -rf dist/ ickapi.egg-info/
	find . -type f -name "*~" -exec rm -f {} \;
	find . -type d -name "__pycache__" -prune -exec rm -rf {} \;

reset: clean
	rm -rf env/

.PHONY: all env lint apitest test run clean reset