-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
93 lines (71 loc) · 2.43 KB
/
Makefile
File metadata and controls
93 lines (71 loc) · 2.43 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
.PHONY: help install install-dev clean test lint format run train evaluate backtest hpo figures all
help:
@echo "Available commands:"
@echo " make install - Install dependencies"
@echo " make install-dev - Install development dependencies"
@echo " make clean - Remove build artifacts and cache"
@echo " make test - Run unit tests"
@echo " make lint - Run code linting (flake8)"
@echo " make format - Format code with black and isort"
@echo " make run - Run Streamlit application"
@echo " make train - Train models"
@echo " make evaluate - Evaluate models"
@echo " make backtest - Run backtesting"
@echo " make hpo - Run hyperparameter optimization"
@echo " make figures - Generate all documentation figures"
@echo " make all - Run complete pipeline (train + evaluate + figures)"
install:
pip install -r requirements.txt
install-dev:
pip install -r requirements.txt
pip install pytest pytest-cov black flake8 mypy isort
clean:
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -delete
find . -type d -name "*.egg-info" -exec rm -rf {} +
find . -type d -name ".pytest_cache" -exec rm -rf {} +
find . -type d -name ".mypy_cache" -exec rm -rf {} +
find . -type f -name ".coverage" -delete
find . -type d -name "htmlcov" -exec rm -rf {} +
find . -type d -name "build" -exec rm -rf {} +
find . -type d -name "dist" -exec rm -rf {} +
test:
python -m pytest tests/ -v --cov=src --cov-report=html --cov-report=term-missing
lint:
flake8 src/ tests/ --max-line-length=100 --exclude=__pycache__
mypy src/ --ignore-missing-imports
format:
black src/ tests/ utils/ --line-length=100
isort src/ tests/ utils/ --profile black
run:
python run_project.py
train:
python train.py
train-all:
python train_all_tickers.py
train-bnn:
python train_bnn.py
evaluate:
python evaluate.py
backtest:
python backtest.py
hpo:
python hparam_search.py
figures:
python utils/generate_figures.py
python utils/generate_hpo_table.py
python utils/generate_indicators_table.py
all: train evaluate figures
@echo "Complete pipeline executed successfully!"
docker-build:
docker build -t financial-ts-forecasting .
docker-run:
docker run -p 8501:8501 financial-ts-forecasting
setup:
pip install -e .
package:
python setup.py sdist bdist_wheel
upload-test:
python -m twine upload --repository testpypi dist/*
upload:
python -m twine upload dist/*