From f6e2982a68c2d69c3eb472f28f0fa854167634eb Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Sat, 11 Jul 2026 02:26:29 +0800 Subject: [PATCH 1/2] test: smoke check QPK risk helper Co-Authored-By: Codex --- .github/workflows/ci.yml | 2 ++ tests/test_uv_dependency_workflow.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6037f4e..c50c422 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,11 +65,13 @@ jobs: set -euo pipefail uv run --no-sync python - <<'PY' from quant_platform_kit.common.port_adapters import CallableNotificationPort, CallablePortfolioPort + from quant_platform_kit.strategy_lifecycle.live_equity import stamp_consecutive_losses_on_snapshot from hk_equity_strategies import resolve_canonical_profile as resolve_hk_canonical_profile from us_equity_strategies import resolve_canonical_profile assert CallableNotificationPort assert CallablePortfolioPort + assert stamp_consecutive_losses_on_snapshot assert resolve_canonical_profile("russell_top50_leader_rotation") == "russell_top50_leader_rotation" assert resolve_hk_canonical_profile("hk_global_etf_tactical_rotation") == "hk_global_etf_tactical_rotation" PY diff --git a/tests/test_uv_dependency_workflow.py b/tests/test_uv_dependency_workflow.py index 6311c0d..bfd85f9 100644 --- a/tests/test_uv_dependency_workflow.py +++ b/tests/test_uv_dependency_workflow.py @@ -20,8 +20,9 @@ def test_ci_docker_and_env_sync_use_uv_lock() -> None: assert lockfile.startswith("version = ") assert "uv sync --frozen --extra test" in ci + assert "from quant_platform_kit.strategy_lifecycle.live_equity import stamp_consecutive_losses_on_snapshot" in ci assert "uv run --no-sync ruff check --exclude external ." in ci - assert "uv run --no-sync python scripts/check_qpk_pin_consistency.py" in ci + assert "uv run --no-sync python external/QuantPlatformKit/scripts/check_qpk_pin_consistency.py" in ci assert "uv sync --frozen --no-dev" in env_sync assert "uv run --no-sync python scripts/build_cloud_run_env_sync_plan.py --json" in env_sync assert "COPY . ." in dockerfile From 922a137a2a0b0250d1fae19823bd0344da722f2b Mon Sep 17 00:00:00 2001 From: Pigbibi <20649888+Pigbibi@users.noreply.github.com> Date: Sat, 11 Jul 2026 02:30:52 +0800 Subject: [PATCH 2/2] chore(deps): align QPK pin to 335c7a22 Co-Authored-By: Codex --- pyproject.toml | 4 ++-- qsl.toml | 2 +- uv.lock | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c1036b6..7652759 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ dependencies = [ "google-cloud-storage", "google-auth", "longport==3.0.23", - "quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@31892425a02242126265ac07a626d98796daa459", + "quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@335c7a22bc3f570bd5705427ccc40172eda6b289", "us-equity-strategies @ git+https://github.com/QuantStrategyLab/UsEquityStrategies.git@17ddb86c72d44b2c7b78ba7a10d8f71b21180166", "hk-equity-strategies @ git+https://github.com/QuantStrategyLab/HkEquityStrategies.git@b6a8ac2ad3c8110b5ea74fb059c8206388d63bcd", ] @@ -61,5 +61,5 @@ include = [ [tool.uv] override-dependencies = [ - "quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@31892425a02242126265ac07a626d98796daa459", + "quant-platform-kit @ git+https://github.com/QuantStrategyLab/QuantPlatformKit.git@335c7a22bc3f570bd5705427ccc40172eda6b289", ] diff --git a/qsl.toml b/qsl.toml index c0e28bc..b830d23 100644 --- a/qsl.toml +++ b/qsl.toml @@ -5,7 +5,7 @@ upgrade_ring = "ring_d" allow_legacy = false [qsl.requires] -quant_platform_kit = "31892425a02242126265ac07a626d98796daa459" +quant_platform_kit = "335c7a22bc3f570bd5705427ccc40172eda6b289" us_equity_strategies = "17ddb86c72d44b2c7b78ba7a10d8f71b21180166" hk_equity_strategies = "b6a8ac2ad3c8110b5ea74fb059c8206388d63bcd" diff --git a/uv.lock b/uv.lock index 30bdd06..02eaf5a 100644 --- a/uv.lock +++ b/uv.lock @@ -17,7 +17,7 @@ resolution-markers = [ ] [manifest] -overrides = [{ name = "quant-platform-kit", git = "https://github.com/QuantStrategyLab/QuantPlatformKit.git?rev=31892425a02242126265ac07a626d98796daa459" }] +overrides = [{ name = "quant-platform-kit", git = "https://github.com/QuantStrategyLab/QuantPlatformKit.git?rev=335c7a22bc3f570bd5705427ccc40172eda6b289" }] [[package]] name = "blinker" @@ -727,7 +727,7 @@ requires-dist = [ { name = "pytest", marker = "extra == 'test'" }, { name = "pytest-cov", marker = "extra == 'test'" }, { name = "pytz" }, - { name = "quant-platform-kit", git = "https://github.com/QuantStrategyLab/QuantPlatformKit.git?rev=31892425a02242126265ac07a626d98796daa459" }, + { name = "quant-platform-kit", git = "https://github.com/QuantStrategyLab/QuantPlatformKit.git?rev=335c7a22bc3f570bd5705427ccc40172eda6b289" }, { name = "requests" }, { name = "ruff", marker = "extra == 'test'" }, { name = "us-equity-strategies", git = "https://github.com/QuantStrategyLab/UsEquityStrategies.git?rev=17ddb86c72d44b2c7b78ba7a10d8f71b21180166" }, @@ -1210,7 +1210,7 @@ wheels = [ [[package]] name = "quant-platform-kit" version = "0.10.0" -source = { git = "https://github.com/QuantStrategyLab/QuantPlatformKit.git?rev=31892425a02242126265ac07a626d98796daa459#31892425a02242126265ac07a626d98796daa459" } +source = { git = "https://github.com/QuantStrategyLab/QuantPlatformKit.git?rev=335c7a22bc3f570bd5705427ccc40172eda6b289#335c7a22bc3f570bd5705427ccc40172eda6b289" } [[package]] name = "requests"