frequenz-cs-reporting 0.4.6__tar.gz → 0.4.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/PKG-INFO +1 -1
- frequenz_cs_reporting-0.4.7/RELEASE_NOTES.md +18 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/app_pages/reporting.py +7 -1
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/views/metric_renderers.py +47 -19
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz_cs_reporting.egg-info/PKG-INFO +1 -1
- frequenz_cs_reporting-0.4.7/src/frequenz_cs_reporting.egg-info/scm_version.json +8 -0
- frequenz_cs_reporting-0.4.6/RELEASE_NOTES.md +0 -18
- frequenz_cs_reporting-0.4.6/src/frequenz_cs_reporting.egg-info/scm_version.json +0 -8
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/.streamlit/config.toml +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/Dockerfile +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/LICENSE +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/MANIFEST.in +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/README.md +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/app.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/pyproject.toml +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/setup.cfg +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/__init__.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/app_pages/__init__.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/app_pages/home.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/app_pages/solar.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/assets/__init__.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/assets/neustrom_background.png +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/assets/neustrom_logo.png +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/components/__init__.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/components/inputs.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/components/plot_charts.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/components/sidebar_inputs.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/components/tables.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/components/ui.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/conftest.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/constants.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/py.typed +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/rep_cs_core/__init__.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/rep_cs_core/config.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/rep_cs_core/page_spec.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/services/__init__.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/services/client_factory.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/services/data_service.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/services/solar_workflow.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/styles/dashboard.css +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/styles/home.css +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/styles/kpi.css +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/styles/plot_card.css +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/templates/dashboard_section_divider.html +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/templates/home_feature_grid.html +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/templates/home_feature_item.html +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/templates/home_footer.html +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/templates/home_hero.html +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/templates/home_logo.html +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/templates/home_stat_item.html +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/templates/home_stats.html +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/ui_resources.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/utils/__init__.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/utils/env.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/utils/time.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/views/__init__.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/views/dashboard.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/views/plot_renderers.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/views/sections.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/views/solar_results.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/views/table_renderers.py +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz_cs_reporting.egg-info/SOURCES.txt +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz_cs_reporting.egg-info/dependency_links.txt +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz_cs_reporting.egg-info/requires.txt +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz_cs_reporting.egg-info/scm_file_list.json +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz_cs_reporting.egg-info/top_level.txt +0 -0
- {frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/toml_directory/__init__.py +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Frequenz CS Reporting Library Release Notes
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Upgrading
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## New Features
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Bug Fixes
|
|
13
|
+
|
|
14
|
+
- Fetch battery SOC data only when the microgrid has a battery component and a configured battery SOC formula.
|
|
15
|
+
- Update the Stromverbrauch bar plot to break down consumption by the sources
|
|
16
|
+
serving local load: grid to consumption, generation to consumption, and
|
|
17
|
+
battery to consumption.
|
|
18
|
+
- Hide the battery KPI section when a microgrid does not include battery components.
|
|
@@ -210,7 +210,13 @@ def render() -> None:
|
|
|
210
210
|
resolution=resolution,
|
|
211
211
|
)
|
|
212
212
|
battery_soc_df = None
|
|
213
|
-
|
|
213
|
+
battery_formula = (
|
|
214
|
+
mcfg.ctype["battery"].formula if "battery" in component_types else None
|
|
215
|
+
)
|
|
216
|
+
has_battery_soc_formula = (
|
|
217
|
+
battery_formula is not None and "BATTERY_SOC_PCT" in battery_formula
|
|
218
|
+
)
|
|
219
|
+
if has_battery_soc_formula:
|
|
214
220
|
try:
|
|
215
221
|
fetched_soc_df = get_microgrid_soc_data(
|
|
216
222
|
microgrid_id=microgrid_id,
|
|
@@ -120,6 +120,7 @@ SECTION_SPECS: list[dict[str, Any]] = [
|
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
"title": "Batteriekennzahlen",
|
|
123
|
+
"required_component_type": "battery",
|
|
123
124
|
"per_row": 3,
|
|
124
125
|
"boxes": [
|
|
125
126
|
{
|
|
@@ -184,6 +185,38 @@ def _materialize_boxes(
|
|
|
184
185
|
return boxes
|
|
185
186
|
|
|
186
187
|
|
|
188
|
+
def _filter_section_box_specs(
|
|
189
|
+
section: dict[str, Any],
|
|
190
|
+
component_type_set: set[str],
|
|
191
|
+
component_types_provided: bool,
|
|
192
|
+
microgrid_id: int | None,
|
|
193
|
+
) -> list[dict[str, Any]]:
|
|
194
|
+
"""Return KPI box specs that apply to the selected microgrid."""
|
|
195
|
+
required_component_type = section.get("required_component_type")
|
|
196
|
+
if (
|
|
197
|
+
component_types_provided
|
|
198
|
+
and required_component_type is not None
|
|
199
|
+
and required_component_type not in component_type_set
|
|
200
|
+
):
|
|
201
|
+
return []
|
|
202
|
+
|
|
203
|
+
box_specs = section["boxes"]
|
|
204
|
+
if component_types_provided:
|
|
205
|
+
box_specs = [
|
|
206
|
+
spec
|
|
207
|
+
for spec in box_specs
|
|
208
|
+
if spec.get("component_type") is None
|
|
209
|
+
or spec.get("component_type") in component_type_set
|
|
210
|
+
]
|
|
211
|
+
|
|
212
|
+
return [
|
|
213
|
+
spec
|
|
214
|
+
for spec in box_specs
|
|
215
|
+
if spec.get("microgrid_ids") is None
|
|
216
|
+
or microgrid_id in spec.get("microgrid_ids", set())
|
|
217
|
+
]
|
|
218
|
+
|
|
219
|
+
|
|
187
220
|
def render_box_grid(
|
|
188
221
|
boxes: list[tuple[str, object]],
|
|
189
222
|
per_row: int = 3,
|
|
@@ -246,13 +279,15 @@ def render_box_grid(
|
|
|
246
279
|
|
|
247
280
|
def _build_consumption_breakdown(metrics: dict[str, Any]) -> dict[str, float | None]:
|
|
248
281
|
"""Prepare data for the percentage bar plot."""
|
|
282
|
+
grid_consumption = metrics.get("grid_consumption_sum") or 0.0
|
|
283
|
+
grid_to_battery = metrics.get("grid_to_battery_sum") or 0.0
|
|
249
284
|
values = {
|
|
250
285
|
"Stromverbrauch (kWh)": metrics.get("mid_consumption_sum"),
|
|
251
|
-
"
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
"
|
|
255
|
-
"
|
|
286
|
+
"Netz zu Verbrauch (kWh)": max(
|
|
287
|
+
float(grid_consumption) - float(grid_to_battery), 0.0
|
|
288
|
+
),
|
|
289
|
+
"Erzeugung zu Verbrauch (kWh)": metrics.get("prod_self_consumption_sum"),
|
|
290
|
+
"Batterie zu Verbrauch (kWh)": metrics.get("battery_to_consumption_sum"),
|
|
256
291
|
}
|
|
257
292
|
return {k: (float(v) if v is not None else 0.0) for k, v in values.items()}
|
|
258
293
|
|
|
@@ -280,6 +315,7 @@ def render_summary_boxes(
|
|
|
280
315
|
return
|
|
281
316
|
|
|
282
317
|
_ensure_kpi_css()
|
|
318
|
+
component_types_provided = component_types is not None
|
|
283
319
|
component_type_set = set(component_types or [])
|
|
284
320
|
|
|
285
321
|
# Section heading
|
|
@@ -294,20 +330,12 @@ def render_summary_boxes(
|
|
|
294
330
|
)
|
|
295
331
|
|
|
296
332
|
for section in SECTION_SPECS:
|
|
297
|
-
box_specs =
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
or spec.get("component_type") in component_type_set
|
|
304
|
-
]
|
|
305
|
-
box_specs = [
|
|
306
|
-
spec
|
|
307
|
-
for spec in box_specs
|
|
308
|
-
if spec.get("microgrid_ids") is None
|
|
309
|
-
or microgrid_id in spec.get("microgrid_ids", set())
|
|
310
|
-
]
|
|
333
|
+
box_specs = _filter_section_box_specs(
|
|
334
|
+
section,
|
|
335
|
+
component_type_set,
|
|
336
|
+
component_types_provided,
|
|
337
|
+
microgrid_id,
|
|
338
|
+
)
|
|
311
339
|
if not box_specs:
|
|
312
340
|
continue
|
|
313
341
|
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Frequenz CS Reporting Library Release Notes
|
|
2
|
-
|
|
3
|
-
## Summary
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Upgrading
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## New Features
|
|
10
|
-
|
|
11
|
-
- Add forecasted grid import cost, grid feed-in revenue, and average day-ahead
|
|
12
|
-
price KPI cards for MID231.
|
|
13
|
-
- Add a separate battery KPI card section with battery flow metrics.
|
|
14
|
-
|
|
15
|
-
## Bug Fixes
|
|
16
|
-
|
|
17
|
-
- Add Battery SOC plot tab only for the applicable cases.
|
|
18
|
-
- Use PSC stack mode for the overview time-series plot.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/conftest.py
RENAMED
|
File without changes
|
{frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/constants.py
RENAMED
|
File without changes
|
{frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/styles/kpi.css
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/utils/env.py
RENAMED
|
File without changes
|
{frequenz_cs_reporting-0.4.6 → frequenz_cs_reporting-0.4.7}/src/frequenz/cs_reporting/utils/time.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|