Frequenz-sdk

Latest version: v0.25.2

Safety actively analyzes 642295 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 5

0.23.0

Frequenz Python SDK Release Notes

Summary

This release ships many small improvements and bug fixes to `Quantity`s. It also depends on [channels](https://github.com/frequenz-floss/frequenz-channels-python/) v0.16.0, so users must update the dependency too.

Upgrading

- `Channels` has been upgraded to version 0.16.0, for information on how to upgrade please read the [channels v0.16.0 release notes](visit https://github.com/frequenz-floss/frequenz-channels-python/releases/tag/v0.16.0).
- `Quantity` objects are no longer hashable. This is because of the pitfalls of hashing `float` values.

New Features

- Quantities

* Add support for the unary negative operator (negation of a quantity).
* Add `abs()`.
* Add a `isclose()` method on quantities to compare them to other values of the same type. Because `Quantity` types are just wrappers around `float`s, direct comparison might not always be desirable.
* Add `zero()` constructor (which returns a singleton) to easily get a zero value.
* Add multiplication by `Percentage` types.
* Add a new quantity class `Frequency` for frequency values.
* Add a new quantity class `Temperature` for temperature values.

- `FormulaEngine` arithmetics now supports scalar multiplication with `float`s and addition with `Quantity`s.
- Add a new `temperature` method for streaming average temperature values for the battery pool.

Bug Fixes

- Fix formatting issue for `Quantity` objects with zero values.
- Fix formatting issue for `Quantity` when the base value fulfills `math.isinf()` or `math.isnan()`.
- Fix clamping to 100% for the battery pool SoC scaling calculation.
- Fix indexing for empty `MovingWindow`s (now it properly raises an `IndexError`).


What's Changed
* Bump polars from 0.18.4 to 0.18.5 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/486
* Add installation instructions by llucax in https://github.com/frequenz-floss/frequenz-sdk-python/pull/487
* Updated float("NaN") to math.nan by jh2007github in https://github.com/frequenz-floss/frequenz-sdk-python/pull/484
* Bump polars from 0.18.5 to 0.18.6 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/491
* Add methods for sending individual mock component data messages in tests by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/483
* Clear release notes by llucax in https://github.com/frequenz-floss/frequenz-sdk-python/pull/493
* Migrate to repo-config by llucax in https://github.com/frequenz-floss/frequenz-sdk-python/pull/488
* Bump actions/labeler from 4.2.0 to 4.3.0 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/496
* Bump time-machine from 2.10.0 to 2.11.0 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/497
* Bump black from 23.3.0 to 23.7.0 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/498
* Fix formatting bug for zero value Quantities by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/505
* Add quantity class `Frequency` by Marenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/506
* Add documentation on how to receive power request results by Marenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/507
* Bump pytest-asyncio from 0.21.0 to 0.21.1 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/510
* Bump polars from 0.18.6 to 0.18.7 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/509
* Update to channels 0.16.x by jh2007github in https://github.com/frequenz-floss/frequenz-sdk-python/pull/490
* Bump sybil from 5.0.2 to 5.0.3 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/513
* Support negation of quantities by Marenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/515
* Support float.inf and float.nan in quantities by Marenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/514
* Add from_receiver method to FormulaEngine by matthias-wende-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/489
* Add abs() support for quantities by Marenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/516
* Bump mkdocs-material from 9.1.18 to 9.1.19 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/521
* Bump polars from 0.18.7 to 0.18.8 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/526
* Add capability to multiply quantities with percentage by Marenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/512
* Implement dunder iadd, isub, imul methods for Quantity by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/527
* Bump types-protobuf from 4.23.0.1 to 4.23.0.2 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/528
* Add constant to FormulaEngine arithmetic by matthias-wende-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/525
* Quantity improvements by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/533
* Add BatteryStatus tests to ensure it recovers automatically after issues by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/522
* Nice error message for empty buffer and new test case by jh2007github in https://github.com/frequenz-floss/frequenz-sdk-python/pull/517
* Bump pylint from 2.17.4 to 2.17.5 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/539
* Update to repo-config v0.4.0 by llucax in https://github.com/frequenz-floss/frequenz-sdk-python/pull/540
* Bump mkdocs-material from 9.1.19 to 9.1.21 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/549
* Bump polars from 0.18.8 to 0.18.9 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/553
* Bump polars from 0.18.9 to 0.18.11 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/554
* Add zero() constructor for Quantities by llucax in https://github.com/frequenz-floss/frequenz-sdk-python/pull/535
* Temperature streaming from the BatteryPool by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/552
* Add BatteryPool.temperature and quantity Temperature by christianparpart in https://github.com/frequenz-floss/frequenz-sdk-python/pull/485
* Update battery pool SoC calculation by matthias-wende-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/557
* Add CI check that RELEASE_NOTES.md was updated by Marenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/544
* Prepare for release v0.23.0 by llucax in https://github.com/frequenz-floss/frequenz-sdk-python/pull/559

New Contributors
* jh2007github made their first contribution in https://github.com/frequenz-floss/frequenz-sdk-python/pull/484

**Full Changelog**: https://github.com/frequenz-floss/frequenz-sdk-python/compare/v0.22.0...v0.23.0

0.22.1

Release Notes

Bug Fixes

- Fix formatting issue for `Quantity` objects with zero values.


What's Changed
* Fix formatting bug for zero values by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/503


**Full Changelog**: https://github.com/frequenz-floss/frequenz-sdk-python/compare/v0.22.0...v0.22.1

0.22.0

Release Notes

Summary

New `Quantity` types! These types can have units (power, current, voltage, etc.) and are *type- and unit-safe* in the sense that users can't accidentally sum a power with a voltage, or a power in kW with a power in W.

Upgrading

- `Sample` objects no longer hold `float`s, but rather `Quantity` or one of its subclasses, like `Power`, `Current`, `Energy`, etc. based on the type of values being streamed.

python
sample: Sample[Power] = await battery_pool.power.new_receiver().receive()
power: float = sample.value.as_watts()


- `BatteryPool.soc` now streams values of type `Sample[Quantity]`, and `BatteryPool.capacity` now streams values of type `Sample[Energy]`.

python
battery_pool = microgrid.battery_pool()
soc_sample: Sample[Quantity] = await battery_pool.soc.new_receiver().receive()
soc: float = soc_sample.value.base_value

capacity_sample: Sample[Energy] = await battery_pool.capacity.new_receiver().receive()
capacity: float = soc_sample.value.as_watt_hours()


- `MicrogridApiClient.set_power` no longer returns a `protobuf.Empty` result, but a `None`. This won't affect you unless you are using the low level APIs of the SDK.

New Features

- The logical meter has a new method that returns producer power, that is the sum of all energy producers.

- `Quantity` types (`Power`, `Current`, `Energy`, `Voltage`) for providing type- and unit-safety when dealing with physical quantities.

Bug Fixes

- Two bugs in the ring buffer which is used by the `MovingWindow` class were fixed:
- `len(buffer)` was not considering potentially existing gaps (areas without elements) in the buffer.
- A off-by-one error in the gap calculation logic was fixed that recorded a gap when there was none if an element with a future timestamp was added that would create a gap of exactly 1.

- A formula engine lifetime issue, when creating higher order formula receivers without holding on to a reference to the engine, was fixed.


What's Changed
* Clear release notes by leandro-lucarella-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/423
* Bump polars from 0.18.0 to 0.18.2 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/432
* Bump pytest from 7.3.1 to 7.3.2 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/431
* Add more unit tests for PeriodicFeatureExtractor by cwasicki in https://github.com/frequenz-floss/frequenz-sdk-python/pull/375
* Enhance battery pool documentation by matthias-wende-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/425
* Fix seconds in MovingWindow doc example by cwasicki in https://github.com/frequenz-floss/frequenz-sdk-python/pull/437
* Add `--diff` as a default argument for `isort` by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/438
* Bump mkdocs-material from 9.1.15 to 9.1.16 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/439
* Add producer power formula by matthias-wende-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/444
* Bump polars from 0.18.2 to 0.18.3 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/448
* Bump pytest-mock from 3.10.0 to 3.11.1 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/440
* Bump time-machine from 2.9.0 to 2.10.0 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/447
* Add Quantity types and update formulas to produce typed Samples by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/422
* Bump mypy from 1.3.0 to 1.4.0 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/458
* Remove example programs for internal components by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/453
* Expose only usable SoC and Capacity through the BatteryPool by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/459
* Bump polars from 0.18.3 to 0.18.4 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/464
* Bump pytest from 7.3.2 to 7.4.0 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/463
* Bump mkdocs-material from 9.1.16 to 9.1.17 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/461
* Bump mypy from 1.4.0 to 1.4.1 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/462
* Fix ring buffer len by Marenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/445
* Disable default constructor in specialized `Quantity` types by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/465
* A `Percentage` quantity by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/470
* Bump actions/labeler from 4.0.4 to 4.2.0 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/471
* Fix broken reference to `ResamplingFunction` in documentation by Marenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/472
* Limit pydantic to v1 by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/474
* Remove unused `JUNCTION` and `LOAD` component categories by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/467
* Fix release notes and add a summary by llucax in https://github.com/frequenz-floss/frequenz-sdk-python/pull/476
* Bump mkdocs-material from 9.1.17 to 9.1.18 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/481
* Store a reference to the engine in receiver objects by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/478

New Contributors
* cwasicki made their first contribution in https://github.com/frequenz-floss/frequenz-sdk-python/pull/375
* llucax made their first contribution in https://github.com/frequenz-floss/frequenz-sdk-python/pull/476

**Full Changelog**: https://github.com/frequenz-floss/frequenz-sdk-python/compare/v0.21.1...v0.22.0

0.21.1

Release Notes

Note

Please note that even when there is a v0.21.0 tag in the project's repository, there is no public release for v0.21.0 in GitHub or pypi.

This is due to a bug in the automation to create releases for new tags in v0.21.0. This release is exactly the same as v0.21.0 but with that bug fixed, so the full changes introduced by v0.21.0 are included here.

Summary

This release mainly introduces the new `PeriodicFeatureExtractor`, the control interface to the `BatteryPool`, and a new naming scheme for retrieving `LogicalMeter` and `BatteryPool` metrics. It also drops support for Python versions older than 3.11.

Upgrading

* Now Python 3.11 is the minimum supported version. All users must upgrade to Python 3.11 (including virtual environments used for development).

* `BatteryPool` metric streaming interfaces have changed for `soc`, `capacity` and `power_bounds`:

python
soc_rx = battery_pool.soc() old

soc_rx = battery_pool.soc.new_receiver() new


* Formulas now follow the new naming scheme.

- `BatteryPool.{power, production_power, consumption_power}`
- `EVChargerPool.{power, production_power, consumption_power}`
- `LogicalMeter`:
- `consumer_power`
- `grid_power`
- `grid_production_power`
- `grid_consumption_power`
- `chp_power`
- `chp_production_power`
- `chp_consumption_power`

* A power request can now be forced by setting the `include_broken_batteries` attribute. This is especially helpful as a safety measure when components appear to be failing, such as when battery metrics are unavailable. Note that applications previously relying on automatic fallback to all batteries when none of them was working will now require the `include_broken_batteries` attribute to be explicitly set in the request.

* Now `float` is used everywhere for representing power (before power metrics were `float` but setting power was done using `int`).
* `frequenz.sdk.actor.power_distributing`: the `power` attribute of the `Request` class has been updated from `int` to a `float`.
* `frequenz.sdk.microgrid`: the `set_power()` method of both the `MicrogridApiClient` and `MicrogridGrpcClient` classes now expect a `float` value for the `power_w` parameter instead of `int`.

* The `LogicalMeter` no longer takes a `component_graph` parameter.

* Now `frequenz.sdk.timeseries.Sample` uses a more sensible comparison. Before this release `Sample`s were compared only based on the `timestamp`. This was due to a limitation in Python versions earlier than 3.10. Now that the minimum supported version is 3.11 this hack is not needed anymore and `Sample`s are compared using both `timestamp` and `value` as most people probably expects.

* The dependency to `sympy` was unused and thus removed from the SDK. If you used it indirectly without declaring the dependency in your project you should do it now.

New Features

* The `MovingWindow` has new public methods that return the oldest and newest timestamp of all stored samples.

* The `PeriodicFeatureExtractor` has been added.

This is a tool to create certain profiles out of periodic reoccurring windows inside a `MovingWindow`.

As an example one can create a daily profile of specific weekdays which will be returned as numpy arrays.

* The `BatteryPool` can now be used to control the batteries in it via the new methods `charge()`, `discharge()`, and `set_power()`.

Bug Fixes

* Fixed many examples in the documentation.


What's Changed
* ci: Fix building of tags by leandro-lucarella-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/426


**Full Changelog**: https://github.com/frequenz-floss/frequenz-sdk-python/compare/v0.21.0...v0.21.1

0.20.0

Release Notes

Summary

The main feature in the release is the high-level interface. Now all base pipeline actors are created automatically when the SDK is initialized, and the wrapper classes can be accessed directly via `frequenz.sdk.microgrid`: `logical_meter()`, `battery_pool()` and `ev_charger_pool()`.

Upgrading

* Battery power is no longer available through the `LogicalMeter`, but through the `BatteryPool` (338)

python
battery_power_receiver = microgrid.battery_pool().power.new_receiver()


* Formulas composition has changed (327)
* Receivers from formulas are no longer composable.
* Formula composition is now done by composing FormulaEngine instances.
* Automatic formulas from the logical meter and \*pools, are now properties, and return `FormulaEngine` instances, which can be composed further, or can provide a receiver to fetch values.

python
grid_power_receiver = microgrid.logical_meter().grid_power.new_receiver()

self._inverter_power = (
microgrid.logical_meter().pv_power
+ microgrid.battery_pool().power
).build("inverter_power")

inverter_power_receiver = self._inverter_power.new_receiver()


* Update `BatteryStatus` to mark battery with unknown capacity as not working (263)

* The channels dependency was updated to v0.14.0 (292)

* Some properties for `PowerDistributingActor` results were renamed to be more consistent between `Success` and `PartialFailure`:

* The `Success.used_batteries` property was renamed to `succeeded_batteries`.
* The `PartialFailure.success_batteries` property was renamed to `succeeded_batteries`.
* The `succeed_power` property was renamed to `succeeded_power` for both `Success` and `PartialFailure`.

* `MovingWindow`

* The class is now publicly available in the `frequenz.sdk.timeseries` package.

* Accept the `size` parameter as `timedelta` instead of `int` (269).

This change allows users to define the time span of the moving window more intuitively, representing the duration over which samples will be stored.

* The input data will be resampled if a `resampler_config` is passed (269).

This allows controlling the granularity of the samples to be stored in the underlying buffer.

Note that the parameter `sampling_period` has been renamed to `input_sampling_period` to better distinguish it from the sampling period parameter in the `resampler_config`.

* Rename the constructor argument `window_alignment` to `align_to` and change the default to `UNIX_EPOCH`. This is to make it more consistent with the `ResamplerConfig`.

* `Resampler`

* The `ResamplerConfig` class is now publicly available in the `frequenz.sdk.timeseries` package.

* The `ResamplerConfig` now takes the resampling period as a `timedelta`. The configuration was renamed from `resampling_period_s` to `resampling_period` accordingly.

* The `SourceProperties` of the resampler now uses a `timedelta` for the input sampling period. The attribute was renamed from `sampling_period_s` to `sampling_period` accordingly.

* The periods are now aligned to the `UNIX_EPOCH` by default.

To use the old behaviour (aligning to the time the resampler was created), pass `align_to=None` to the `ResamplerConfig`.

New Features

* The core data-pipeline actors are now created automatically (270).

This eliminates a lot of boiler plate code and makes it much simpler to deploy apps.

For example:

python
async def run():
await microgrid.initialize(
host=HOST, port=PORT, resampler_config=ResamplerConfig(resampling_period_s=1.0)
)
grid_power = microgrid.logical_meter().grid_power()


* The `Result` class (and subclasses) for the `PowerDistributingActor` are now `dataclass`es, so logging them will produce a more detailed output.

* The `Resampler` can now can align the resampling period to an arbitrary `datetime`.

This can be configured via the new `align_to` option in the `ResamplerConfig`. By default the resampling period is aligned to the `UNIX_EPOCH`.

Bug Fixes

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

* 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)


What's Changed
* Power Distributing: Documentation enhancements by mathias-baumann-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/257
* Clean release notes by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/271
* Check battery capacity in BatteryStatus by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/263
* Use all batteries when none are working in PowerDistributor by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/258
* Configure dependabot to automated version updates by daniel-zullo-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/268
* Bump pylint from 2.17.0 to 2.17.1 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/288
* Bump mypy from 1.0.1 to 1.1.1 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/286
* Bump actions/labeler from 4.0.1 to 4.0.3 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/279
* Bump pytest from 7.2.1 to 7.2.2 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/287
* Bump black from 23.1.0 to 23.3.0 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/284
* Update channels dependency to v0.14.0 by mathias-baumann-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/295
* Various small fixes by mathias-baumann-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/277
* Fix len() of the OrderedRingBuffer by daniel-zullo-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/274
* Bump pytest-asyncio from 0.20.3 to 0.21.0 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/281
* Bump mkdocstrings[python] from 0.19.1 to 0.20.0 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/283
* Update networkx requirement from <3,>=2.8 to >=2.8,<4 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/282
* Bump mkdocs-material from 8.5.11 to 9.1.5 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/298
* Add a `DataPipeline` implementation by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/270
* Bump pylint from 2.17.1 to 2.17.2 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/300
* Use a bigger request receiver buffer size in data pipeline actors by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/302
* Refactor power distributor's `Result`s by leandro-lucarella-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/305
* Bump mkdocstrings[python] from 0.20.0 to 0.21.1 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/308
* Add `component_data` method to EVChargerPool by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/266
* benchmark data sourcing actor by mathias-baumann-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/211
* Add ringbuffer memory benchmark by mathias-baumann-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/278
* Update MovingWindow to add resampler by daniel-zullo-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/272
* Bump mkdocs-material from 9.1.5 to 9.1.6 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/312
* Add a `EVChargerPool.set_bounds` method for setting current bounds by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/297
* Bump mkdocstrings[python] from 0.21.1 to 0.21.2 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/309
* Bump pytest from 7.2.2 to 7.3.0 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/313
* Bump mypy from 1.1.1 to 1.2.0 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/310
* Add BatteryPool and PowerDistributingActor to the DataPipeline by sahas-subramanian-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/317
* Expose BatteryPool and PowerDistributingHandle from `sdk.microgrid` by sahas-subramanian-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/323
* Fix ring buffer benchmarks by daniel-zullo-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/324
* Make interface for serializing a ringbuffer more flexible. by mathias-baumann-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/326
* Ringbuffer: Moved files into a package by mathias-baumann-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/329
* Update `BatteryPool` tests, examples to use `microgrid.battery_pool()` by sahas-subramanian-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/336
* Bump pytest from 7.3.0 to 7.3.1 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/339
* Make the resampler use timedelta for periods by leandro-lucarella-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/334
* Bump frequenz-floss/setup-git-user from 1 to 2 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/345
* Make FormulaEngine instances composable, instead of FormulaReceivers by sahas-subramanian-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/327
* Add `power` formula to `BatteryPool` by sahas-subramanian-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/338
* Add an option to align resampling windows by leandro-lucarella-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/335
* Increase sample_rate in some formula tests to reduce flakiness by sahas-subramanian-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/351
* Bump mkdocs-material from 9.1.6 to 9.1.7 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/353
* Bump nox from 2022.11.21 to 2023.4.22 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/354
* Rename custom loggers to `_logger` by sahas-subramanian-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/347
* Rename alignment arguments to `align_to` and make them default to `UNIX_EPOCH` by leandro-lucarella-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/349
* Make the `MovingWindow` public and remove public mentions to the `RingBuffer` by leandro-lucarella-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/355
* Bump mkdocs-material from 9.1.7 to 9.1.8 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/357
* Bump pylint from 2.17.2 to 2.17.3 by dependabot in https://github.com/frequenz-floss/frequenz-sdk-python/pull/356

New Contributors
* dependabot made their first contribution in https://github.com/frequenz-floss/frequenz-sdk-python/pull/288

**Full Changelog**: https://github.com/frequenz-floss/frequenz-sdk-python/compare/v0.19.0...v0.20.0

0.19.0

Release Notes

Summary

Upgrading

* Remove `_soc` formula from the LogicalMeter. This feature has been moved to the BatteryPool.
* Upgrade PowerDistributingActor to handle components with the NaN metrics (247):
* if power bounds are NaN, then it tries to replace them with corresponding power bounds from adjacent component. If these components are also NaN, then it ignores battery.
* if other metrics metrics are NaN then it ignores battery.
* BatteryStatus to track that a component stopped sending messages. If the battery or its adjacent inverter stopped sending messages, then the battery would be considered as not working. (207)
* PowerDistributing to send battery status to subscribed users (205)
* Rename microgrid.Microgrid to microgrid.ConnectionManager (208)
* Change few resampler logs from info to debug, because they were polluting startup logs (238)

New Features

* A new class `SerializableRingbuffer` is now available, extending the `OrderedRingBuffer` class with the ability to load & dump the data to disk.
* Add the `run(*actors)` function for running and synchronizing the execution of actors. This new function simplifies the way actors are managed on the client side, allowing for a cleaner and more streamlined approach. Users/apps can now run actors simply by calling run(actor1, actor2, actor3...) without the need to manually call join() and deal with linting errors.
* The datasourcing actor now automatically closes all sending channels when the input channel closes.
* BatteryPool implementation for aggregating battery-inverter metrics into higher level metrics. (205)
* Add EV power and current streams to `EVChargerPool` (201)

Bug Fixes

* The resampler now correctly produces resampling windows of exact *resampling period* size, which only include samples emitted during the resampling window (see 170)

Removing

* Deprecated code (232):
* frequenz.sdk._data_ingestion
* frequenz.sdk._data_handling
* The pandas(-stubs) and pytz dependencies are no longer needed (261).


What's Changed
* Serializing Ringbuffer by mathias-baumann-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/167
* Rename microgrid.Microgrid to microgrid.ConnectionManager and its Insecure-companion by christianparpart in https://github.com/frequenz-floss/frequenz-sdk-python/pull/208
* Add EV power and current streams to `EVChargerPool` by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/201
* Change battery status when component stopped sending data by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/207
* Remove deprecated code by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/232
* Fix mypy invocation in noxfile by leandro-lucarella-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/219
* Add wrappers for the component data in unit tests by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/231
* Fix flaky LogicalMeter test_soc by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/235
* Update MockMicrogrid for use with datasourcing benchmark by mathias-baumann-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/224
* Change few resampler logs from info to debug by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/238
* Add a run() method to run/wait for actors completion by daniel-zullo-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/200
* Add & use close channel method in the registry by mathias-baumann-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/225
* Add BatteryPool implementation for aggregating battery-inverter data by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/205
* Remove `_soc` formula from the LogicalMeter by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/248
* Increase sampling rate in the flaky formula test by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/251
* Make resampling window size constant by leandro-lucarella-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/236
* Change PowerDistributor to ignore components with NaN metrics by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/247
* Update release notes by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/252
* Pin dev/test dependencies by daniel-zullo-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/256
* Fix resampler behaviour when resampling is to late by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/255
* Change BatteryPool to send metrics only when they change by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/254
* Remove pandas(-stubs) dependencies by daniel-zullo-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/261

New Contributors
* christianparpart made their first contribution in https://github.com/frequenz-floss/frequenz-sdk-python/pull/208

**Full Changelog**: https://github.com/frequenz-floss/frequenz-sdk-python/compare/v0.18.0...v0.19.0

Page 3 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.