From f850440a03df96aa93544ee520e22738c7b1bc0c Mon Sep 17 00:00:00 2001 From: Sahas Subramanian Date: Tue, 16 Dec 2025 12:40:52 +0100 Subject: [PATCH 1/2] Allow Python subclassing of ComponentGraphConfig and ComponentGraph Signed-off-by: Sahas Subramanian --- src/graph.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/graph.rs b/src/graph.rs index 488d10b..f0811c5 100644 --- a/src/graph.rs +++ b/src/graph.rs @@ -16,7 +16,7 @@ use pyo3::{ types::{PyAny, PySet, PyType}, }; -#[pyclass] +#[pyclass(subclass)] #[derive(Clone, Default, Debug)] pub struct ComponentGraphConfig { config: cg::ComponentGraphConfig, @@ -49,7 +49,7 @@ impl ComponentGraphConfig { } } -#[pyclass] +#[pyclass(subclass)] pub struct ComponentGraph { graph: cg::ComponentGraph, } From c5ee356f2997e46af71b1cd3634d0a749b32e433 Mon Sep 17 00:00:00 2001 From: Sahas Subramanian Date: Tue, 16 Dec 2025 12:41:50 +0100 Subject: [PATCH 2/2] Update release notes Signed-off-by: Sahas Subramanian --- RELEASE_NOTES.md | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 5c3581a..e879121 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,17 +1,5 @@ # Frequenz Microgrid Component Graph Library Release Notes -## Summary - - - -## Upgrading - - - ## New Features - - -## Bug Fixes - - +- It is now possible to create subclasses of the `ComponentGraph` and `ComponentGraphConfig` classes from python.