Skip to content

Commit

Permalink
Add YEARLY frequency (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marenz authored Oct 17, 2024
2 parents 0f8681c + fdb6bde commit cf54baa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
16 changes: 1 addition & 15 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
# Frequenz Dispatch Client Library Release Notes

## Summary

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

## Upgrading

* `Client.stream()` will now raise an Exception when the connection is lost.
* `Client.create()` and `Client.list() now take all optional arguments as keyword-only arguments.

## New Features

* Added support for duration=None when creating a dispatch.
* The `FakeService` now supports the `stream()` method.

## Bug Fixes

<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
* Fix crash by adding the missing YEARLY frequency.
4 changes: 3 additions & 1 deletion src/frequenz/client/dispatch/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ def to_interval(
request = ListMicrogridDispatchesRequest(
microgrid_id=microgrid_id,
filter=filters,
pagination_params=PaginationParams(page_size=page_size),
pagination_params=(
PaginationParams(page_size=page_size) if page_size else None
),
)

while True:
Expand Down
1 change: 1 addition & 0 deletions src/frequenz/client/dispatch/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class Frequency(IntEnum):
DAILY = PBRecurrenceRule.FREQUENCY_DAILY
WEEKLY = PBRecurrenceRule.FREQUENCY_WEEKLY
MONTHLY = PBRecurrenceRule.FREQUENCY_MONTHLY
YEARLY = PBRecurrenceRule.FREQUENCY_YEARLY


@dataclass(kw_only=True)
Expand Down

0 comments on commit cf54baa

Please sign in to comment.