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