frequenz-cs-reporting 0.4.7__tar.gz → 0.4.12__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.
Files changed (69) hide show
  1. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/PKG-INFO +16 -14
  2. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/README.md +4 -3
  3. frequenz_cs_reporting-0.4.12/RELEASE_NOTES.md +38 -0
  4. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/app.py +138 -12
  5. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/pyproject.toml +15 -13
  6. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/app_pages/reporting.py +24 -5
  7. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/app_pages/solar.py +33 -17
  8. frequenz_cs_reporting-0.4.12/src/frequenz/cs_reporting/components/ui.py +89 -0
  9. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/services/client_factory.py +15 -14
  10. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/services/solar_workflow.py +4 -5
  11. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/styles/kpi.css +43 -4
  12. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/styles/plot_card.css +32 -0
  13. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/views/dashboard.py +139 -17
  14. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/views/metric_renderers.py +108 -13
  15. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/views/plot_renderers.py +152 -27
  16. frequenz_cs_reporting-0.4.12/src/frequenz/cs_reporting/views/solar_results.py +122 -0
  17. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz_cs_reporting.egg-info/PKG-INFO +16 -14
  18. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz_cs_reporting.egg-info/requires.txt +11 -10
  19. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz_cs_reporting.egg-info/scm_file_list.json +0 -1
  20. frequenz_cs_reporting-0.4.12/src/frequenz_cs_reporting.egg-info/scm_version.json +8 -0
  21. frequenz_cs_reporting-0.4.7/RELEASE_NOTES.md +0 -18
  22. frequenz_cs_reporting-0.4.7/src/frequenz/cs_reporting/components/ui.py +0 -50
  23. frequenz_cs_reporting-0.4.7/src/frequenz/cs_reporting/views/solar_results.py +0 -197
  24. frequenz_cs_reporting-0.4.7/src/frequenz_cs_reporting.egg-info/scm_version.json +0 -8
  25. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/.streamlit/config.toml +0 -0
  26. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/Dockerfile +0 -0
  27. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/LICENSE +0 -0
  28. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/MANIFEST.in +0 -0
  29. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/setup.cfg +0 -0
  30. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/__init__.py +0 -0
  31. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/app_pages/__init__.py +0 -0
  32. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/app_pages/home.py +0 -0
  33. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/assets/__init__.py +0 -0
  34. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/assets/neustrom_background.png +0 -0
  35. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/assets/neustrom_logo.png +0 -0
  36. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/components/__init__.py +0 -0
  37. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/components/inputs.py +0 -0
  38. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/components/plot_charts.py +0 -0
  39. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/components/sidebar_inputs.py +0 -0
  40. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/components/tables.py +0 -0
  41. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/conftest.py +0 -0
  42. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/constants.py +0 -0
  43. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/py.typed +0 -0
  44. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/rep_cs_core/__init__.py +0 -0
  45. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/rep_cs_core/config.py +0 -0
  46. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/rep_cs_core/page_spec.py +0 -0
  47. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/services/__init__.py +0 -0
  48. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/services/data_service.py +0 -0
  49. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/styles/dashboard.css +0 -0
  50. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/styles/home.css +0 -0
  51. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/templates/dashboard_section_divider.html +0 -0
  52. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/templates/home_feature_grid.html +0 -0
  53. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/templates/home_feature_item.html +0 -0
  54. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/templates/home_footer.html +0 -0
  55. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/templates/home_hero.html +0 -0
  56. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/templates/home_logo.html +0 -0
  57. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/templates/home_stat_item.html +0 -0
  58. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/templates/home_stats.html +0 -0
  59. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/ui_resources.py +0 -0
  60. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/utils/__init__.py +0 -0
  61. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/utils/env.py +0 -0
  62. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/utils/time.py +0 -0
  63. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/views/__init__.py +0 -0
  64. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/views/sections.py +0 -0
  65. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz/cs_reporting/views/table_renderers.py +0 -0
  66. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz_cs_reporting.egg-info/SOURCES.txt +0 -0
  67. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz_cs_reporting.egg-info/dependency_links.txt +0 -0
  68. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/src/frequenz_cs_reporting.egg-info/top_level.txt +0 -0
  69. {frequenz_cs_reporting-0.4.7 → frequenz_cs_reporting-0.4.12}/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.4.7
3
+ Version: 0.4.12
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,8 @@ 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.17.0,>=0.16.0
23
+ Requires-Dist: frequenz-gridpool<0.8.0,>=0.7.1
24
+ Requires-Dist: frequenz-lib-notebooks<0.17.0,>=0.16.6
24
25
  Requires-Dist: matplotlib>=3.10.6
25
26
  Requires-Dist: numpy>=2.3.2
26
27
  Requires-Dist: pandas>=2.3.2
@@ -35,7 +36,7 @@ Requires-Dist: streamlit-aggrid>=1.1.8.post1
35
36
  Requires-Dist: watchdog>=6.0.0
36
37
  Provides-Extra: dev-flake8
37
38
  Requires-Dist: flake8==7.3.0; extra == "dev-flake8"
38
- Requires-Dist: flake8-datetimez==20.10.0; extra == "dev-flake8"
39
+ Requires-Dist: flake8-datetimez==26.8.1; extra == "dev-flake8"
39
40
  Requires-Dist: flake8-docstrings==1.7.0; extra == "dev-flake8"
40
41
  Requires-Dist: flake8-pyproject==1.2.4; extra == "dev-flake8"
41
42
  Requires-Dist: pydoclint==0.9.1; extra == "dev-flake8"
@@ -44,7 +45,7 @@ Provides-Extra: dev-formatting
44
45
  Requires-Dist: black==26.5.1; extra == "dev-formatting"
45
46
  Requires-Dist: isort==8.0.1; extra == "dev-formatting"
46
47
  Provides-Extra: dev-mkdocs
47
- Requires-Dist: Markdown==3.10.2; extra == "dev-mkdocs"
48
+ Requires-Dist: Markdown==3.10.3; extra == "dev-mkdocs"
48
49
  Requires-Dist: black==26.5.1; extra == "dev-mkdocs"
49
50
  Requires-Dist: mike==2.2.0; extra == "dev-mkdocs"
50
51
  Requires-Dist: mkdocs-gen-files==0.6.1; extra == "dev-mkdocs"
@@ -52,23 +53,23 @@ Requires-Dist: mkdocs-literate-nav==0.6.3; extra == "dev-mkdocs"
52
53
  Requires-Dist: mkdocs-macros-plugin==1.5.0; extra == "dev-mkdocs"
53
54
  Requires-Dist: mkdocs-material==9.7.7; extra == "dev-mkdocs"
54
55
  Requires-Dist: mkdocstrings[python]==1.0.6; extra == "dev-mkdocs"
55
- Requires-Dist: mkdocstrings-python==2.0.5; extra == "dev-mkdocs"
56
- Requires-Dist: frequenz-repo-config[lib]==0.18.0; extra == "dev-mkdocs"
56
+ Requires-Dist: mkdocstrings-python==2.0.7; extra == "dev-mkdocs"
57
+ Requires-Dist: frequenz-repo-config[lib]==0.19.0; extra == "dev-mkdocs"
57
58
  Provides-Extra: dev-mypy
58
- Requires-Dist: mypy==2.3.0; extra == "dev-mypy"
59
+ Requires-Dist: mypy==2.3.1; extra == "dev-mypy"
59
60
  Requires-Dist: types-Markdown==3.10.2.20260712; extra == "dev-mypy"
60
61
  Requires-Dist: types-pytz; extra == "dev-mypy"
61
62
  Requires-Dist: pandas-stubs; extra == "dev-mypy"
62
63
  Requires-Dist: frequenz-cs-reporting[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-mypy"
63
64
  Provides-Extra: dev-noxfile
64
- Requires-Dist: nox==2026.7.11; extra == "dev-noxfile"
65
- Requires-Dist: frequenz-repo-config[lib]==0.18.0; extra == "dev-noxfile"
65
+ Requires-Dist: nox==2026.8.17; extra == "dev-noxfile"
66
+ Requires-Dist: frequenz-repo-config[lib]==0.19.0; extra == "dev-noxfile"
66
67
  Provides-Extra: dev-pylint
67
68
  Requires-Dist: frequenz-cs-reporting[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-pylint"
68
69
  Provides-Extra: dev-pytest
69
70
  Requires-Dist: pytest==9.1.1; extra == "dev-pytest"
70
- Requires-Dist: pylint==4.0.6; extra == "dev-pytest"
71
- Requires-Dist: frequenz-repo-config[extra-lint-examples]==0.18.0; extra == "dev-pytest"
71
+ Requires-Dist: pylint==4.0.8; extra == "dev-pytest"
72
+ Requires-Dist: frequenz-repo-config[extra-lint-examples]==0.19.0; extra == "dev-pytest"
72
73
  Requires-Dist: pytest-mock==3.15.1; extra == "dev-pytest"
73
74
  Requires-Dist: pytest-asyncio==1.4.0; extra == "dev-pytest"
74
75
  Requires-Dist: async-solipsism==0.9; extra == "dev-pytest"
@@ -104,8 +105,8 @@ reporting utilities from `frequenz-lib-notebooks`, and renders dashboards, table
104
105
  2. Provide environment variables (see below). A `.env` file works with Streamlit:
105
106
  ```bash
106
107
  REPORTING_API_URL=https://your-reporting-endpoint
107
- API_KEY=your-api-key
108
- API_SECRET=your-api-secret
108
+ FREQUENZ_API_KEY=your-api-key
109
+ FREQUENZ_API_SECRET=your-signing-secret
109
110
  MICROGRID_CONFIG_DIR=toml_directory/
110
111
  ```
111
112
  3. Add .toml files to the toml_directory.
@@ -120,7 +121,8 @@ reporting utilities from `frequenz-lib-notebooks`, and renders dashboards, table
120
121
  ### Environment
121
122
 
122
123
  - `REPORTING_API_URL` **(required)**: Base URL for the Frequenz reporting API.
123
- - `API_KEY` and `API_SECRET` **(required)**: Credentials used by the data client.
124
+ - `FREQUENZ_API_KEY` and `FREQUENZ_API_SECRET` **(required)**: Credentials used
125
+ to authenticate and sign Reporting and Assets API requests.
124
126
  - `MICROGRID_CONFIG_DIR` *(optional)*: Directory containing TOML microgrid
125
127
  configs. Defaults to `toml_directory/`.
126
128
 
@@ -26,8 +26,8 @@ reporting utilities from `frequenz-lib-notebooks`, and renders dashboards, table
26
26
  2. Provide environment variables (see below). A `.env` file works with Streamlit:
27
27
  ```bash
28
28
  REPORTING_API_URL=https://your-reporting-endpoint
29
- API_KEY=your-api-key
30
- API_SECRET=your-api-secret
29
+ FREQUENZ_API_KEY=your-api-key
30
+ FREQUENZ_API_SECRET=your-signing-secret
31
31
  MICROGRID_CONFIG_DIR=toml_directory/
32
32
  ```
33
33
  3. Add .toml files to the toml_directory.
@@ -42,7 +42,8 @@ reporting utilities from `frequenz-lib-notebooks`, and renders dashboards, table
42
42
  ### Environment
43
43
 
44
44
  - `REPORTING_API_URL` **(required)**: Base URL for the Frequenz reporting API.
45
- - `API_KEY` and `API_SECRET` **(required)**: Credentials used by the data client.
45
+ - `FREQUENZ_API_KEY` and `FREQUENZ_API_SECRET` **(required)**: Credentials used
46
+ to authenticate and sign Reporting and Assets API requests.
46
47
  - `MICROGRID_CONFIG_DIR` *(optional)*: Directory containing TOML microgrid
47
48
  configs. Defaults to `toml_directory/`.
48
49
 
@@ -0,0 +1,38 @@
1
+ # Frequenz CS Reporting Library Release Notes
2
+
3
+ ## Summary
4
+
5
+
6
+ ## Upgrading
7
+
8
+ - The minimum supported `frequenz-gridpool` version is now 0.7.1. Configuration
9
+ loading now uses the `AssetsConfig.microgrids` mapping introduced by that
10
+ release.
11
+ - Rename `API_KEY` to `FREQUENZ_API_KEY` and `API_SECRET` to
12
+ `FREQUENZ_API_SECRET` in the application environment or `.env` file. Both
13
+ variables are required for authenticated and signed Reporting and Assets API
14
+ requests.
15
+
16
+ ## New Features
17
+
18
+ - Solar monitoring plots are now rendered as interactive Plotly charts instead
19
+ of static Matplotlib images.
20
+ - Reporting KPI cards now show the previous-period value and percentage change.
21
+ When the selected period includes the current day and only partial current-day
22
+ data is available, the previous period is capped to the same elapsed duration
23
+ for a fair comparison.
24
+ - Component plots for PV, battery, wind, and CHP now include a plot header
25
+ selector to switch between meter data and inverter/component data.
26
+
27
+ ## Bug Fixes
28
+
29
+ - Reporting API streaming requests now include `FREQUENZ_API_SECRET` for request
30
+ signing, preventing authentication failures when loading report data.
31
+ - Dashboard and Solar workflows now read microgrid IDs and location metadata
32
+ directly from `MicrogridConfig`, avoiding failures caused by the removed
33
+ `meta` attribute in `frequenz-gridpool` 0.7.1.
34
+ - The sidebar layout now uses tighter spacing for the logo, page navigation,
35
+ filter sections, and form controls, removing large unused gaps.
36
+ - Day-ahead price data from ENTSO-E is now optional in the dashboard. If the
37
+ data cannot be fetched, the dashboard shows a warning and skips the related
38
+ price KPIs and plot traces instead of failing.
@@ -61,6 +61,12 @@ def _inject_global_theme() -> None:
61
61
  --radius-md: 10px;
62
62
  --radius-sm: 8px;
63
63
  --shadow: 0 8px 24px rgba(16, 40, 74, 0.06);
64
+ --sidebar-bg: #eaf0f8;
65
+ --sidebar-bg-soft: #dfe8f4;
66
+ --sidebar-accent: #1e4f87;
67
+ --sidebar-text: var(--text-main);
68
+ --sidebar-muted: var(--text-muted);
69
+ --sidebar-border: var(--border);
64
70
  }
65
71
 
66
72
  [data-testid="stAppViewContainer"] {
@@ -75,15 +81,128 @@ def _inject_global_theme() -> None:
75
81
  }
76
82
 
77
83
  [data-testid="stSidebar"] {
78
- background: #eaf0f8;
79
- border-right: 1px solid var(--border);
84
+ background: var(--sidebar-bg);
85
+ border-right: 1px solid var(--sidebar-border);
86
+ }
87
+
88
+ [data-testid="stSidebar"] > div:first-child {
89
+ padding: 1.25rem 1rem 1rem;
90
+ }
91
+
92
+ [data-testid="stSidebar"] [data-testid="stImage"] {
93
+ margin: 0 0 1.15rem;
80
94
  }
81
95
 
82
96
  [data-testid="stSidebar"] [data-testid="stImage"] img {
83
- border-radius: 12px;
84
- border: 1px solid var(--border);
85
- background: #fff;
86
- padding: 8px;
97
+ border: 0;
98
+ border-radius: 4px;
99
+ background: transparent;
100
+ padding: 0;
101
+ }
102
+
103
+ [data-testid="stSidebar"] hr {
104
+ border-color: var(--sidebar-border);
105
+ margin: 0.85rem 0 1.05rem;
106
+ }
107
+
108
+ [data-testid="stSidebar"] h2,
109
+ [data-testid="stSidebar"] h3,
110
+ [data-testid="stSidebar"] label {
111
+ color: var(--sidebar-text);
112
+ }
113
+
114
+ [data-testid="stSidebar"] h2 {
115
+ font-size: 1.35rem;
116
+ line-height: 1.25;
117
+ padding: 0;
118
+ margin: 0 0 0.45rem;
119
+ }
120
+
121
+ [data-testid="stSidebar"] h3 {
122
+ font-size: 1.05rem;
123
+ line-height: 1.2;
124
+ margin: 0.55rem 0 0.45rem;
125
+ }
126
+
127
+ [data-testid="stSidebar"] [data-testid="stCaptionContainer"] p,
128
+ [data-testid="stSidebar"] .sidebar-section-label {
129
+ color: var(--sidebar-muted);
130
+ font-size: 0.78rem;
131
+ font-weight: 700;
132
+ letter-spacing: 0.14em;
133
+ line-height: 1.2;
134
+ margin: 0 0 0.65rem;
135
+ text-transform: uppercase;
136
+ }
137
+
138
+ [data-testid="stSidebar"] div[role="radiogroup"] {
139
+ gap: 0.08rem;
140
+ }
141
+
142
+ [data-testid="stSidebar"] div[role="radiogroup"] label {
143
+ min-height: 2.15rem;
144
+ padding: 0.28rem 0.55rem;
145
+ border: 1px solid transparent;
146
+ border-radius: 8px;
147
+ color: var(--text-muted);
148
+ transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
149
+ }
150
+
151
+ [data-testid="stSidebar"] div[role="radiogroup"] label:hover {
152
+ background: rgba(30, 79, 135, 0.08);
153
+ border-color: rgba(30, 79, 135, 0.22);
154
+ color: var(--sidebar-text);
155
+ }
156
+
157
+ [data-testid="stSidebar"] div[role="radiogroup"] label:has(input:checked) {
158
+ background: var(--sidebar-bg-soft);
159
+ border-color: rgba(30, 79, 135, 0.36);
160
+ box-shadow: inset 3px 0 0 var(--sidebar-accent);
161
+ color: var(--sidebar-text);
162
+ font-weight: 700;
163
+ }
164
+
165
+ [data-testid="stSidebar"] div[role="radiogroup"] label:has(input:checked) * {
166
+ color: var(--sidebar-text);
167
+ }
168
+
169
+ [data-testid="stSidebar"] div[role="radiogroup"] label > div:first-child {
170
+ transform: scale(0.78);
171
+ }
172
+
173
+ [data-testid="stSidebar"] [data-testid="stForm"] {
174
+ border: 1px solid var(--sidebar-border);
175
+ border-radius: 8px;
176
+ background: rgba(255, 255, 255, 0.28);
177
+ padding: 0.9rem 0.85rem 0.85rem;
178
+ }
179
+
180
+ [data-testid="stSidebar"] [data-testid="stForm"] [data-testid="stVerticalBlock"] {
181
+ gap: 0.55rem;
182
+ }
183
+
184
+ [data-testid="stSidebar"] .stSelectbox,
185
+ [data-testid="stSidebar"] .stDateInput {
186
+ margin-bottom: 0;
187
+ }
188
+
189
+ [data-testid="stSidebar"] .stSelectbox div[data-baseweb="select"] > div,
190
+ [data-testid="stSidebar"] .stDateInput input {
191
+ min-height: 2.55rem;
192
+ border-color: transparent;
193
+ background: #ffffff;
194
+ }
195
+
196
+ [data-testid="stSidebar"] div[data-testid="stFormSubmitButton"] > button {
197
+ min-height: 2.7rem;
198
+ margin-top: 0.15rem;
199
+ border: 1px solid #ff4b4b;
200
+ background: #ff4b4b;
201
+ }
202
+
203
+ [data-testid="stSidebar"] div[data-testid="stFormSubmitButton"] > button:hover {
204
+ border-color: #ff6262;
205
+ background: #ff6262;
87
206
  }
88
207
 
89
208
  h1, h2, h3 {
@@ -253,10 +372,15 @@ def _load_logo_bytes() -> bytes | None:
253
372
  return None
254
373
 
255
374
 
375
+ def _nav_label(page: PageSpec) -> str:
376
+ """Return compact sidebar labels without changing page metadata."""
377
+ return page.title
378
+
379
+
256
380
  # Sidebar navigation
257
381
  def sidebar(pages: list[PageSpec]) -> PageSpec:
258
382
  if logo_bytes := _load_logo_bytes():
259
- st.sidebar.image(logo_bytes, width="stretch")
383
+ st.sidebar.image(logo_bytes, width=245)
260
384
 
261
385
  st.sidebar.divider()
262
386
 
@@ -272,10 +396,10 @@ def sidebar(pages: list[PageSpec]) -> PageSpec:
272
396
  default_key = pages[0].key
273
397
 
274
398
  # Map display labels to internal keys
275
- options = {p.title: p.key for p in pages}
399
+ options = {_nav_label(p): p.key for p in pages}
276
400
  display_options = list(options.keys())
277
- labels_by_key = {p.key: p.title for p in pages}
278
- default_label = labels_by_key.get(default_key, pages[0].title)
401
+ labels_by_key = {p.key: _nav_label(p) for p in pages}
402
+ default_label = labels_by_key.get(default_key, _nav_label(pages[0]))
279
403
  nav_sync_key = "_last_synced_query_page"
280
404
 
281
405
  # Consume programmatic navigation signal (set by _navigate_to in home.py)
@@ -304,8 +428,10 @@ def sidebar(pages: list[PageSpec]) -> PageSpec:
304
428
  elif st.session_state["navigation_radio"] not in options:
305
429
  st.session_state["navigation_radio"] = default_label
306
430
 
307
- # Add page navigation header
308
- st.sidebar.header("Seiten")
431
+ st.sidebar.markdown(
432
+ '<div class="sidebar-section-label">Übersicht</div>',
433
+ unsafe_allow_html=True,
434
+ )
309
435
 
310
436
  selected_label = st.sidebar.radio(
311
437
  "Seiten",
@@ -3,9 +3,9 @@
3
3
 
4
4
  [build-system]
5
5
  requires = [
6
- "setuptools == 83.0.0",
6
+ "setuptools == 84.0.0",
7
7
  "setuptools_scm[toml] == 10.2.1",
8
- "frequenz-repo-config[lib] == 0.18.0",
8
+ "frequenz-repo-config[lib] == 0.19.0",
9
9
  ]
10
10
  build-backend = "setuptools.build_meta"
11
11
 
@@ -29,7 +29,8 @@ requires-python = ">= 3.11, < 4"
29
29
 
30
30
  dependencies = [
31
31
  "css-inline>=0.17.0",
32
- "frequenz-lib-notebooks>=0.16.0,<0.17.0",
32
+ "frequenz-gridpool>=0.7.1,<0.8.0",
33
+ "frequenz-lib-notebooks>=0.16.6,<0.17.0",
33
34
  "matplotlib>=3.10.6",
34
35
  "numpy>=2.3.2",
35
36
  "pandas>=2.3.2",
@@ -51,7 +52,7 @@ email = "floss@frequenz.com"
51
52
  [project.optional-dependencies]
52
53
  dev-flake8 = [
53
54
  "flake8 == 7.3.0",
54
- "flake8-datetimez == 20.10.0",
55
+ "flake8-datetimez == 26.8.1",
55
56
  "flake8-docstrings == 1.7.0",
56
57
  "flake8-pyproject == 1.2.4", # For reading the flake8 config from pyproject.toml
57
58
  "pydoclint == 0.9.1",
@@ -59,7 +60,7 @@ dev-flake8 = [
59
60
  ]
60
61
  dev-formatting = ["black == 26.5.1", "isort == 8.0.1"]
61
62
  dev-mkdocs = [
62
- "Markdown == 3.10.2",
63
+ "Markdown == 3.10.3",
63
64
  "black == 26.5.1",
64
65
  "mike == 2.2.0",
65
66
  "mkdocs-gen-files == 0.6.1",
@@ -67,11 +68,11 @@ dev-mkdocs = [
67
68
  "mkdocs-macros-plugin == 1.5.0",
68
69
  "mkdocs-material == 9.7.7",
69
70
  "mkdocstrings[python] == 1.0.6",
70
- "mkdocstrings-python == 2.0.5",
71
- "frequenz-repo-config[lib] == 0.18.0",
71
+ "mkdocstrings-python == 2.0.7",
72
+ "frequenz-repo-config[lib] == 0.19.0",
72
73
  ]
73
74
  dev-mypy = [
74
- "mypy == 2.3.0",
75
+ "mypy == 2.3.1",
75
76
  "types-Markdown == 3.10.2.20260712",
76
77
  "types-pytz",
77
78
  "pandas-stubs",
@@ -79,8 +80,8 @@ dev-mypy = [
79
80
  "frequenz-cs-reporting[dev-mkdocs,dev-noxfile,dev-pytest]",
80
81
  ]
81
82
  dev-noxfile = [
82
- "nox == 2026.7.11",
83
- "frequenz-repo-config[lib] == 0.18.0",
83
+ "nox == 2026.8.17",
84
+ "frequenz-repo-config[lib] == 0.19.0",
84
85
  ]
85
86
  dev-pylint = [
86
87
  # dev-pytest already defines a dependency to pylint because of the examples
@@ -89,8 +90,8 @@ dev-pylint = [
89
90
  ]
90
91
  dev-pytest = [
91
92
  "pytest == 9.1.1",
92
- "pylint == 4.0.6", # We need this to check for the examples
93
- "frequenz-repo-config[extra-lint-examples] == 0.18.0",
93
+ "pylint == 4.0.8", # We need this to check for the examples
94
+ "frequenz-repo-config[extra-lint-examples] == 0.19.0",
94
95
  "pytest-mock == 3.15.1",
95
96
  "pytest-asyncio == 1.4.0",
96
97
  "async-solipsism == 0.9",
@@ -184,7 +185,6 @@ disable = [
184
185
  ]
185
186
 
186
187
  [tool.pytest.ini_options]
187
- addopts = "-vv"
188
188
  filterwarnings = [
189
189
  "error",
190
190
  "once::DeprecationWarning",
@@ -197,11 +197,13 @@ filterwarnings = [
197
197
  'ignore:Protobuf gencode version .*exactly one major version older.*:UserWarning',
198
198
  ]
199
199
  testpaths = ["tests", "src"]
200
+ asyncio_debug = true
200
201
  asyncio_mode = "auto"
201
202
  asyncio_default_fixture_loop_scope = "function"
202
203
  required_plugins = ["pytest-asyncio", "pytest-mock"]
203
204
 
204
205
  [tool.mypy]
206
+ enable_error_code = ["exhaustive-match"]
205
207
  explicit_package_bases = true
206
208
  namespace_packages = true
207
209
  # This option disables mypy cache, and it is sometimes useful to enable it if
@@ -26,7 +26,11 @@ from frequenz.cs_reporting.services.data_service import (
26
26
  get_microgrid_data,
27
27
  get_microgrid_soc_data,
28
28
  )
29
- from frequenz.cs_reporting.views.dashboard import build_master_df, render_dashboard
29
+ from frequenz.cs_reporting.views.dashboard import (
30
+ build_master_df,
31
+ render_dashboard,
32
+ split_periods,
33
+ )
30
34
 
31
35
 
32
36
  def _scroll_to_section_if_requested() -> None:
@@ -147,7 +151,7 @@ def _format_data_loading_error(exc: Exception, microgrid_id: int) -> str:
147
151
  )
148
152
 
149
153
 
150
- # pylint: disable=too-many-locals
154
+ # pylint: disable=too-many-locals, too-many-statements
151
155
  def render() -> None:
152
156
  """Render the Frequenz Reporting Dashboard page.
153
157
 
@@ -188,6 +192,9 @@ def render() -> None:
188
192
  )
189
193
  st.stop()
190
194
 
195
+ selected_period = end_time - start_time
196
+ previous_start_time = start_time - selected_period
197
+
191
198
  try:
192
199
  resolution = _parse_resolution(selections["resolution"])
193
200
  except ValueError as exc:
@@ -204,7 +211,7 @@ def render() -> None:
204
211
  mcfg = get_microgrid_config(microgrid_id)
205
212
  df = get_microgrid_data(
206
213
  microgrid_id=microgrid_id,
207
- start_date=start_time,
214
+ start_date=previous_start_time,
208
215
  # Use the extended date here to ensure we get the full last day
209
216
  end_date=end_time,
210
217
  resolution=resolution,
@@ -220,7 +227,7 @@ def render() -> None:
220
227
  try:
221
228
  fetched_soc_df = get_microgrid_soc_data(
222
229
  microgrid_id=microgrid_id,
223
- start_date=start_time,
230
+ start_date=previous_start_time,
224
231
  end_date=end_time,
225
232
  resolution=resolution,
226
233
  )
@@ -252,12 +259,24 @@ def render() -> None:
252
259
  timezone=timezone,
253
260
  battery_soc_df=battery_soc_df,
254
261
  )
255
- render_dashboard(
262
+ current_master_df, previous_master_df = split_periods(
256
263
  master_df,
264
+ start_time,
265
+ end_time,
266
+ resolution,
267
+ )
268
+ if current_master_df.empty:
269
+ st.warning("Keine Daten für die ausgewählten Filter vorhanden.")
270
+ st.stop()
271
+
272
+ render_dashboard(
273
+ current_master_df,
257
274
  resolution=resolution,
258
275
  component_types=component_types,
259
276
  mapper=mapper,
260
277
  microgrid_id=microgrid_id,
278
+ mcfg=mcfg,
279
+ previous_master_df=previous_master_df,
261
280
  )
262
281
  _scroll_to_section_if_requested()
263
282
 
@@ -9,12 +9,13 @@ import asyncio
9
9
  import datetime
10
10
  import traceback
11
11
  from contextlib import contextmanager
12
+ from threading import Lock
12
13
  from typing import Iterator
13
14
 
14
- import matplotlib.pyplot as plt
15
+ import plotly.graph_objects as go
15
16
  import streamlit as st
17
+ from frequenz.lib.notebooks.solar.maintenance import plot_manager, plot_styles
16
18
  from frequenz.lib.notebooks.solar.maintenance.solar_maintenance_app import run_workflow
17
- from matplotlib.figure import Figure
18
19
 
19
20
  from frequenz.cs_reporting.components.sidebar_inputs import collect_solar_sidebar_inputs
20
21
  from frequenz.cs_reporting.rep_cs_core.page_spec import PageSpec
@@ -27,26 +28,41 @@ DEFAULT_START_DATE = datetime.date(
27
28
  )
28
29
  DEFAULT_RESAMPLE_PERIOD = "3600"
29
30
  DEFAULT_BASELINE_MODELS: list[str] = []
31
+ _WORKFLOW_DISPLAY_LOCK = Lock()
30
32
 
31
33
 
32
34
  @contextmanager
33
- def capture_figures() -> Iterator[list[Figure]]:
34
- """Capture new Matplotlib figures created within the context.
35
+ def capture_workflow_figures() -> Iterator[list[go.Figure]]:
36
+ """Capture Plotly figures when the workflow attempts to display them.
35
37
 
36
38
  Yields:
37
- A list that will be populated with new figures after the context exits.
39
+ A list populated with Plotly figures while the workflow runs.
38
40
  """
39
- closed_figures: list[Figure] = []
40
- # Close any existing figures to start fresh (optional, depending on desired behavior)
41
- # plt.close("all") # Careful with this if other pages rely on state
41
+ figures: list[go.Figure] = []
42
42
 
43
- existing_nums = set(plt.get_fignums())
44
- try:
45
- yield closed_figures
46
- finally:
47
- current_nums = set(plt.get_fignums())
48
- new_nums = current_nums - existing_nums
49
- closed_figures.extend([plt.figure(num) for num in new_nums])
43
+ def capture_figures(manager: plot_manager.PlotManager) -> None:
44
+ figures.extend(
45
+ figure
46
+ for figure in manager.figures.values()
47
+ if isinstance(figure, go.Figure) and figure.data
48
+ )
49
+
50
+ def suppress_notebook_display(_: object) -> None:
51
+ return
52
+
53
+ # frequenz-lib-notebooks keeps figures in local PlotManager instances and
54
+ # renders them as a side effect. Capture the managers directly before the
55
+ # figures reach IPython's display machinery.
56
+ with _WORKFLOW_DISPLAY_LOCK:
57
+ original_show_all = plot_manager.PlotManager.show_all
58
+ original_table_display = getattr(plot_styles, "display")
59
+ setattr(plot_manager.PlotManager, "show_all", capture_figures)
60
+ setattr(plot_styles, "display", suppress_notebook_display)
61
+ try:
62
+ yield figures
63
+ finally:
64
+ setattr(plot_manager.PlotManager, "show_all", original_show_all)
65
+ setattr(plot_styles, "display", original_table_display)
50
66
 
51
67
 
52
68
  def render() -> None:
@@ -102,10 +118,10 @@ def render() -> None:
102
118
  return
103
119
 
104
120
  with st.spinner("Workflow wird ausgeführt..."):
105
- with capture_figures() as new_figures:
121
+ with capture_workflow_figures() as figures:
106
122
  plot_data = asyncio.run(run_workflow(user_config_changes=user_request))
107
123
 
108
- render_workflow_results(plot_data, new_figures)
124
+ render_workflow_results(plot_data, figures)
109
125
 
110
126
 
111
127
  PAGE = PageSpec(
@@ -0,0 +1,89 @@
1
+ # License: MIT
2
+ # Copyright © 2026 Frequenz Energy-as-a-Service GmbH
3
+
4
+ """UI helpers for rendering plots and styled cards."""
5
+
6
+ from collections.abc import Callable
7
+
8
+ import plotly.graph_objects as go
9
+ import streamlit as st
10
+ from matplotlib.figure import Figure
11
+
12
+ from frequenz.cs_reporting.ui_resources import inject_style
13
+
14
+
15
+ def _ensure_plot_card_css() -> None:
16
+ """Inject card styling CSS for the current Streamlit run."""
17
+ inject_style("plot_card.css")
18
+
19
+
20
+ def render_plot_card(
21
+ title: str,
22
+ fig: object,
23
+ header_control: Callable[[], None] | None = None,
24
+ key: str | None = None,
25
+ ) -> None:
26
+ """Render a plot inside a professional styled card.
27
+
28
+ Args:
29
+ title: Title displayed in the card header.
30
+ fig: Plotly or Matplotlib figure to render.
31
+ header_control: Optional Streamlit control rendered at the right side of
32
+ the card header.
33
+ key: Optional key used to style cards that include header controls.
34
+
35
+ Returns:
36
+ Streamlit components are rendered directly.
37
+ """
38
+ _ensure_plot_card_css()
39
+
40
+ if header_control is not None:
41
+ card_key = f"{key or title.lower().replace(' ', '_')}_plot_card"
42
+ header_key = f"{key or title.lower().replace(' ', '_')}_plot_header"
43
+ with st.container(key=card_key):
44
+ with st.container(
45
+ key=header_key,
46
+ horizontal=True,
47
+ vertical_alignment="center",
48
+ horizontal_alignment="distribute",
49
+ ):
50
+ st.markdown(
51
+ f"""
52
+ <div class="plot-card__native-title-wrap">
53
+ <div class="plot-card__header-dot"></div>
54
+ <p class="plot-card__title">{title}</p>
55
+ </div>
56
+ """,
57
+ unsafe_allow_html=True,
58
+ )
59
+ header_control()
60
+
61
+ if isinstance(fig, go.Figure):
62
+ st.plotly_chart(fig, width="stretch")
63
+ elif isinstance(fig, Figure):
64
+ st.pyplot(fig)
65
+ else:
66
+ st.warning("Nicht unterstützter Figurtyp.")
67
+ return
68
+
69
+ with st.container():
70
+ st.markdown(
71
+ f"""
72
+ <div class="plot-card">
73
+ <div class="plot-card__header">
74
+ <div class="plot-card__header-dot"></div>
75
+ <p class="plot-card__title">{title}</p>
76
+ </div>
77
+ <div class="plot-card__body">
78
+ """,
79
+ unsafe_allow_html=True,
80
+ )
81
+
82
+ if isinstance(fig, go.Figure):
83
+ st.plotly_chart(fig, width="stretch")
84
+ elif isinstance(fig, Figure):
85
+ st.pyplot(fig)
86
+ else:
87
+ st.warning("Nicht unterstützter Figurtyp.")
88
+
89
+ st.markdown("</div></div>", unsafe_allow_html=True)