-
Notifications
You must be signed in to change notification settings - Fork 39
/
Makefile
61 lines (46 loc) · 1.41 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
.PHONY: help all setup dev-setup fmt clean distclean maintclean pyfmt black usort tests
all: setup
help:
@echo "konsave helper:"
@echo ""
@echo " - setup: User-level setup"
@echo " - dev-setup: Development setup"
@echo " - fmt: Format the code with pyfmt"
@echo " - clean: Remove all pyc files"
@echo " - distclean: Remove any eggs/builds"
@echo " - maintclean: Remove virtual env and dist files"
@echo ""
setup:
@echo "Setting Up (user)"
@python3 -m venv .venv
@(. .venv/bin/activate && \
pip install -r requirements.txt && \
python -m pip install --upgrade pip \
)
dev-setup: setup
@echo "Setting Up (dev)"
@@(. .venv/bin/activate && pip install -r requirements_dev.txt)
fmt: black pylint
black:
@echo " * Running black"
@black --safe konsave
# TODO: Consider adding this
# usort:
# @echo " * Running usort"
# @usort format konsave
pylint:
@echo " * Running pylint"
@pylint konsave
clean:
@find . -name "*.pyc" -exec rm -f {} \;
@find . -name '__pycache__' -type d | xargs rm -fr
distclean: clean
rm -fr *.egg *.egg-info/ .eggs/ dist/ build/
maintclean: distclean
rm -fr .venv/
# TODO: Consider adding proper type-checking
# typecheck:
# mypy -p yacgtc --strict --no-strict-optional --ignore-missing-imports --install-types
# mypy -p tests --no-strict-optional --ignore-missing-imports --install-types
tests:
python3 ./test.py