-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
93 lines (70 loc) · 1.71 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
.EXPORT_ALL_VARIABLES:
POETRY ?= poetry
POETRY_INSTALLER_URL ?= https://install.python-poetry.org
.PHONY: install-poetry
install-poetry:
curl -sSL $(POETRY_INSTALLER_URL) | python3
$(POETRY) --version
.PHONY: install-packages
install-packages:
$(POETRY) install -vv $(opts)
.PHONY: install-pre-commit-hooks
install-pre-commit-hooks:
ifeq ($(opts),)
$(POETRY) run pre-commit install
endif
.PHONY: uninstall-pre-commit-hooks
uninstall-pre-commit-hooks:
ifeq ($(opts),)
$(POETRY) run pre-commit uninstall
endif
.PHONY: lock-packages
lock-packages:
$(POETRY) lock -vv --no-update
.PHONY: update-packages
update-packages:
$(POETRY) update -vv
.PHONY: lint-black
lint-black:
$(POETRY) run black --check --diff .
.PHONY: lint-flake8
lint-flake8:
$(POETRY) run flake8
.PHONY: lint-isort
lint-isort:
$(POETRY) run isort --check-only --diff .
.PHONY: lint-mypy
lint-mypy:
$(POETRY) run mypy
.PHONY: lint-python
lint-python: lint-black lint-flake8 lint-isort lint-mypy
.PHONY: lint
lint: lint-python
.PHONY: fmt-black
fmt-black:
$(POETRY) run black .
.PHONY: fmt-isort
fmt-isort:
$(POETRY) run isort .
.PHONY: fmt
fmt: fmt-black fmt-isort
.PHONY: test
test:
$(POETRY) run python -m pytest -v $(opts) $(call tests,.)
.PHONY: build
build:
$(POETRY) build
# $(POETRY) build -f sdist # build source distribution only
.PHONY: publish
publish:
$(POETRY) publish
.PHONY: run-axon-server
run-axon-server:
export PATH="/usr/local/opt/openjdk@11/bin:$$PATH"; ~/AxonServer-4.5.11/axonserver.jar
.PHONY: start-axon-server
start-axon-server:
docker run -d --name my-axon-server -p 8024:8024 -p 8124:8124 axoniq/axonserver axonserver
.PHONY: stop-axon-server
stop-axon-server:
docker stop my-axon-server
docker rm my-axon-server