-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
34 lines (26 loc) · 1.03 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
# Makefile
SHELL := /bin/bash
define execute_in_env
export PYTHONPATH=. && source venv/bin/activate && $1
endef
create-environment:
@echo ">>> Setting up Venv"
python -m venv venv
install-requirements: create-environment
@echo ">>> Installing requirements."
$(call execute_in_env, pip install -r ./requirements.depends.txt -r ./requirements.other.txt)
$(call execute_in_env, pip install -r ./requirements.depends.txt -t dependencies/python)
install-dev-tools:
@echo ">>> Installing Dev Tools"
$(call execute_in_env, pip install bandit safety ruff pytest pytest-it pytest-cov moto)
security-checks:
@echo ">>> Running security checks"
# $(call execute_in_env, safety scan -r ./requirements.depends.txt -r ./requirements.other.txt)
$(call execute_in_env, bandit -lll */*.py *c/*.py)
check-pep8-compliance:
@echo ">>> Running ruff"
$(call execute_in_env, ruff check src)
$(call execute_in_env, ruff check test)
run-pytest:
@echo ">>> Running pytest"
$(call execute_in_env, pytest --it -vvvrP --cov=src --cov-fail-under=90 test/*)