From 5aa05de5fd8d77ee565d3bc90f38d8769eb8eca5 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 24 Mar 2025 14:14:20 +0100 Subject: [PATCH 1/2] Make ID classes final Signed-off-by: Leandro Lucarella --- src/frequenz/client/microgrid/_id.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/frequenz/client/microgrid/_id.py b/src/frequenz/client/microgrid/_id.py index 411b532d..9e1b77f8 100644 --- a/src/frequenz/client/microgrid/_id.py +++ b/src/frequenz/client/microgrid/_id.py @@ -4,6 +4,10 @@ """Strongly typed IDs for microgrids and components.""" +from typing import final + + +@final class MicrogridId: """A unique identifier for a microgrid.""" @@ -53,6 +57,7 @@ def __str__(self) -> str: return f"MID{self._id}" +@final class ComponentId: """A unique identifier for a microgrid component.""" From 74b1f33bed9d2803c9cae66d3998f835145ff544 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Mon, 24 Mar 2025 14:13:37 +0100 Subject: [PATCH 2/2] Prepare release notes for v0.7.0 Signed-off-by: Leandro Lucarella --- RELEASE_NOTES.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index b9819303..c3baf309 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,9 +1,5 @@ # Frequenz Microgrid API Client Release Notes -## Summary - - - ## Upgrading - Now component and microgrid IDs are wrapped in new classes: `ComponentId` and `MicrogridId` respectively. @@ -16,11 +12,3 @@ - Ensuring proper hash behavior in collections. To migrate you just need to wrap your `int` IDs with the appropriate class: `0` -> `ComponentId(0)` / `MicrogridId(0)`. - -## New Features - - - -## Bug Fixes - -