-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
35 lines (24 loc) · 841 Bytes
/
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
.PHONY: env style quality final clean
VENV = diachronic-env
export VIRTUAL_ENV := $(abspath ${VENV})
export PATH := ${VIRTUAL_ENV}/bin:${PATH}
${VENV}:
python3 -m venv $@
env: ${VENV} install_req
install_req:
sudo apt-get install swig
pip install --upgrade pip
pip install --upgrade -r requirements.txt
# black --check --line-length 88 --target-version py38
# isort --check-only ./*.py #Remove these, black and isort contradict each other
clean:
find . -type f -name "*.py[co]" -delete
find . -type d -name "__pycache__" -delete
quality:
flake8 --extend-ignore E203, W503 --max-line-length 88 src *.py
#Black compatibilty: https://black.readthedocs.io/en/stable/compatible_configs.html
style:
black --line-length 88 --target-version py38 src *.py
isort src *.py
final: style clean| ${VENV}
pip freeze>requirements.txt