Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM mcr.microsoft.com/devcontainers/python:3.11

RUN pip install --upgrade pip setuptools wheel
27 changes: 0 additions & 27 deletions .devcontainer/dev.Dockerfile

This file was deleted.

28 changes: 10 additions & 18 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
{
"name": "trading-platform devcontainer",
"dockerComposeFile": [
"../docker-compose.yaml",
"../docker-compose.override.yaml"
],
"service": "app",
"workspaceFolder": "/workspace/trading-platform",
"remoteUser": "root",
"name": "Trading Platform Dev",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},

"postCreateCommand": "pip install -e .[dev]",

"customizations": {
"vscode": {
"settings": {
"python.defaultInterpreterPath": "/opt/venv/bin/python",
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": [
"tests"
]
},
"extensions": [
"ms-python.python",
"ms-python.debugpy"
]
}
},
"postCreateCommand": "/bin/bash scripts/post-create.sh"
}
}
}
5 changes: 0 additions & 5 deletions docker-compose.override.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions docker-compose.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions examples/local/backtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@

import argparse
import json
import sys
from pathlib import Path
from typing import TYPE_CHECKING

# Enable importing plugin-style modules outside the core package (e.g. examples/)
if __name__ == "__main__" or True:
PROJECT_ROOT = Path(__file__).resolve().parents[2]
sys.path.insert(0, str(PROJECT_ROOT))

if TYPE_CHECKING:
from trading_platform import BacktestResult

Expand Down
10 changes: 5 additions & 5 deletions examples/local/local.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"engine": {
"initial_snapshot": null,
"data_files": [
"/workspace/trading-platform/tests/data/parts/part-000.npz",
"/workspace/trading-platform/tests/data/parts/part-001.npz",
"/workspace/trading-platform/tests/data/parts/part-002.npz"
"/workspaces/trading-platform/tests/data/parts/part-000.npz",
"/workspaces/trading-platform/tests/data/parts/part-001.npz",
"/workspaces/trading-platform/tests/data/parts/part-002.npz"
],

"instrument": "BTC_USDC-PERPETUAL",
Expand All @@ -32,8 +32,8 @@
"roi_lb": 40000,
"roi_ub": 80000,

"stats_npz_path": "/workspace/trading-platform/tests/data/results/stats.npz",
"event_bus_path": "/workspace/trading-platform/tests/data/results/events.json"
"stats_npz_path": "/workspaces/trading-platform/tests/data/results/stats.npz",
"event_bus_path": "/workspaces/trading-platform/tests/data/results/events.json"
},

"risk": {
Expand Down
Loading