-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
40 lines (30 loc) · 924 Bytes
/
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
# CI
test:
@echo "Running phippy tests..."
pytest --maxfail=1 -vv api/tests
lint: ## Lint python code
@echo "Linting python code..."
flake8 --ignore=E501,W503,F541,E203 api/src/ ui/src/
black --line-length 132 --check api/src/ ui/src/
isort -c api/src/ ui/src/
format: ## Format python code
@echo "Fixing imports..."
@isort --line-length 132 --profile "black" .
@echo "Fixing format..."
@black --line-length 132 .
security: ## Check python code for security issues
@echo "Check python code for security issues..."
bandit -ll -r api/src/ ui/src/
# Development
dev.run:
docker-compose up
dev.fix-code-style:
isort api/src/ ui/src/
black --line-length 120 api/src/ ui/src/
dev.setup:
[ -d venv ] || mkdir venv
[ -f venv/bin/activate ] || python3 -m venv venv
./venv/bin/pip install -r requirements.txt -r api/requirements.txt -r ui/requirements.txt
dev.clean:
[ ! -d venv ] || rm -rf venv
rm -rf