Skip to content

Commit 95d288c

Browse files
committed
Normalize canonical tech snapshot config names
1 parent 4a124f6 commit 95d288c

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "quant-platform-kit"
7-
version = "0.7.11"
7+
version = "0.7.12"
88
description = "Shared broker adapters, domain models, execution ports, and notification utilities for QuantStrategyLab strategies."
99
readme = "README.md"
1010
requires-python = ">=3.9"

src/quant_platform_kit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""QuantPlatformKit public package surface."""
22

3-
__version__ = "0.7.11"
3+
__version__ = "0.7.12"
44

55
from .common.models import (
66
ExecutionReport,

src/quant_platform_kit/common/feature_snapshot.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ def _normalize_contract_version_label(value: object) -> str:
4343
return f"{_normalize_strategy_profile_label(prefix)}{marker}{suffix}"
4444

4545

46+
def _normalize_config_name_label(value: object) -> str:
47+
return _normalize_strategy_profile_label(value)
48+
49+
4650
@dataclass(frozen=True)
4751
class FeatureSnapshotGuardResult:
4852
frame: pd.DataFrame | None
@@ -588,7 +592,7 @@ def load_feature_snapshot_guarded(
588592
),
589593
)
590594

591-
if expected_config_name and str(manifest_payload.get("config_name")).strip() != str(expected_config_name).strip():
595+
if expected_config_name and _normalize_config_name_label(manifest_payload.get("config_name")) != _normalize_config_name_label(expected_config_name):
592596
return FeatureSnapshotGuardResult(
593597
frame=None,
594598
metadata=_build_guard_metadata(

tests/test_feature_snapshot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def resolve_canonical_profile(profile: str | None) -> str:
6262
manifest_path=str(manifest_path),
6363
require_manifest=True,
6464
expected_strategy_profile="qqq_tech_enhancement",
65-
expected_config_name="tech_pullback_cash_buffer",
65+
expected_config_name="qqq_tech_enhancement",
6666
)
6767

6868
self.assertIsNotNone(result.frame)

0 commit comments

Comments
 (0)