|
1 | 1 | # Tooling Library for Notebooks Release Notes |
2 | 2 |
|
3 | 3 | ## Summary |
4 | | - |
5 | | -<!-- Here goes a general summary of what this release is about --> |
| 4 | +This release standardizes energy reporting with a new suite of metric definitions, visualization helpers, and a schema-based ColumnMapper for consistent data handling. It also introduces breaking changes to MicrogridConfig to support schema-based loading and adds official support for Python 3.13. |
6 | 5 |
|
7 | 6 | ## Upgrading |
8 | | - |
9 | | -<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with --> |
10 | | - |
11 | 7 | - `MicrogridConfig`: Switch to schema-based loading of microgrid config files and updates to the config class: |
12 | 8 | - Remove unused nested field `assets` and replace by its contents `pv`, `wind`, `battery`. |
13 | 9 | - Make `meta` and `ctype` public fields. |
|
16 | 12 | - Add `src/frequenz/lib/notebooks/reporting/schema_mapping.yaml` to your deployment so notebooks can load the canonical column definitions via `ColumnMapper`. |
17 | 13 |
|
18 | 14 | ## New Features |
19 | | - |
20 | | -<!-- Here goes the main new features and examples or instructions on how to use them --> |
21 | | - |
22 | 15 | - Introduced `frequenz.lib.notebooks.reporting.metrics.reporting_metrics` with first-class definitions for production excess, battery charging share, grid feed-in, self-consumption, self-consumption share, and inferred consumption; the schema now documents each metric via an `implementation` tag. |
23 | 16 | - Added `frequenz.lib.notebooks.reporting.utils.helpers.add_energy_flows()` (plus supporting helpers) that aggregates raw production/consumption columns and appends the derived flows the reporting notebook needs. |
24 | 17 | - Published a locale-aware `ColumnMapper` utility that reads the YAML schema so notebooks can seamlessly move between raw API headers, canonical identifiers, and localized display labels. |
25 | | -- plot_time_series() can auto-pivot long-format inputs, honor a desired legend/trace order, and optionally fill selected traces while keeping Plotly colors consistent through a shared palette builder; also defaults to numeric columns only to avoid spurious traces (src/frequenz/lib/notebooks/reporting/plotter.py (lines 15-163)). |
26 | | -- Added reusable long_to_wide() and build_color_map() helpers so notebooks can pivot categorical telemetry and reuse the canonical color scheme without duplicating logic (src/frequenz/lib/notebooks/reporting/utils/helpers.py (lines 216-311)). |
27 | | -- Added a default mapping loading to the `ColumnMapper` utility function. |
28 | | -- Added `grid_consumption` function in the `reporting_metrics.py`. |
| 18 | +- plot_time_series() can auto-pivot long-format inputs, add a desired legend/trace order, and optionally fill selected traces while keeping Plotly colors consistent through a shared palette builder; also defaults to numeric columns only to avoid spurious traces. |
| 19 | +- Added reusable `long_to_wide()` and `build_color_map()` helpers so notebooks can pivot categorical telemetry and reuse the canonical color scheme without duplicating logic. |
29 | 20 | - Added `create_energy_report_df()` to convert raw microgrid exports into timezone-aware, canonical energy-report tables with derived grid/battery KPIs and labeled component columns, letting dashboards bind to a consistent schema without bespoke glue. |
30 | 21 | - Introduced the `reporting_nb_functions` toolkit so notebooks can build overview tables, melt component selections, compute energy-mix summaries, and aggregate KPIs (production totals, self-consumption share, grid import peaks) for stakeholder-ready reporting pages. |
31 | 22 | - Expanded the reporting helper utilities with YAML config loading, German number formatting, timezone conversion, component labeling, energy-report column selection, and robust energy-flow derivations so multiple notebooks can reuse the same preprocessing primitives. |
32 | 23 | - Published `Reporting NB.ipynb` example that wires the mapper, helper utilities, and KPI builders together in a ready-to-run reporting notebook. |
33 | 24 |
|
34 | 25 | ## Bug Fixes |
35 | | -- `frequenz.lib.notebooks.reporting.utils.helpers.add_energy_flows()` now infers consumption totals from existing data when explicit consumption columns are missing, preventing inconsistent outputs in notebook pipelines that only provide grid and production inputs. |
36 | | -- `frequenz.lib.notebooks.reporting.metrics.consumption()` reindexes optional production/battery inputs and raises a warning when inferred consumption turns negative so sign-convention issues are surfaced immediately. |
37 | | -- plot_energy_pie_chart() now accepts the same color_dict overrides as the time-series view, ensuring doughnut slices reuse the canonical colors instead of Plotly’s defaults and keeping legends consistent across charts (src/frequenz/lib/notebooks/reporting/plotter.py (lines 166-200)). |
38 | | - |
39 | | -<!-- Here goes notable bug fixes that are worth a special mention or explanation --> |
| 26 | +- `plot_energy_pie_chart()` now accepts the same color_dict overrides as the time-series view, ensuring doughnut slices reuse the canonical colors instead of Plotly’s defaults and keeping legends consistent across charts. |
0 commit comments