This repository was archived by the owner on Mar 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (53 loc) · 1.24 KB
/
Makefile
File metadata and controls
67 lines (53 loc) · 1.24 KB
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
PACKAGE_DIR = src/tikkie2
VENV_DIR = .venv
BIN = $(VENV_DIR)/bin
.PHONY: black
black:
$(BIN)/black ${PACKAGE_DIR} tests
.PHONY: black-check
black-check:
$(BIN)/black ${PACKAGE_DIR} tests --check
.PHONY: build
build: clean
$(BIN)/pip install wheel
python setup.py sdist bdist_wheel
.PHONY: clean
clean:
find . -name '*.pyc' -delete
find . -name '__pycache__' -type d | xargs rm -fr
rm -rf dist build src/*.egg-info
.PHONY: flake8
flake8:
$(BIN)/flake8 ${PACKAGE_DIR} tests
.PHONY: install
install:
pyenv install -s
pyenv local
python -m venv $(VENV_DIR)
$(BIN)/pip install -U pip setuptools --quiet
$(BIN)/pip install -U -e .[tests] --quiet
$(BIN)/pre-commit install
.PHONY: isort-check
isort-check:
$(BIN)/isort --check-only ${PACKAGE_DIR} tests
.PHONY: isort-fix
isort-fix:
$(BIN)/isort ${PACKAGE_DIR} tests
.PHONY: mypy
mypy:
$(BIN)/mypy ${PACKAGE_DIR}
.PHONY: test
test:
$(BIN)/pytest tests
.PHONY: upload
upload: build
$(BIN)/pip install twine wheel keyring
$(BIN)/twine upload --repository new10 dist/*
.PHONY: z-ci-test
z-ci-test:
$(BIN)/pytest tests --cov=${PACKAGE_DIR}
.PHONY: z-ci-install
z-ci-install:
python -m venv $(VENV_DIR)
$(BIN)/pip install -U pip setuptools --quiet
$(BIN)/pip install -U -e .[tests] --quiet