-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
74 lines (52 loc) · 1.44 KB
/
Copy pathMakefile
File metadata and controls
74 lines (52 loc) · 1.44 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
MSG ?= Daily practise
install:
#install commands
curl -sSL https://install.python-poetry.org | python3 - &&\
poetry self update &&\
poetry install
format:
#format code
black app/../
lint:
#flake8 or #pylint
pylint -j 4 --rcfile=pylint.rc app/
git:
#git push
git add .
git commit -m "$(MSG)"
git push origin working-tree
cc:
#clearing all pytest cache
find . -type f -name ".coverage.DSs-MacBook-Pro.local*" -exec rm -f {} \;
find . -type d -name ".pytest_cache" -exec rm -r {} +
find . -type f -name ".coverage" -exec rm -r {} +
coverage_for_function:
# This is to check coverage for a given function using pytest
pytest --cov=my_module -k my_function
deletelog:
# Delete the log file
/bin/rm -f app/log/*
source:
source ~/.zshrc
check: format lint
listvenv:
find / -type d -name 'bin' -exec sh -c 'if [ -f "{}/activate" ]; then dirname "{}"; fi' \;
startpg:
brew services start postgresql@15
stoppg:
brew services stop postgresql@15
restartpg:
brew services restart postgresql@15
dcbuild:
docker-compose build
dcup:
docker-compose --env-file app/secrets/.env.docker up
dcdown:
docker-compose down
unittests:
cd app && poetry run python -m pytest --cov --cov-report=term-missing tests/01_unit_tests
integrationtests:
cd app && poetry run python -m pytest --cov --cov-report=term-missing tests/02_integration_tests
test: unittests integrationtests cc
routine: cc deletelog test git cc
all: routine dcbuild dcup