-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
53 lines (43 loc) · 1.05 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
PROJECT_FOLDER = 'codegen'
.PHONY: init test help
help:
@echo "init - Setup the repository"
@echo "clean - clean all compiled python files, build artifacts and virtual envs. Run \`make init\` anew afterwards."
@echo "test - run unit tests"
@echo "build - create the application artefact to be deployed to Spark cluster"
@echo "format - auto format"
@echo "help - this command"
init:
cd ${PROJECT_FOLDER}
python3 -m venv .venv
./.venv/bin/python -m pip install --upgrade pip
poetry install
cd ..
test:
cd ${PROJECT_FOLDER}
poetry run pytest -vv tests \
--cov=${PROJECT_FOLDER} \
--cov-config=.coveragerc \
--cov-fail-under=100 \
--cov-report term-missing
cd ..
.PHONY: lint
lint:
cd ${PROJECT_FOLDER}
poetry run black --check .
poetry run flake8 .
poetry run isort --check .
poetry run mypy ${PROJECT_FOLDER} --disallow-untyped-defs
format:
poetry run black .
poetry run isort .
.PHONY: build
build:
cd infrastructure
cdk deploy --profile=Kate
cd ..
.PHONY: diff-infra
diff-infra:
cd infrastructure
cdk diff --profile=Kate
cd ..