Skip to content

Commit ac1ee42

Browse files
committed
Don't make public mentions to the RingBuffer
The ring buffer is not part of the public interface yet, so it shouldn't be shown in the release notes of the user facing documentation. The bug in the ring buffer potentially affecting the MovingWindow is reworded to include the MovingWindow. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 55de0b0 commit ac1ee42

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
* The `PartialFailure.success_batteries` property was renamed to `succeeded_batteries`.
3939
* The `succeed_power` property was renamed to `succeeded_power` for both `Success` and `PartialFailure`.
4040

41-
* The serialization feature for the ringbuffer was made more flexible. The `dump` and `load` methods can now work directly with a ringbuffer instance.
42-
4341
* `MovingWindow`
4442

4543
* Accept the `size` parameter as `timedelta` instead of `int` (#269).
@@ -90,4 +88,4 @@
9088

9189
* Change `PowerDistributor` to use all batteries when none are working (#258)
9290

93-
* Update the ordered ring buffer to fix the `len()` function so that it returns a value equal to or greater than zero, as expected (#274)
91+
* Update the ordered ring buffer used by the `MovingWindow` to fix the `len()` function so that it returns a value equal to or greater than zero, as expected (#274)

src/frequenz/sdk/timeseries/_moving_window.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class MovingWindow:
3636
Note that a numpy ndarray is returned and thus users can use
3737
numpys operations directly on a window.
3838
39-
The window uses an ringbuffer for storage and the first element is aligned to
39+
The window uses a ring buffer for storage and the first element is aligned to
4040
a fixed defined point in time. Since the moving nature of the window, the
4141
date of the first and the last element are constantly changing and therefore
4242
the point in time that defines the alignment can be outside of the time window.
@@ -45,10 +45,7 @@ class MovingWindow:
4545
4646
If for example the `align_to` parameter is set to
4747
`datetime(1, 1, 1, tzinfo=timezone.utc)` and the window size is bigger than
48-
one day then the first element will always be aligned to the midnight.
49-
For further information see also the
50-
[`OrderedRingBuffer`][frequenz.sdk.timeseries._ringbuffer.OrderedRingBuffer]
51-
documentation.
48+
one day then the first element will always be aligned to midnight.
5249
5350
Resampling might be required to reduce the number of samples to store, and
5451
it can be set by specifying the resampler config parameter so that the user
@@ -113,8 +110,8 @@ def __init__( # pylint: disable=too-many-arguments
113110
"""
114111
Initialize the MovingWindow.
115112
116-
This method creates the underlying ringbuffer and starts a
117-
new task that updates the ringbuffer with new incoming samples.
113+
This method creates the underlying ring buffer and starts a
114+
new task that updates the ring buffer with new incoming samples.
118115
The task stops running only if the channel receiver is closed.
119116
120117
Args:
@@ -168,7 +165,7 @@ def __init__( # pylint: disable=too-many-arguments
168165
)
169166

170167
async def _run_impl(self) -> None:
171-
"""Awaits samples from the receiver and updates the underlying ringbuffer.
168+
"""Awaits samples from the receiver and updates the underlying ring buffer.
172169
173170
Raises:
174171
asyncio.CancelledError: if the MovingWindow task is cancelled.

0 commit comments

Comments
 (0)