-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (37 loc) · 1.17 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
download_data:
@echo "Downloading data..."
wget https://gist.githubusercontent.com/khuyentran1401/a1abde0a7d27d31c7dd08f34a2c29d8f/raw/da2b0f2c9743e102b9dfa6cd75e94708d01640c9/Iris.csv -O data/raw/iris.csv
setup: initialize_git install download_data
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/xy.pkl: data/raw src/process.py
@echo "Processing data..."
python src/process.py
models/svc.pkl: data/processed/xy.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/xy.pkl models/svc.pkl notebooks/results.ipynb
## Delete all compiled Python files
clean:
find . -type f -name "*.py[co]" -delete
find . -type d -name "__pycache__" -delete
rm -rf .pytest_cache