-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
60 lines (48 loc) · 1.17 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
# Note that you should be in your virtual environment of choice before running make
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
MAKEFLAGS += --no-builtin-variables
.DEFAULT_GOAL := all
SHELL := bash
.PHONY: all
all: install-flit install-koza install-dev test
.PHONY: install-flit
install-flit:
pip install flit
.PHONY: install-koza
install-koza: install-flit
flit install --deps production --symlink
.PHONY: install-dev
install-dev: install-flit
flit install --deps develop --symlink
.PHONY: test
test: install-flit install-dev
python -m pytest
.PHONY: build
build:
flit build
.PHONY: publish
publish:
flit publish
.PHONY: clean
clean:
rm -rf `find . -name __pycache__`
rm -f `find . -type f -name '*.py[co]' `
rm -rf .pytest_cache
rm -rf test-output
rm -rf dist
.PHONY: lint
lint:
flake8 --exit-zero --max-line-length 120 koza/ tests/ examples/
black --check --diff koza tests
isort --check-only --diff koza tests
.PHONY: format
format:
autoflake \
--recursive \
--remove-all-unused-imports \
--remove-unused-variables \
--ignore-init-module-imports \
--in-place koza tests examples
isort koza tests examples
black koza tests examples