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
40 changes: 31 additions & 9 deletions .github/workflows/drift-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
schedule:
- cron: "0 6 * * *"
workflow_dispatch:
inputs:
strategy_profile:
description: "Optional supported profile for an isolated research/drift run."
required: false
type: string

permissions:
contents: read
Expand All @@ -26,7 +31,7 @@ jobs:
uses: actions/checkout@v6
with:
repository: QuantStrategyLab/QuantPlatformKit
ref: aae333fe8b3fe5aeb32e1ff135ab14ea7db32420
ref: b65ddd6dbacf47d1b4e4eaecf404cd98eddd7a2c
path: external/QuantPlatformKit

- name: Set up Python
Expand Down Expand Up @@ -137,6 +142,7 @@ jobs:
env:
LIFECYCLE_PREFLIGHT_BUNDLE_ROOT: ${{ runner.temp }}/lifecycle-preflight-bundle
MARKET_HISTORY_PATH: ${{ runner.temp }}/snapshot-input/downloaded_price_history.csv
REQUESTED_STRATEGY_PROFILE: ${{ inputs.strategy_profile || '' }}
run: |
set -euo pipefail
python - <<'PY'
Expand All @@ -145,12 +151,27 @@ jobs:
import subprocess
from pathlib import Path

profiles = json.loads(
subprocess.check_output(
["python", "scripts/run_walk_forward_backtest.py", "--list-lifecycle-profiles"],
text=True,
)
)["profiles"]
requested_profile = os.environ.get("REQUESTED_STRATEGY_PROFILE", "").strip()
if requested_profile:
supported_profiles = json.loads(
subprocess.check_output(
["python", "scripts/run_walk_forward_backtest.py", "--list-profiles"],
text=True,
)
)["profiles"]
if requested_profile not in supported_profiles:
raise SystemExit(
f"unsupported targeted lifecycle profile={requested_profile!r}; "
f"supported={sorted(supported_profiles)}"
)
profiles = [requested_profile]
else:
profiles = json.loads(
subprocess.check_output(
["python", "scripts/run_walk_forward_backtest.py", "--list-lifecycle-profiles"],
text=True,
)
)["profiles"]
bundle_root = Path(os.environ["LIFECYCLE_PREFLIGHT_BUNDLE_ROOT"])
market_history = os.environ["MARKET_HISTORY_PATH"]
store_root = bundle_root / "data" / "lifecycle_store"
Expand Down Expand Up @@ -194,7 +215,7 @@ jobs:
contents: read
issues: write
id-token: write
uses: QuantStrategyLab/QuantPlatformKit/.github/workflows/reusable-drift-check.yml@8b8ce3543c04bf12920e38b0f45d2b32a8896580
uses: QuantStrategyLab/QuantPlatformKit/.github/workflows/reusable-drift-check.yml@b65ddd6dbacf47d1b4e4eaecf404cd98eddd7a2c
with:
strategy_domain: us_equity
caller_event_name: ${{ github.event_name }}
Expand All @@ -203,8 +224,9 @@ jobs:
snapshot_checkout_path: external/UsEquitySnapshotPipelines
snapshot_repository_ref: ${{ needs.preflight_backtests.outputs.snapshot_repository_ref }}
ai_gateway_service_url: ${{ vars.AI_GATEWAY_SERVICE_URL }}
quant_platform_kit_ref: 8b8ce3543c04bf12920e38b0f45d2b32a8896580
quant_platform_kit_ref: b65ddd6dbacf47d1b4e4eaecf404cd98eddd7a2c
lifecycle_preflight_artifact: lifecycle-preflight-${{ github.run_id }}-${{ github.run_attempt }}
strategy_profile: ${{ inputs.strategy_profile || '' }}
secrets:
codex_audit_service_url: ${{ secrets.CODEX_AUDIT_SERVICE_URL }}
snapshot_repository_token: ${{ secrets.SNAPSHOT_REPOSITORY_TOKEN || secrets.QSL_REPO_SYNC_TOKEN || github.token }}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ requires-python = ">=3.11"
dependencies = [
"pandas>=2.0",
"pytz>=2024.1",
"quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@8b8ce3543c04bf12920e38b0f45d2b32a8896580",
"quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@b65ddd6dbacf47d1b4e4eaecf404cd98eddd7a2c",
]

[tool.setuptools]
Expand Down
2 changes: 1 addition & 1 deletion qsl.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ bundle = "2026.08.0"
requires = [
"pandas>=2.0",
"pytz>=2024.1",
"quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@8b8ce3543c04bf12920e38b0f45d2b32a8896580",
"quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@b65ddd6dbacf47d1b4e4eaecf404cd98eddd7a2c",
]
10 changes: 7 additions & 3 deletions tests/test_drift_workflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_drift_workflow_wires_real_snapshot_history_and_preflight_bundle() -> No
assert '"conclusion": "success"' in workflow
assert '"QuantStrategyLab/UsEquitySnapshotPipelines"' in workflow
assert "repository: QuantStrategyLab/QuantPlatformKit" in workflow
assert "ref: 8b8ce3543c04bf12920e38b0f45d2b32a8896580" in workflow
assert "ref: b65ddd6dbacf47d1b4e4eaecf404cd98eddd7a2c" in workflow
assert "python -m pip install --no-deps -e external/QuantPlatformKit" in workflow
assert "scripts/run_walk_forward_backtest.py" in workflow
assert '"--list-lifecycle-profiles"' in workflow
Expand All @@ -30,14 +30,18 @@ def test_drift_workflow_wires_real_snapshot_history_and_preflight_bundle() -> No
assert "LIFECYCLE_PREFLIGHT_BUNDLE_ROOT" in workflow
assert "Upload lifecycle preflight artifact" in workflow
assert "actions/upload-artifact@v7" in workflow
assert "uses: QuantStrategyLab/QuantPlatformKit/.github/workflows/reusable-drift-check.yml@8b8ce3543c04bf12920e38b0f45d2b32a8896580" in workflow
assert "uses: QuantStrategyLab/QuantPlatformKit/.github/workflows/reusable-drift-check.yml@b65ddd6dbacf47d1b4e4eaecf404cd98eddd7a2c" in workflow
assert "strategy_domain: us_equity" in workflow
assert "caller_event_name: ${{ github.event_name }}" in workflow
assert "caller_pr_head_repository: ${{ github.event.pull_request.head.repo.full_name || '' }}" in workflow
assert "snapshot_repository: QuantStrategyLab/UsEquitySnapshotPipelines" in workflow
assert "snapshot_checkout_path: external/UsEquitySnapshotPipelines" in workflow
assert "ai_gateway_service_url: ${{ vars.AI_GATEWAY_SERVICE_URL }}" in workflow
assert "lifecycle_preflight_artifact: lifecycle-preflight-${{ github.run_id }}-${{ github.run_attempt }}" in workflow
assert "quant_platform_kit_ref: 8b8ce3543c04bf12920e38b0f45d2b32a8896580" in workflow
assert "quant_platform_kit_ref: b65ddd6dbacf47d1b4e4eaecf404cd98eddd7a2c" in workflow
assert "strategy_profile:" in workflow
assert "REQUESTED_STRATEGY_PROFILE: ${{ inputs.strategy_profile || '' }}" in workflow
assert '"--list-profiles"' in workflow
assert "unsupported targeted lifecycle profile=" in workflow
assert "codex_audit_service_url: ${{ secrets.CODEX_AUDIT_SERVICE_URL }}" in workflow
assert "secrets.SNAPSHOT_REPOSITORY_TOKEN || secrets.QSL_REPO_SYNC_TOKEN || github.token" in workflow
2 changes: 1 addition & 1 deletion tests/test_qsl_compat_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


ROOT = Path(__file__).resolve().parents[1]
QPK_REVISION = "8b8ce3543c04bf12920e38b0f45d2b32a8896580"
QPK_REVISION = "b65ddd6dbacf47d1b4e4eaecf404cd98eddd7a2c"
QPK_URL = (
"quant-platform-kit @ git+https://github.com/QuantStrategyLab/"
f"QuantPlatformKit.git@{QPK_REVISION}"
Expand Down
4 changes: 2 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.