Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Frequenz Microgrid API Client Release Notes

## Summary

<!-- Here goes a general summary of what this release is about -->

## Upgrading

- Now component and microgrid IDs are wrapped in new classes: `ComponentId` and `MicrogridId` respectively.
Expand All @@ -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

<!-- Here goes the main new features and examples or instructions on how to use them -->

## Bug Fixes

<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
5 changes: 5 additions & 0 deletions src/frequenz/client/microgrid/_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"""Strongly typed IDs for microgrids and components."""


from typing import final


@final
class MicrogridId:
"""A unique identifier for a microgrid."""

Expand Down Expand Up @@ -53,6 +57,7 @@ def __str__(self) -> str:
return f"MID{self._id}"


@final
class ComponentId:
"""A unique identifier for a microgrid component."""

Expand Down