Skip to content

Commit cf54baa

Browse files
authored
Add YEARLY frequency (#97)
2 parents 0f8681c + fdb6bde commit cf54baa

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
11
# Frequenz Dispatch Client Library Release Notes
22

3-
## Summary
4-
5-
<!-- Here goes a general summary of what this release is about -->
6-
7-
## Upgrading
8-
9-
* `Client.stream()` will now raise an Exception when the connection is lost.
10-
* `Client.create()` and `Client.list() now take all optional arguments as keyword-only arguments.
11-
12-
## New Features
13-
14-
* Added support for duration=None when creating a dispatch.
15-
* The `FakeService` now supports the `stream()` method.
16-
173
## Bug Fixes
184

19-
<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
5+
* Fix crash by adding the missing YEARLY frequency.

src/frequenz/client/dispatch/_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ def to_interval(
162162
request = ListMicrogridDispatchesRequest(
163163
microgrid_id=microgrid_id,
164164
filter=filters,
165-
pagination_params=PaginationParams(page_size=page_size),
165+
pagination_params=(
166+
PaginationParams(page_size=page_size) if page_size else None
167+
),
166168
)
167169

168170
while True:

src/frequenz/client/dispatch/types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ class Frequency(IntEnum):
116116
DAILY = PBRecurrenceRule.FREQUENCY_DAILY
117117
WEEKLY = PBRecurrenceRule.FREQUENCY_WEEKLY
118118
MONTHLY = PBRecurrenceRule.FREQUENCY_MONTHLY
119+
YEARLY = PBRecurrenceRule.FREQUENCY_YEARLY
119120

120121

121122
@dataclass(kw_only=True)

0 commit comments

Comments
 (0)