Skip to content

Commit 969737b

Browse files
committed
Update to kpi-calculator v0.2.0 with ESDL string loading
- Update dependency from kpi-calculator>=0.1.1 to >=0.2.0 - Use load_from_esdl_string() method for loading ESDL content from string instead of file path (new in v0.2.0)
1 parent 7ae989c commit 969737b

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dependencies = [
2525
"omotes-simulator-core==0.0.28",
2626
"pyesdl==25.7",
2727
"pandas ~= 2.2.2",
28-
"kpi-calculator>=0.1.1",
28+
"kpi-calculator>=0.2.0",
2929
]
3030

3131
[project.optional-dependencies]

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ influxdb==5.3.2
4646
# via omotes-simulator-core
4747
kombu==5.5.4
4848
# via celery
49-
kpi-calculator==0.1.1
49+
kpi-calculator==0.2.0
5050
# via simulator-worker (..\..\pyproject.toml)
5151
lxml==6.0.2
5252
# via pyecore

src/simulator_worker/simulator_worker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ def simulator_worker_task(
143143
else:
144144
system_lifetime = DEFAULT_SYSTEM_LIFETIME_YEARS
145145

146-
# Use KpiManager directly to avoid duplicate ESDL parsing
146+
# Use KpiManager with ESDL string loading (v0.2.0+)
147147
kpi_manager = KpiManager()
148-
kpi_manager.load_from_esdl(input_esdl, timeseries_dataframes=timeseries_by_asset)
148+
kpi_manager.load_from_esdl_string(input_esdl, timeseries_dataframes=timeseries_by_asset)
149149

150150
# Calculate KPIs
151151
kpi_results = kpi_manager.calculate_all_kpis(system_lifetime=system_lifetime)

0 commit comments

Comments
 (0)