Skip to content

Commit 29d3a46

Browse files
committed
🐛 fix(make): Fix add env
1 parent dc426a1 commit 29d3a46

File tree

6 files changed

+14
-24
lines changed

6 files changed

+14
-24
lines changed

Makefile

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,34 @@
11
app_root = ./app
2-
app_script = ./scripts
32
tests_src = $(app_root)/tests
43

5-
isort = $(app_script)/format-imports.sh
6-
black = $(app_script)/format.sh
7-
flake8 = flake8 $(app_root) $(tests_src)
84
mypy = mypy $(app_root)
95
mypy_tests = mypy $(app_root) $(tests_src)
10-
lint = $(app_script)/lint.sh
116

12-
.PHONY: format check-format lint mypy mypy-tests test-local test-dev test-dev-cov clean poetry_version version runapp build help init_data
7+
.PHONY: black isort flake8 bandit mypy mypy-tests test test-xml clean poetry_version version runapp build help init_data
138

14-
format:
15-
$(isort)
16-
$(black)
9+
black:
10+
poetry run black $(app_root) --check
1711

18-
check-format:
19-
$(isort) --check-only
20-
$(black) --check
12+
isort:
13+
poetry run isort $(app_root)
2114

22-
lint:
23-
$(lint)
15+
flake8:
16+
poetry run flake8 $(app_root)
17+
18+
bandit:
19+
poetry run bandit $(app_root)
2420

2521
mypy:
2622
$(mypy)
2723

2824
mypy-tests:
2925
$(mypy_tests)
3026

31-
test-local:
32-
pytest $(tests_src) --cov=$(app_root)
33-
34-
test-dev:
35-
pytest $(app_root)
27+
test:
28+
poetry run pytest --cov=$(app_root)
3629

37-
test-dev-cov:
38-
$(app_script)/test-cov-html.sh
39-
@echo "building coverage html"
40-
@echo "opening coverage html in browser"
41-
@open htmlcov/index.html
30+
test-xml:
31+
poetry run pytest --cov=$(app_root) --cov-report=xml
4232

4333
clean:
4434
rm -rf `find . -name __pycache__`

scripts/format-imports.sh

100755100644
File mode changed.

scripts/format.sh

100755100644
File mode changed.

scripts/lint.sh

100755100644
File mode changed.

scripts/test.sh

100755100644
File mode changed.

tests-start.sh

100755100644
File mode changed.

0 commit comments

Comments
 (0)