-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
91 lines (74 loc) · 2.48 KB
/
Makefile
File metadata and controls
91 lines (74 loc) · 2.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
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
.PHONY: all run optimize tensorboard test lint format type-check check clean help install install-dev setup-hooks docker-build docker-run docs
all: run
run:
@echo "Running RL Order Execution..."
uv run python main.py
optimize:
@echo "Running Optuna Hyperparameter Tuning..."
uv run python src/rl_order_execution/optimize.py
tensorboard:
@echo "Launching TensorBoard (http://localhost:6006)..."
uv run tensorboard --logdir=runs
test:
@echo "Running tests..."
uv run pytest tests/
lint:
@echo "Checking code style..."
uv run ruff check .
uv run ruff format --check .
type-check:
@echo "Running static type checks..."
uv run mypy src/ tests/
format:
@echo "Formatting code..."
uv run ruff format .
uv run ruff check --fix .
check: lint type-check test
install:
@echo "Syncing dependencies..."
uv sync
install-dev:
@echo "Syncing dev dependencies..."
uv sync --all-extras --dev
setup-hooks:
@echo "Installing pre-commit git hooks..."
uv run pre-commit install
docker-build:
@echo "Building Docker image..."
docker build -t rl-order-execution .
docker-run:
@echo "Running Docker container..."
# Mounts current directory to /app/output to persist plots
docker run --rm -v "$(shell pwd):/app/output" rl-order-execution
docs:
@echo "Updating README configuration table..."
uv run settings-doc generate \
--class rl_order_execution.settings.Settings \
--templates config \
--output-format markdown \
--between "<!-- settings-start -->" "<!-- settings-end -->" \
--update README.md \
--heading-offset 2
@echo "README.md updated."
clean:
@echo "Cleaning up..."
rm -rf .venv
rm -rf __pycache__
rm -f execution_analysis.png
rm -rf runs
help:
@echo "Available commands:"
@echo " make run - Run the simulation"
@echo " make optimize - Run Optuna hyperparameter tuning"
@echo " make tensorboard - Launch TensorBoard server"
@echo " make check - Run all quality checks (lint + type-check + test)"
@echo " make test - Run unit tests"
@echo " make lint - Check code style"
@echo " make type-check - Run static type checking with mypy"
@echo " make format - Auto-format code"
@echo " make docs - Locally update README config table"
@echo " make install - Install base dependencies"
@echo " make install-dev - Install all dev dependencies"
@echo " make docker-build - Build the Docker image"
@echo " make docker-run - Run the Docker container"
@echo " make clean - Remove virtualenv, caches, and plots"