Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
109 lines (88 loc) · 2.5 KB
/
Copy pathMakefile
File metadata and controls
109 lines (88 loc) · 2.5 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
POETRY ?= poetry
all: lint-check build test
build:
@$(POETRY) run maturin develop
.PHONY: install-poetry
install-poetry:
@curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
.PHONY: install-deps
install-deps:
@$(POETRY) install -vv
.PHONY: install
install: install-poetry install-deps
.PHONY: lint-black
lint-black:
@echo "\033[92m< linting using black...\033[0m"
@$(POETRY) run black .
@echo "\033[92m> done\033[0m"
@echo
.PHONY: lint-flake8
lint-flake8:
@echo "\033[92m< linting using flake8...\033[0m"
@$(POETRY) run flake8 capara tests
@echo "\033[92m> done\033[0m"
@echo
.PHONY: lint-isort
lint-isort:
@echo "\033[92m< linting using isort...\033[0m"
@$(POETRY) run isort --recursive .
@echo "\033[92m> done\033[0m"
@echo
.PHONY: lint-mypy
lint-mypy:
@echo "\033[92m< linting using mypy...\033[0m"
@$(POETRY) run mypy --ignore-missing-imports --follow-imports=silent capara tests
@echo "\033[92m> done\033[0m"
@echo
.PHONY: lint-cargo-fmt
lint-cargo-fmt:
@echo "\033[92m< linting using cargo-fmt...\033[0m"
cargo fmt
@echo "\033[92m> done\033[0m"
@echo
.PHONY: lint
lint: lint-cargo-fmt lint-black lint-flake8 lint-isort lint-mypy
.PHONY: lint-check-black
lint-check-black:
@echo "\033[92m< linting using black...\033[0m"
@$(POETRY) run black --check --diff .
@echo "\033[92m> done\033[0m"
@echo
.PHONY: lint-check-flake8
lint-check-flake8:
@echo "\033[92m< linting using flake8...\033[0m"
@$(POETRY) run flake8 capara tests
@echo "\033[92m> done\033[0m"
@echo
.PHONY: lint-check-isort
lint-check-isort:
@echo "\033[92m< linting using isort...\033[0m"
@$(POETRY) run isort --check-only --diff --recursive .
@echo "\033[92m> done\033[0m"
@echo
.PHONY: lint-check-mypy
lint-check-mypy:
@echo "\033[92m< linting using mypy...\033[0m"
@$(POETRY) run mypy --ignore-missing-imports --follow-imports=silent capara tests
@echo "\033[92m> done\033[0m"
@echo
.PHONY: lint-check-clippy
lint-check-clippy:
@echo "\033[92m< linting using clippy...\033[0m"
cargo clippy
@echo "\033[92m> done\033[0m"
@echo
.PHONY: lint-check-rustfmt
lint-check-rustfmt:
@echo "\033[92m< linting using cargo fmt...\033[0m"
cargo fmt --all -- --check
@echo "\033[92m> done\033[0m"
@echo
.PHONY: lint-check
lint-check: lint-check-clippy lint-check-rustfmt lint-check-black lint-check-flake8 lint-check-isort lint-check-mypy
.PHONY: test
test:
@$(POETRY) run pytest
.PHONY: publish
publish:
twine upload --non-interactive --skip-existing target/wheels/*.whl target/wheels/*.tar.gz