M6-T03: add pricing profile framework + strategy registry
- app/integrations/pricing: profiles.py (pydantic ManualProfile/TibberProfile, load_profile/list_profiles/validate_values), manual.yaml + tibber.yaml (structure-only, no price values), strategies.py (register/get_strategy, manual dual-tariff + tibber strategies, all Decimal). - tibber strategy matches nearest tibber_price with starts_at <= t0. - tests for profiles + strategies (hand-checked dual-tariff & tibber math).
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
"""Pricing profile framework and strategy registry.
|
||||
|
||||
This package provides:
|
||||
|
||||
- ``profiles``: Pydantic models describing the structure of pricing profiles
|
||||
(``ManualProfile`` / ``TibberProfile``), YAML loaders, and contract-values
|
||||
validation (``load_profile`` / ``list_profiles`` / ``validate_values``).
|
||||
- ``strategies``: A lightweight registry of price-calculation strategies
|
||||
(``register_strategy`` / ``get_strategy``), with built-in implementations for
|
||||
the ``manual`` (fixed dual-tariff) and ``tibber`` (dynamic API) kinds.
|
||||
"""
|
||||
Reference in New Issue
Block a user