2021-07-02 07:21:36 +00:00
|
|
|
VENV = $(PWD)/venv
|
2017-09-21 14:34:26 +00:00
|
|
|
PIP = $(VENV)/bin/pip
|
|
|
|
PYTHON = $(VENV)/bin/python
|
|
|
|
FLASK = $(VENV)/bin/flask
|
2019-08-26 14:06:35 +00:00
|
|
|
ISORT = $(VENV)/bin/isort
|
|
|
|
BLACK = $(VENV)/bin/black
|
2017-09-21 14:34:26 +00:00
|
|
|
|
|
|
|
all: install serve
|
|
|
|
|
|
|
|
install:
|
2018-10-04 08:18:48 +00:00
|
|
|
test -d $(VENV) || python3 -m venv $(VENV)
|
2021-07-02 07:21:36 +00:00
|
|
|
$(PIP) install --upgrade --no-cache pip setuptools -r requirements.txt -r requirements-dev.txt
|
2017-09-21 14:34:26 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -fr $(VENV)
|
|
|
|
|
|
|
|
check-outdated:
|
|
|
|
$(PIP) list --outdated --format=columns
|
|
|
|
|
2017-09-22 09:30:21 +00:00
|
|
|
test:
|
2021-07-02 07:21:36 +00:00
|
|
|
$(PYTHON) -m pytest tests.py afpy/ --flake8 --black --cov=afpy --cov=tests --cov-report=term-missing
|
2017-09-22 09:30:21 +00:00
|
|
|
|
2017-09-21 14:34:26 +00:00
|
|
|
serve:
|
2021-07-02 07:21:36 +00:00
|
|
|
$(PYTHON) run.py
|
2018-10-04 08:36:46 +00:00
|
|
|
|
2021-07-02 07:21:36 +00:00
|
|
|
.PHONY: all install clean check-outdated test serve
|