Skip to content

Commit af4f0b5

Browse files
authored
Prepare for release v0.7.0 (#123)
- **Make ID classes final** - **Prepare release notes for v0.7.0**
2 parents 8bd31f1 + 74b1f33 commit af4f0b5

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

RELEASE_NOTES.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# Frequenz Microgrid API Client Release Notes
22

3-
## Summary
4-
5-
<!-- Here goes a general summary of what this release is about -->
6-
73
## Upgrading
84

95
- Now component and microgrid IDs are wrapped in new classes: `ComponentId` and `MicrogridId` respectively.
@@ -16,11 +12,3 @@
1612
- Ensuring proper hash behavior in collections.
1713

1814
To migrate you just need to wrap your `int` IDs with the appropriate class: `0` -> `ComponentId(0)` / `MicrogridId(0)`.
19-
20-
## New Features
21-
22-
<!-- Here goes the main new features and examples or instructions on how to use them -->
23-
24-
## Bug Fixes
25-
26-
<!-- Here goes notable bug fixes that are worth a special mention or explanation -->

src/frequenz/client/microgrid/_id.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
"""Strongly typed IDs for microgrids and components."""
55

66

7+
from typing import final
8+
9+
10+
@final
711
class MicrogridId:
812
"""A unique identifier for a microgrid."""
913

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

5559

60+
@final
5661
class ComponentId:
5762
"""A unique identifier for a microgrid component."""
5863

0 commit comments

Comments
 (0)