Skip to content

Commit 348555e

Browse files
Pigbibicodex
andauthored
docs: make public configuration examples portable (#348)
Co-authored-by: Codex <noreply@openai.com>
1 parent 803c568 commit 348555e

3 files changed

Lines changed: 30 additions & 2 deletions

File tree

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ IBKR_FORCE_RUN=false
2828

2929
# ── Execution Report ──
3030
EXECUTION_REPORT_OUTPUT_DIR=/tmp/quant_runtime_reports
31-
EXECUTION_REPORT_GCS_URI=gs://qsl-runtime-logs-shared/execution-reports
31+
EXECUTION_REPORT_GCS_URI=gs://your-bucket/execution-reports
3232
QSL_EXECUTION_REPORT_GCS_URI=

docs/ibkr_runtime_rollout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Gateway 后端至少放这些字段:
6060
先复制一份出来改成你的真实值:
6161

6262
```bash
63-
cd /Users/lisiyi/Projects/InteractiveBrokersPlatform
63+
cd /path/to/InteractiveBrokersPlatform
6464
cp docs/examples/ibkr-account-groups.paper.json /tmp/ibkr-account-groups.json
6565
```
6666

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
from pathlib import Path
2+
from urllib.parse import urlparse
3+
4+
5+
REPOSITORY_ROOT = Path(__file__).resolve().parents[1]
6+
7+
8+
def test_env_example_uses_portable_execution_report_gcs_uri():
9+
env_example = (REPOSITORY_ROOT / ".env.example").read_text(encoding="utf-8")
10+
uri = next(
11+
line.partition("=")[2]
12+
for line in env_example.splitlines()
13+
if line.startswith("EXECUTION_REPORT_GCS_URI=")
14+
)
15+
parsed = urlparse(uri)
16+
17+
assert parsed.scheme == "gs"
18+
assert parsed.netloc == "your-bucket"
19+
assert parsed.path not in {"", "/"}
20+
21+
22+
def test_runtime_rollout_uses_portable_repository_path():
23+
rollout = (REPOSITORY_ROOT / "docs" / "ibkr_runtime_rollout.md").read_text(
24+
encoding="utf-8"
25+
)
26+
27+
assert "/Users/" not in rollout
28+
assert "cd /path/to/InteractiveBrokersPlatform" in rollout

0 commit comments

Comments
 (0)