From a780df8dfede35af0797f74e01eedb170ed819f2 Mon Sep 17 00:00:00 2001 From: Sahas Subramanian Date: Tue, 21 Jul 2026 09:48:48 +0000 Subject: [PATCH 1/3] docs: reset release notes The notes still described the v0.4.3 release, which has shipped. Reset them from the template so this cycle starts clean. Signed-off-by: Sahas Subramanian --- RELEASE_NOTES.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 2ba404c..d466455 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,17 @@ # Frequenz Gridpool Library Release Notes +## Summary + + + ## Upgrading -- This updates the component-graph version to 0.4, which breaks the config format for component graphs when there are created. + + +## New Features + + + +## Bug Fixes + + From 4ba2f9b99ca4ea32688e4712d90df52a72e9033f Mon Sep 17 00:00:00 2001 From: Sahas Subramanian Date: Tue, 21 Jul 2026 09:49:31 +0000 Subject: [PATCH 2/3] build(deps): run mypy and pytest against the graph renderer dev-pytest did not pull the render-graph extra, so matplotlib and networkx were missing. mypy could not find the matplotlib stubs and failed on _render_graph.py, and pytest skipped tests/test_render_graph.py, so its tests never ran. Pull the render-graph extra in dev-pytest so both cover the renderer. Signed-off-by: Sahas Subramanian --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 04d3b82..78ec4e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,6 +91,9 @@ dev-pytest = [ "pytest-mock == 3.15.1", "pytest-asyncio == 1.3.0", "async-solipsism == 0.9", + # The tests also cover the graph renderer, which needs matplotlib and + # networkx. + "frequenz-gridpool[render-graph]", ] dev = [ "frequenz-gridpool[dev-mkdocs,dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest,render-graph]", From 79c7c0f8d78e44d428e834aab69f6d7cd9aa57a8 Mon Sep 17 00:00:00 2001 From: Sahas Subramanian Date: Tue, 21 Jul 2026 09:51:14 +0000 Subject: [PATCH 3/3] build(deps): update component graph to v0.5.0 v0.5.0 rewrites the formula fallback engine and flips the default of prefer_meters_in_component_formulas to False. The per-category formulas now read the component first and use the meter as the fallback, and they can now use meter subtraction as a fallback term. We take the new default, which changes the generated per-category formulas. v0.5.0 also references the SteamBoiler component, which was added in frequenz-client-assets 0.3.1, so bump that lower bound too. The test graph only has a solar inverter, so the pinned pv formula flips its expected order. Ported from update-component-graph-0.5 on the v0.x.x line. The config knob and CLI flag that let callers keep the meter-first order are not part of this port. Signed-off-by: Sahas Subramanian --- RELEASE_NOTES.md | 7 ++++++- pyproject.toml | 4 ++-- tests/test_graph_generator.py | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index d466455..280ab60 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -6,7 +6,12 @@ ## Upgrading - +- This updates the component-graph library to v0.5.0, which now needs `frequenz-client-assets` >= 0.3.1. It changes the generated per-category formulas, so regenerate stored configs with this release and review the diff. + + - The formula fallback engine was rewritten. Formulas can now use meter subtraction as a fallback, which gives better fallback coverage. The exact formula strings can differ from the previous release, even for the same graph. + - The per-category formulas (`pv`, `battery`, `chp`, `ev`) now read the component first and use the meter as the fallback. This is the opposite of the previous order. + + See the [v0.5.0 release notes](https://github.com/frequenz-floss/frequenz-microgrid-component-graph-python/releases/tag/v0.5.0) of the component graph library for the full list of changes. ## New Features diff --git a/pyproject.toml b/pyproject.toml index 78ec4e1..d0397fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,8 +29,8 @@ dependencies = [ "marshmallow-dataclass >= 8.7.1, < 9", "asyncclick >= 8.3.0.4, < 9", "typing-extensions >= 4.14.1, < 5", - "frequenz-microgrid-component-graph >= 0.4.0, < 0.5", - "frequenz-client-assets >= 0.3.0, < 0.4", + "frequenz-microgrid-component-graph >= 0.5.0, < 0.6", + "frequenz-client-assets >= 0.3.1, < 0.4", ] dynamic = ["version"] diff --git a/tests/test_graph_generator.py b/tests/test_graph_generator.py index a5901b3..019b235 100644 --- a/tests/test_graph_generator.py +++ b/tests/test_graph_generator.py @@ -63,4 +63,4 @@ async def test_formula_generation() -> None: graph = await g.get_component_graph(MicrogridId(10)) assert graph.grid_formula() == "COALESCE(#2, #4, 0.0) + #3" - assert graph.pv_formula(None) == "COALESCE(#2, #4, 0.0)" + assert graph.pv_formula(None) == "COALESCE(#4, #2, 0.0)"