-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (27 loc) · 746 Bytes
/
Makefile
File metadata and controls
36 lines (27 loc) · 746 Bytes
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
.PHONY: install run demo test docker-build docker-run analyze clean
install:
pip install -r requirements.txt
demo:
python analyzer.py demo
analyze:
@echo "Usage: make analyze FILE=path/to/logfile.log"
@if [ -z "$(FILE)" ]; then \
echo "Example: make analyze FILE=sample_logs/error.log"; \
python analyzer.py demo; \
else \
python analyzer.py analyze $(FILE); \
fi
test:
pytest tests/ -v
docker-build:
docker-compose build
docker-run:
docker-compose up
docker-demo:
docker build -t log-analyzer . && docker run --rm log-analyzer python analyzer.py demo
deploy-local:
make docker-run
clean:
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null
find . -type f -name '*.pyc' -delete 2>/dev/null
rm -rf reports/