Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add YEARLY frequency #97

Merged
merged 2 commits into from
Oct 17, 2024
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
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
Loading