-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
74 lines (61 loc) · 1.84 KB
/
Makefile
File metadata and controls
74 lines (61 loc) · 1.84 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
68
69
70
71
72
73
74
# Required executables
ifeq (, $(shell which python3))
$(error "No python3 on PATH.")
endif
ifeq (, $(shell which poetry))
$(error "No poetry on PATH.")
endif
# Make sure we are running with an explicit encoding
export LC_ALL = C
export LANG = C.UTF-8
# Set configuration folder to venv
export PYPE_CONFIG_FOLDER = $(shell pwd)/.venv/.pype-cli
# Process variables
VERSION = $(shell python3 setup.py --version)
all: clean venv linters-diff package
venv: clean
@echo Initialize virtualenv, i.e., install required packages etc.
poetry install --sync
install:
poetry install --sync
shell:
@echo Initialize virtualenv and open a new shell using it
poetry shell
clean:
@echo Clean project base
find . -type d \
-name ".venv" -o \
-name ".tox" -o \
-name ".ropeproject" -o \
-name ".mypy_cache" -o \
-name ".pytest_cache" -o \
-name "__pycache__" -o \
-iname "*.egg-info" -o \
-name "build" -o \
-name "dist" \
|xargs rm -rfv
linters-edit:
@echo Run code formatting
poetry run isort --sp .isort.cfg ark_sdk_python tests
poetry run black --skip-string-normalization -l 140 -t py38 ark_sdk_python tests
linters-diff:
@echo Run code formatting
poetry run pylint --disable=R,C --rcfile .pylintrc ark_sdk_python tests
poetry run isort --check-only --sp .isort.cfg ark_sdk_python tests
poetry run black --check --skip-string-normalization -l 140 -t py38 ark_sdk_python tests
run:
@echo Execute ark-sdk-python directly
poetry run python3 -m ark
test:
@echo Execute Tests
poetry run pytest tests/unit
package:
@echo Package sdk
poetry build --format wheel
poetry run scripts/wheel_editor.sh dist/ark_sdk_python*x86_64.whl
publish-test:
@echo Release to test.pypi.org and create git tag
poetry run twine upload -r testpypi --skip-existing dist/*
publish:
@echo Release to pypi.org and create git tag
poetry run twine upload --skip-existing dist/*