frequenz-cs-reporting 0.2.10__tar.gz → 0.4.0__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.2.10 → frequenz_cs_reporting-0.4.0}/PKG-INFO +5 -5
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/RELEASE_NOTES.md +3 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/pyproject.toml +5 -5
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/components/plot_charts.py +5 -2
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/views/dashboard.py +1 -2
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/views/solar_results.py +19 -25
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/views/table_renderers.py +16 -4
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz_cs_reporting.egg-info/PKG-INFO +5 -5
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz_cs_reporting.egg-info/SOURCES.txt +2 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz_cs_reporting.egg-info/requires.txt +4 -4
- frequenz_cs_reporting-0.4.0/src/frequenz_cs_reporting.egg-info/scm_file_list.json +93 -0
- frequenz_cs_reporting-0.4.0/src/frequenz_cs_reporting.egg-info/scm_version.json +8 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/.streamlit/config.toml +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/Dockerfile +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/LICENSE +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/MANIFEST.in +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/README.md +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/app.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/setup.cfg +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/__init__.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/app_pages/__init__.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/app_pages/home.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/app_pages/reporting.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/app_pages/solar.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/assets/__init__.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/assets/neustrom_background.png +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/assets/neustrom_logo.png +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/components/__init__.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/components/inputs.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/components/sidebar_inputs.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/components/tables.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/components/ui.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/conftest.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/constants.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/py.typed +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/rep_cs_core/__init__.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/rep_cs_core/config.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/rep_cs_core/page_spec.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/services/__init__.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/services/client_factory.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/services/data_service.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/services/solar_workflow.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/styles/dashboard.css +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/styles/home.css +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/styles/kpi.css +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/styles/plot_card.css +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/templates/dashboard_section_divider.html +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/templates/home_feature_grid.html +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/templates/home_feature_item.html +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/templates/home_footer.html +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/templates/home_hero.html +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/templates/home_logo.html +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/templates/home_stat_item.html +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/templates/home_stats.html +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/ui_resources.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/utils/__init__.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/utils/env.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/utils/time.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/views/__init__.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/views/metric_renderers.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/views/plot_renderers.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/views/sections.py +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz_cs_reporting.egg-info/dependency_links.txt +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz_cs_reporting.egg-info/top_level.txt +0 -0
- {frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/toml_directory/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: frequenz-cs-reporting
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Streamlit Library for reporting and solar monitoring
|
|
5
5
|
Author-email: Frequenz Energy-as-a-Service GmbH <floss@frequenz.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -20,7 +20,7 @@ Requires-Python: <4,>=3.11
|
|
|
20
20
|
Description-Content-Type: text/markdown
|
|
21
21
|
License-File: LICENSE
|
|
22
22
|
Requires-Dist: css-inline>=0.17.0
|
|
23
|
-
Requires-Dist: frequenz-lib-notebooks<0.
|
|
23
|
+
Requires-Dist: frequenz-lib-notebooks<0.17.0,>=0.16.0
|
|
24
24
|
Requires-Dist: matplotlib>=3.10.6
|
|
25
25
|
Requires-Dist: numpy>=2.3.2
|
|
26
26
|
Requires-Dist: pandas>=2.3.2
|
|
@@ -38,7 +38,7 @@ Requires-Dist: flake8==7.3.0; extra == "dev-flake8"
|
|
|
38
38
|
Requires-Dist: flake8-datetimez==20.10.0; extra == "dev-flake8"
|
|
39
39
|
Requires-Dist: flake8-docstrings==1.7.0; extra == "dev-flake8"
|
|
40
40
|
Requires-Dist: flake8-pyproject==1.2.4; extra == "dev-flake8"
|
|
41
|
-
Requires-Dist: pydoclint==0.
|
|
41
|
+
Requires-Dist: pydoclint==0.9.0; extra == "dev-flake8"
|
|
42
42
|
Requires-Dist: pydocstyle==6.3.0; extra == "dev-flake8"
|
|
43
43
|
Provides-Extra: dev-formatting
|
|
44
44
|
Requires-Dist: black==26.5.1; extra == "dev-formatting"
|
|
@@ -52,7 +52,7 @@ Requires-Dist: mkdocs-literate-nav==0.6.3; extra == "dev-mkdocs"
|
|
|
52
52
|
Requires-Dist: mkdocs-macros-plugin==1.5.0; extra == "dev-mkdocs"
|
|
53
53
|
Requires-Dist: mkdocs-material==9.7.6; extra == "dev-mkdocs"
|
|
54
54
|
Requires-Dist: mkdocstrings[python]==1.0.4; extra == "dev-mkdocs"
|
|
55
|
-
Requires-Dist: mkdocstrings-python==2.0.
|
|
55
|
+
Requires-Dist: mkdocstrings-python==2.0.5; extra == "dev-mkdocs"
|
|
56
56
|
Requires-Dist: frequenz-repo-config[lib]==0.18.0; extra == "dev-mkdocs"
|
|
57
57
|
Provides-Extra: dev-mypy
|
|
58
58
|
Requires-Dist: mypy==2.1.0; extra == "dev-mypy"
|
|
@@ -66,7 +66,7 @@ Requires-Dist: frequenz-repo-config[lib]==0.18.0; extra == "dev-noxfile"
|
|
|
66
66
|
Provides-Extra: dev-pylint
|
|
67
67
|
Requires-Dist: frequenz-cs-reporting[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-pylint"
|
|
68
68
|
Provides-Extra: dev-pytest
|
|
69
|
-
Requires-Dist: pytest==9.1.
|
|
69
|
+
Requires-Dist: pytest==9.1.1; extra == "dev-pytest"
|
|
70
70
|
Requires-Dist: pylint==4.0.6; extra == "dev-pytest"
|
|
71
71
|
Requires-Dist: frequenz-repo-config[extra-lint-examples]==0.18.0; extra == "dev-pytest"
|
|
72
72
|
Requires-Dist: pytest-mock==3.15.1; extra == "dev-pytest"
|
|
@@ -4,11 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
## Upgrading
|
|
6
6
|
|
|
7
|
+
- Updating the minimum frequenz-lib-notebooks requirement to v0.16.0
|
|
7
8
|
|
|
8
9
|
## New Features
|
|
9
10
|
|
|
10
11
|
- Update the radio button navigation for streamlit in deepnote.
|
|
11
12
|
- Add KWK aliases in the line plot.
|
|
12
13
|
- Update the KPIs to german format.
|
|
14
|
+
`- Replace the solar monitoring `Produktionsstatistiken` table with the
|
|
15
|
+
`MicrogridOverviewDashboard` view from `frequenz.lib.notebooks`.
|
|
13
16
|
|
|
14
17
|
## Bug Fixes
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[build-system]
|
|
5
5
|
requires = [
|
|
6
6
|
"setuptools == 82.0.1",
|
|
7
|
-
"setuptools_scm[toml] == 10.0
|
|
7
|
+
"setuptools_scm[toml] == 10.2.0",
|
|
8
8
|
"frequenz-repo-config[lib] == 0.18.0",
|
|
9
9
|
]
|
|
10
10
|
build-backend = "setuptools.build_meta"
|
|
@@ -29,7 +29,7 @@ requires-python = ">= 3.11, < 4"
|
|
|
29
29
|
|
|
30
30
|
dependencies = [
|
|
31
31
|
"css-inline>=0.17.0",
|
|
32
|
-
"frequenz-lib-notebooks>=0.
|
|
32
|
+
"frequenz-lib-notebooks>=0.16.0,<0.17.0",
|
|
33
33
|
"matplotlib>=3.10.6",
|
|
34
34
|
"numpy>=2.3.2",
|
|
35
35
|
"pandas>=2.3.2",
|
|
@@ -54,7 +54,7 @@ dev-flake8 = [
|
|
|
54
54
|
"flake8-datetimez == 20.10.0",
|
|
55
55
|
"flake8-docstrings == 1.7.0",
|
|
56
56
|
"flake8-pyproject == 1.2.4", # For reading the flake8 config from pyproject.toml
|
|
57
|
-
"pydoclint == 0.
|
|
57
|
+
"pydoclint == 0.9.0",
|
|
58
58
|
"pydocstyle == 6.3.0",
|
|
59
59
|
]
|
|
60
60
|
dev-formatting = ["black == 26.5.1", "isort == 8.0.1"]
|
|
@@ -67,7 +67,7 @@ dev-mkdocs = [
|
|
|
67
67
|
"mkdocs-macros-plugin == 1.5.0",
|
|
68
68
|
"mkdocs-material == 9.7.6",
|
|
69
69
|
"mkdocstrings[python] == 1.0.4",
|
|
70
|
-
"mkdocstrings-python == 2.0.
|
|
70
|
+
"mkdocstrings-python == 2.0.5",
|
|
71
71
|
"frequenz-repo-config[lib] == 0.18.0",
|
|
72
72
|
]
|
|
73
73
|
dev-mypy = [
|
|
@@ -88,7 +88,7 @@ dev-pylint = [
|
|
|
88
88
|
"frequenz-cs-reporting[dev-mkdocs,dev-noxfile,dev-pytest]",
|
|
89
89
|
]
|
|
90
90
|
dev-pytest = [
|
|
91
|
-
"pytest == 9.1.
|
|
91
|
+
"pytest == 9.1.1",
|
|
92
92
|
"pylint == 4.0.6", # We need this to check for the examples
|
|
93
93
|
"frequenz-repo-config[extra-lint-examples] == 0.18.0",
|
|
94
94
|
"pytest-mock == 3.15.1",
|
|
@@ -135,6 +135,9 @@ def plot_percentage_bar(
|
|
|
135
135
|
|
|
136
136
|
fig = go.Figure()
|
|
137
137
|
for label, value, pct in seg_with_pct:
|
|
138
|
+
formatted_value = (
|
|
139
|
+
f"{value:,.0f}".replace(",", "X").replace(".", ",").replace("X", ".")
|
|
140
|
+
)
|
|
138
141
|
fig.add_trace(
|
|
139
142
|
go.Bar(
|
|
140
143
|
x=[pct],
|
|
@@ -153,11 +156,11 @@ def plot_percentage_bar(
|
|
|
153
156
|
"color": "#ffffff",
|
|
154
157
|
"family": "Inter, sans-serif",
|
|
155
158
|
},
|
|
156
|
-
|
|
159
|
+
hovertext=[formatted_value],
|
|
157
160
|
hovertemplate=(
|
|
158
161
|
f"<b>{label}</b><br>"
|
|
159
162
|
"Anteil: %{x:.1f}%<br>"
|
|
160
|
-
"Energie: %{
|
|
163
|
+
"Energie: %{hovertext} kWh"
|
|
161
164
|
"<extra></extra>"
|
|
162
165
|
),
|
|
163
166
|
)
|
|
@@ -147,7 +147,6 @@ def build_master_df(
|
|
|
147
147
|
for c in component_types
|
|
148
148
|
if pd.to_numeric(raw_df[c], errors="coerce").fillna(0).sum() != 0
|
|
149
149
|
]
|
|
150
|
-
|
|
151
150
|
master_df = create_energy_report_df(raw_df, component_types, mcfg, mapper)
|
|
152
151
|
return master_df
|
|
153
152
|
|
|
@@ -193,4 +192,4 @@ def render_dashboard(
|
|
|
193
192
|
# --- Tables section---
|
|
194
193
|
st.markdown('<div id="data-export-section"></div>', unsafe_allow_html=True)
|
|
195
194
|
_section_divider("Datentabellen")
|
|
196
|
-
sections.render_data_tabs(master_df, tables)
|
|
195
|
+
sections.render_data_tabs(master_df, tables, mapper)
|
|
@@ -6,12 +6,15 @@
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
|
|
8
8
|
import base64
|
|
9
|
+
import math
|
|
9
10
|
from io import BytesIO
|
|
10
11
|
from typing import Any
|
|
11
12
|
|
|
12
13
|
import matplotlib.pyplot as plt
|
|
13
14
|
import streamlit as st
|
|
14
|
-
from frequenz.lib.notebooks.solar.maintenance.
|
|
15
|
+
from frequenz.lib.notebooks.solar.maintenance.microgrid_dashboard import (
|
|
16
|
+
MicrogridOverviewDashboard,
|
|
17
|
+
)
|
|
15
18
|
from frequenz.lib.notebooks.solar.maintenance.solar_maintenance_app import (
|
|
16
19
|
SolarAnalysisData,
|
|
17
20
|
)
|
|
@@ -19,10 +22,10 @@ from matplotlib.figure import Figure
|
|
|
19
22
|
|
|
20
23
|
|
|
21
24
|
def _render_production_table(plot_data: SolarAnalysisData) -> None:
|
|
22
|
-
"""Render the production statistics
|
|
25
|
+
"""Render the production statistics dashboard, if available.
|
|
23
26
|
|
|
24
|
-
Displays
|
|
25
|
-
|
|
27
|
+
Displays the production statistics using the card-based microgrid overview
|
|
28
|
+
dashboard provided by ``frequenz.lib.notebooks``. If no production table is
|
|
26
29
|
present or it is empty, the function returns without rendering anything.
|
|
27
30
|
|
|
28
31
|
Args:
|
|
@@ -30,35 +33,26 @@ def _render_production_table(plot_data: SolarAnalysisData) -> None:
|
|
|
30
33
|
``production_table_view`` attribute with tabular production statistics.
|
|
31
34
|
|
|
32
35
|
Returns:
|
|
33
|
-
None. The
|
|
36
|
+
None. The dashboard is rendered directly in the Streamlit UI.
|
|
34
37
|
"""
|
|
35
38
|
table_view = getattr(plot_data, "production_table_view", None)
|
|
36
39
|
if table_view is None or table_view.empty:
|
|
37
40
|
return
|
|
38
41
|
|
|
39
42
|
st.markdown("#### Produktionsstatistiken")
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
header_height = 75
|
|
45
|
-
max_height = 600
|
|
46
|
-
|
|
47
|
-
height = min(header_height + len(table_view) * row_height, max_height)
|
|
48
|
-
|
|
49
|
-
scrollable_html = (
|
|
50
|
-
"<style>"
|
|
51
|
-
"table { min-width: 1200px; } "
|
|
52
|
-
"thead th, tbody td { min-width: 150px; } "
|
|
53
|
-
"thead th:first-child, tbody td:first-child { "
|
|
54
|
-
"width: 60px; min-width: 60px; max-width: 80px; }"
|
|
55
|
-
"</style>"
|
|
56
|
-
"<div style='overflow-x: auto;'>"
|
|
57
|
-
f"{styled.data}"
|
|
58
|
-
"</div>"
|
|
43
|
+
dashboard = MicrogridOverviewDashboard(table_view, 1)
|
|
44
|
+
dashboard_html = dashboard.to_html().replace(
|
|
45
|
+
"justify-content: center;",
|
|
46
|
+
"justify-content: flex-start;",
|
|
59
47
|
)
|
|
60
48
|
|
|
61
|
-
|
|
49
|
+
# The notebook implementation uses IPython display(). In Streamlit we need
|
|
50
|
+
# the same generated HTML rendered through the component API instead.
|
|
51
|
+
cards_per_row = 2
|
|
52
|
+
estimated_rows = max(1, math.ceil(len(table_view) / cards_per_row))
|
|
53
|
+
height = min(140 + estimated_rows * 430, 1600)
|
|
54
|
+
|
|
55
|
+
st.components.v1.html(dashboard_html, height=height, scrolling=True)
|
|
62
56
|
|
|
63
57
|
|
|
64
58
|
def _ensure_card_styles() -> None:
|
|
@@ -7,10 +7,16 @@ from __future__ import annotations
|
|
|
7
7
|
|
|
8
8
|
import pandas as pd
|
|
9
9
|
import streamlit as st
|
|
10
|
+
from frequenz.lib.notebooks.reporting.utils.column_mapper import ColumnMapper
|
|
10
11
|
|
|
11
12
|
from frequenz.cs_reporting.components import tables
|
|
12
13
|
from frequenz.cs_reporting.constants import TablesResult
|
|
13
14
|
|
|
15
|
+
_MASTER_DF_DISPLAY_RENAMES = {
|
|
16
|
+
"production_self_use": "Eigenverbrauch",
|
|
17
|
+
"production_self_usage": "Eigenverbrauch Share",
|
|
18
|
+
}
|
|
19
|
+
|
|
14
20
|
|
|
15
21
|
def _round_numeric_columns(df: pd.DataFrame) -> pd.DataFrame:
|
|
16
22
|
"""Return a copy of `df` with number columns rounded to three decimals."""
|
|
@@ -147,11 +153,12 @@ def render_table_section(
|
|
|
147
153
|
st.info(empty_info)
|
|
148
154
|
|
|
149
155
|
|
|
150
|
-
def render_master_df(master_df: pd.DataFrame) -> None:
|
|
156
|
+
def render_master_df(master_df: pd.DataFrame, mapper: ColumnMapper) -> None:
|
|
151
157
|
"""Render the combined master dataframe in an AgGrid table.
|
|
152
158
|
|
|
153
159
|
Args:
|
|
154
160
|
master_df: Processed master dataframe to display.
|
|
161
|
+
mapper: Column mapper for converting canonical names to standard display labels.
|
|
155
162
|
|
|
156
163
|
Returns:
|
|
157
164
|
Streamlit components are rendered directly.
|
|
@@ -159,7 +166,9 @@ def render_master_df(master_df: pd.DataFrame) -> None:
|
|
|
159
166
|
if master_df is not None and not master_df.empty:
|
|
160
167
|
header_cols = st.columns([10, 1])
|
|
161
168
|
header_cols[0].caption("Standardized master dataframe")
|
|
162
|
-
display_df = _round_numeric_columns(
|
|
169
|
+
display_df = _round_numeric_columns(
|
|
170
|
+
mapper.to_display(master_df).rename(columns=_MASTER_DF_DISPLAY_RENAMES)
|
|
171
|
+
)
|
|
163
172
|
master_csv = display_df.to_csv(index=False, sep=";", decimal=",").encode(
|
|
164
173
|
"utf-8"
|
|
165
174
|
)
|
|
@@ -179,12 +188,15 @@ def render_master_df(master_df: pd.DataFrame) -> None:
|
|
|
179
188
|
st.info("Master-DF nicht verfügbar (keine MicrogridConfig).")
|
|
180
189
|
|
|
181
190
|
|
|
182
|
-
def render_data_tabs(
|
|
191
|
+
def render_data_tabs(
|
|
192
|
+
master_df: pd.DataFrame, tables_dict: TablesResult, mapper: ColumnMapper
|
|
193
|
+
) -> None:
|
|
183
194
|
"""Render tabbed data tables for overview and component analyses.
|
|
184
195
|
|
|
185
196
|
Args:
|
|
186
197
|
master_df: Processed master dataframe.
|
|
187
198
|
tables_dict: Mapping of table names to dataframes for each analysis.
|
|
199
|
+
mapper: Column mapper for standardizing Gesamt-Datensatz column names.
|
|
188
200
|
|
|
189
201
|
Returns:
|
|
190
202
|
Streamlit components are rendered directly.
|
|
@@ -219,4 +231,4 @@ def render_data_tabs(master_df: pd.DataFrame, tables_dict: TablesResult) -> None
|
|
|
219
231
|
|
|
220
232
|
if include_master:
|
|
221
233
|
with tabs[-1]:
|
|
222
|
-
render_master_df(master_df)
|
|
234
|
+
render_master_df(master_df, mapper)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: frequenz-cs-reporting
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Streamlit Library for reporting and solar monitoring
|
|
5
5
|
Author-email: Frequenz Energy-as-a-Service GmbH <floss@frequenz.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -20,7 +20,7 @@ Requires-Python: <4,>=3.11
|
|
|
20
20
|
Description-Content-Type: text/markdown
|
|
21
21
|
License-File: LICENSE
|
|
22
22
|
Requires-Dist: css-inline>=0.17.0
|
|
23
|
-
Requires-Dist: frequenz-lib-notebooks<0.
|
|
23
|
+
Requires-Dist: frequenz-lib-notebooks<0.17.0,>=0.16.0
|
|
24
24
|
Requires-Dist: matplotlib>=3.10.6
|
|
25
25
|
Requires-Dist: numpy>=2.3.2
|
|
26
26
|
Requires-Dist: pandas>=2.3.2
|
|
@@ -38,7 +38,7 @@ Requires-Dist: flake8==7.3.0; extra == "dev-flake8"
|
|
|
38
38
|
Requires-Dist: flake8-datetimez==20.10.0; extra == "dev-flake8"
|
|
39
39
|
Requires-Dist: flake8-docstrings==1.7.0; extra == "dev-flake8"
|
|
40
40
|
Requires-Dist: flake8-pyproject==1.2.4; extra == "dev-flake8"
|
|
41
|
-
Requires-Dist: pydoclint==0.
|
|
41
|
+
Requires-Dist: pydoclint==0.9.0; extra == "dev-flake8"
|
|
42
42
|
Requires-Dist: pydocstyle==6.3.0; extra == "dev-flake8"
|
|
43
43
|
Provides-Extra: dev-formatting
|
|
44
44
|
Requires-Dist: black==26.5.1; extra == "dev-formatting"
|
|
@@ -52,7 +52,7 @@ Requires-Dist: mkdocs-literate-nav==0.6.3; extra == "dev-mkdocs"
|
|
|
52
52
|
Requires-Dist: mkdocs-macros-plugin==1.5.0; extra == "dev-mkdocs"
|
|
53
53
|
Requires-Dist: mkdocs-material==9.7.6; extra == "dev-mkdocs"
|
|
54
54
|
Requires-Dist: mkdocstrings[python]==1.0.4; extra == "dev-mkdocs"
|
|
55
|
-
Requires-Dist: mkdocstrings-python==2.0.
|
|
55
|
+
Requires-Dist: mkdocstrings-python==2.0.5; extra == "dev-mkdocs"
|
|
56
56
|
Requires-Dist: frequenz-repo-config[lib]==0.18.0; extra == "dev-mkdocs"
|
|
57
57
|
Provides-Extra: dev-mypy
|
|
58
58
|
Requires-Dist: mypy==2.1.0; extra == "dev-mypy"
|
|
@@ -66,7 +66,7 @@ Requires-Dist: frequenz-repo-config[lib]==0.18.0; extra == "dev-noxfile"
|
|
|
66
66
|
Provides-Extra: dev-pylint
|
|
67
67
|
Requires-Dist: frequenz-cs-reporting[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-pylint"
|
|
68
68
|
Provides-Extra: dev-pytest
|
|
69
|
-
Requires-Dist: pytest==9.1.
|
|
69
|
+
Requires-Dist: pytest==9.1.1; extra == "dev-pytest"
|
|
70
70
|
Requires-Dist: pylint==4.0.6; extra == "dev-pytest"
|
|
71
71
|
Requires-Dist: frequenz-repo-config[extra-lint-examples]==0.18.0; extra == "dev-pytest"
|
|
72
72
|
Requires-Dist: pytest-mock==3.15.1; extra == "dev-pytest"
|
|
@@ -57,5 +57,7 @@ src/frequenz_cs_reporting.egg-info/PKG-INFO
|
|
|
57
57
|
src/frequenz_cs_reporting.egg-info/SOURCES.txt
|
|
58
58
|
src/frequenz_cs_reporting.egg-info/dependency_links.txt
|
|
59
59
|
src/frequenz_cs_reporting.egg-info/requires.txt
|
|
60
|
+
src/frequenz_cs_reporting.egg-info/scm_file_list.json
|
|
61
|
+
src/frequenz_cs_reporting.egg-info/scm_version.json
|
|
60
62
|
src/frequenz_cs_reporting.egg-info/top_level.txt
|
|
61
63
|
toml_directory/__init__.py
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
css-inline>=0.17.0
|
|
2
|
-
frequenz-lib-notebooks<0.
|
|
2
|
+
frequenz-lib-notebooks<0.17.0,>=0.16.0
|
|
3
3
|
matplotlib>=3.10.6
|
|
4
4
|
numpy>=2.3.2
|
|
5
5
|
pandas>=2.3.2
|
|
@@ -21,7 +21,7 @@ flake8==7.3.0
|
|
|
21
21
|
flake8-datetimez==20.10.0
|
|
22
22
|
flake8-docstrings==1.7.0
|
|
23
23
|
flake8-pyproject==1.2.4
|
|
24
|
-
pydoclint==0.
|
|
24
|
+
pydoclint==0.9.0
|
|
25
25
|
pydocstyle==6.3.0
|
|
26
26
|
|
|
27
27
|
[dev-formatting]
|
|
@@ -37,7 +37,7 @@ mkdocs-literate-nav==0.6.3
|
|
|
37
37
|
mkdocs-macros-plugin==1.5.0
|
|
38
38
|
mkdocs-material==9.7.6
|
|
39
39
|
mkdocstrings[python]==1.0.4
|
|
40
|
-
mkdocstrings-python==2.0.
|
|
40
|
+
mkdocstrings-python==2.0.5
|
|
41
41
|
frequenz-repo-config[lib]==0.18.0
|
|
42
42
|
|
|
43
43
|
[dev-mypy]
|
|
@@ -55,7 +55,7 @@ frequenz-repo-config[lib]==0.18.0
|
|
|
55
55
|
frequenz-cs-reporting[dev-mkdocs,dev-noxfile,dev-pytest]
|
|
56
56
|
|
|
57
57
|
[dev-pytest]
|
|
58
|
-
pytest==9.1.
|
|
58
|
+
pytest==9.1.1
|
|
59
59
|
pylint==4.0.6
|
|
60
60
|
frequenz-repo-config[extra-lint-examples]==0.18.0
|
|
61
61
|
pytest-mock==3.15.1
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"files": [
|
|
3
|
+
".gitignore",
|
|
4
|
+
"README.md",
|
|
5
|
+
"CONTRIBUTING.md",
|
|
6
|
+
".editorconfig",
|
|
7
|
+
".cookiecutter-replay.json",
|
|
8
|
+
"Dockerfile",
|
|
9
|
+
"pyproject.toml",
|
|
10
|
+
"MANIFEST.in",
|
|
11
|
+
"app.py",
|
|
12
|
+
"RELEASE_NOTES.md",
|
|
13
|
+
"LICENSE",
|
|
14
|
+
"mkdocs.yml",
|
|
15
|
+
"CODEOWNERS",
|
|
16
|
+
"noxfile.py",
|
|
17
|
+
"toml_directory/__init__.py",
|
|
18
|
+
"src/frequenz/cs_reporting/conftest.py",
|
|
19
|
+
"src/frequenz/cs_reporting/ui_resources.py",
|
|
20
|
+
"src/frequenz/cs_reporting/constants.py",
|
|
21
|
+
"src/frequenz/cs_reporting/py.typed",
|
|
22
|
+
"src/frequenz/cs_reporting/__init__.py",
|
|
23
|
+
"src/frequenz/cs_reporting/services/solar_workflow.py",
|
|
24
|
+
"src/frequenz/cs_reporting/services/client_factory.py",
|
|
25
|
+
"src/frequenz/cs_reporting/services/data_service.py",
|
|
26
|
+
"src/frequenz/cs_reporting/services/__init__.py",
|
|
27
|
+
"src/frequenz/cs_reporting/utils/env.py",
|
|
28
|
+
"src/frequenz/cs_reporting/utils/time.py",
|
|
29
|
+
"src/frequenz/cs_reporting/utils/__init__.py",
|
|
30
|
+
"src/frequenz/cs_reporting/templates/home_footer.html",
|
|
31
|
+
"src/frequenz/cs_reporting/templates/home_feature_grid.html",
|
|
32
|
+
"src/frequenz/cs_reporting/templates/home_feature_item.html",
|
|
33
|
+
"src/frequenz/cs_reporting/templates/home_hero.html",
|
|
34
|
+
"src/frequenz/cs_reporting/templates/home_stats.html",
|
|
35
|
+
"src/frequenz/cs_reporting/templates/home_logo.html",
|
|
36
|
+
"src/frequenz/cs_reporting/templates/home_stat_item.html",
|
|
37
|
+
"src/frequenz/cs_reporting/templates/dashboard_section_divider.html",
|
|
38
|
+
"src/frequenz/cs_reporting/styles/dashboard.css",
|
|
39
|
+
"src/frequenz/cs_reporting/styles/home.css",
|
|
40
|
+
"src/frequenz/cs_reporting/styles/plot_card.css",
|
|
41
|
+
"src/frequenz/cs_reporting/styles/kpi.css",
|
|
42
|
+
"src/frequenz/cs_reporting/components/sidebar_inputs.py",
|
|
43
|
+
"src/frequenz/cs_reporting/components/tables.py",
|
|
44
|
+
"src/frequenz/cs_reporting/components/ui.py",
|
|
45
|
+
"src/frequenz/cs_reporting/components/inputs.py",
|
|
46
|
+
"src/frequenz/cs_reporting/components/plot_charts.py",
|
|
47
|
+
"src/frequenz/cs_reporting/components/__init__.py",
|
|
48
|
+
"src/frequenz/cs_reporting/app_pages/home.py",
|
|
49
|
+
"src/frequenz/cs_reporting/app_pages/reporting.py",
|
|
50
|
+
"src/frequenz/cs_reporting/app_pages/solar.py",
|
|
51
|
+
"src/frequenz/cs_reporting/app_pages/__init__.py",
|
|
52
|
+
"src/frequenz/cs_reporting/assets/neustrom_logo.png",
|
|
53
|
+
"src/frequenz/cs_reporting/assets/neustrom_background.png",
|
|
54
|
+
"src/frequenz/cs_reporting/assets/__init__.py",
|
|
55
|
+
"src/frequenz/cs_reporting/rep_cs_core/config.py",
|
|
56
|
+
"src/frequenz/cs_reporting/rep_cs_core/page_spec.py",
|
|
57
|
+
"src/frequenz/cs_reporting/rep_cs_core/__init__.py",
|
|
58
|
+
"src/frequenz/cs_reporting/views/plot_renderers.py",
|
|
59
|
+
"src/frequenz/cs_reporting/views/metric_renderers.py",
|
|
60
|
+
"src/frequenz/cs_reporting/views/table_renderers.py",
|
|
61
|
+
"src/frequenz/cs_reporting/views/sections.py",
|
|
62
|
+
"src/frequenz/cs_reporting/views/solar_results.py",
|
|
63
|
+
"src/frequenz/cs_reporting/views/dashboard.py",
|
|
64
|
+
"src/frequenz/cs_reporting/views/__init__.py",
|
|
65
|
+
".github/labeler.yml",
|
|
66
|
+
".github/dependabot.yml",
|
|
67
|
+
".github/keylabeler.yml",
|
|
68
|
+
".github/RELEASE_NOTES.template.md",
|
|
69
|
+
".github/workflows/isort-migration.yaml",
|
|
70
|
+
".github/workflows/labeler.yml",
|
|
71
|
+
".github/workflows/repo-config-migration.yaml",
|
|
72
|
+
".github/workflows/ci-pr.yaml",
|
|
73
|
+
".github/workflows/ci.yaml",
|
|
74
|
+
".github/workflows/black-migration.yaml",
|
|
75
|
+
".github/workflows/dco-merge-queue.yml",
|
|
76
|
+
".github/workflows/release-notes-check.yml",
|
|
77
|
+
".github/workflows/auto-dependabot.yaml",
|
|
78
|
+
".github/workflows/release.yaml",
|
|
79
|
+
".github/ISSUE_TEMPLATE/config.yml",
|
|
80
|
+
".github/ISSUE_TEMPLATE/feature.yml",
|
|
81
|
+
".github/ISSUE_TEMPLATE/bug.yml",
|
|
82
|
+
".streamlit/config.toml",
|
|
83
|
+
"tests/test_frequenz_cs_reporting.py",
|
|
84
|
+
"docs/SUMMARY.md",
|
|
85
|
+
"docs/CONTRIBUTING.md",
|
|
86
|
+
"docs/index.md",
|
|
87
|
+
"docs/_img/logo.png",
|
|
88
|
+
"docs/_css/mkdocstrings.css",
|
|
89
|
+
"docs/_css/style.css",
|
|
90
|
+
"docs/_scripts/mkdocstrings_autoapi.py",
|
|
91
|
+
"docs/_overrides/main.html"
|
|
92
|
+
]
|
|
93
|
+
}
|
|
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.2.10 → frequenz_cs_reporting-0.4.0}/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.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/conftest.py
RENAMED
|
File without changes
|
{frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/constants.py
RENAMED
|
File without changes
|
{frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/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
|
|
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.2.10 → frequenz_cs_reporting-0.4.0}/src/frequenz/cs_reporting/utils/env.py
RENAMED
|
File without changes
|
{frequenz_cs_reporting-0.2.10 → frequenz_cs_reporting-0.4.0}/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
|