-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (40 loc) · 1.48 KB
/
Makefile
File metadata and controls
51 lines (40 loc) · 1.48 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
.PHONY: install test coverage format lint clean run-ui build-index docker-build docker-run help
help:
@echo "Higgs-Helper - Makefile Commands"
@echo "================================="
@echo "install - Install all dependencies"
@echo "test - Run test suite"
@echo "coverage - Run tests with coverage report"
@echo "format - Format code with black"
@echo "lint - Run linting (flake8, mypy)"
@echo "clean - Remove build artifacts and cache"
@echo "run-ui - Launch Streamlit UI"
@echo "build-index - Build FAISS search index from corpus"
@echo "docker-build - Build Docker image"
@echo "docker-run - Run Docker container"
install:
pip install -r requirements.txt
test:
pytest tests/ -v
coverage:
pytest tests/ --cov=src --cov-report=html --cov-report=term
format:
black src/ tests/
lint:
flake8 src/ tests/ --max-line-length=100 --extend-ignore=E203,W503
mypy src/ --ignore-missing-imports
clean:
rm -rf __pycache__ .pytest_cache .coverage htmlcov
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
find . -type f -name "*.pyo" -delete
find . -type d -name "*.egg-info" -exec rm -rf {} +
rm -rf build/ dist/
run-ui:
streamlit run src/ui/streamlit_app.py
build-index:
python src/main.py build-index --corpus-path $(CORPUS_PATH) --output-path $(INDEX_PATH)
docker-build:
docker build -t higgs-helper:latest .
docker-run:
docker run -p 8501:8501 --env-file .env higgs-helper:latest