-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
76 lines (61 loc) · 1.32 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
.DEFAULT_GOAL := all
black = black --target-version py39 flex
isort = isort --profile black flex
.PHONY: depends
depends:
@echo "Installing OS dependencies..."
@bash ./bin/depends.sh
@echo "Done"
.PHONY: init
init: depends
@echo "Setting up virtual environment in venv/"
@python3 -m venv venv
@echo "Virtual environment complete."
.PHONY: format
format:
$(isort)
$(black)
.PHONY: lint
lint: setup-install
#mypy --show-error-codes --ignore-missing-imports flex
flake8 --ignore=E203,F841,E501,E722,W503 flex
$(isort) --check-only --df
$(black) --check --diff
.PHONY: setup-install
setup-install:
python setup.py install
.PHONY: up
up:
docker compose up -d
.PHONY: stop
stop:
docker compose stop
.PHONY: install
install: depends init
. venv/bin/activate && ( \
pip install -r requirements.txt ; \
python setup.py install ; \
python setup.py clean \
)
.PHONY: update
update: format lint
pip freeze | grep -v flex > requirements.txt
git add setup.py docs bin flex requirements.txt Makefile
git commit --allow-empty -m "Updates"
git push origin main
python setup.py install
git status
.PHONY: docs
docs:
cd docs
make -C docs html
.PHONY: clean
clean:
python setup.py clean
git status
.PHONY: tests
tests: format lint
pytest tests
.PHONY: all
all: format lint update docs install up tests stop clean
git status