-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (37 loc) · 1.02 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
initialize_git:
@echo "Initializing git..."
git init
install:
@echo "Installing..."
poetry install
poetry run pre-commit install
activate:
@echo "Activating virtual environment"
poetry shell
setup: initialize_git install
test:
pytest
docs_view:
@echo View API documentation...
PYTHONPATH=src pdoc src --http localhost:8080
docs_save:
@echo Save documentation to docs...
PYTHONPATH=src pdoc src -o docs
data/processed/fruits.pkl: data/raw src/process.py
@echo "Processing data..."
python src/process.py
models/svc.pkl: data/processed/fruits.pkl src/train_model.py
@echo "Training model..."
python src/train_model.py
notebooks/results.ipynb: models/svc.pkl src/run_notebook.py
@echo "Running notebook..."
python src/run_notebook.py
pipeline: data/processed/fruits.pkl models/svc.pkl notebooks/results.ipynb
api:
@echo "Creating an API..."
python src/app.py
## Delete all compiled Python files
clean:
find . -type f -name "*.py[co]" -delete
find . -type d -name "__pycache__" -delete
rm -rf .pytest_cache