v1.0.0-rc800
Pre-releaseFrequenz Python SDK Release Notes
Summary
This release makes some breaking changes to the SDK's public interface aimed at improving clarity and correctness. It also includes several bug fixes in core components like the resampler, the power distributor, and the moving window.
Upgrading
-
The
frequenz.sdk.microgrid.*_poolmethods have been renamed tonew_*_pool, to make it explicit that they create new instances of the pool classes.battery_pool->new_battery_poolev_charger_pool->new_ev_charger_poolpv_pool->new_pv_pool
-
The following component metric streams have been renamed to clarify that they stream per-phase values:
frequenz.sdk.microgrid.voltage->voltage_per_phasegrid.current->grid.current_per_phaseev_charger_pool.current->ev_charger_pool.current_per_phase
-
Passing a
request_timeoutin calls to*_pool.propose_poweris no longer supported. It may be specified at application startup, through the new optionalapi_power_request_timeoutparameter in themicrogrid.initialize()method. -
Power distribution results are no longer available through the
power_statusstreams in the*Pools. They can now be accessed as a stream from a separate propertypower_distribution_results, which is available from all the*Pools. -
The
ConfigManagingActornow usescollections.abc.Mappingas the output sender type. This change indicates that the broadcasted configuration is intended to be read-only. -
The
ConfigManagingActorhas moved fromfrequenz.sdk.actortofrequenz.sdk.config. -
The following core actors are no longer part of the public API:
PowerDistributingActorComponentMetricsResamplingActorDataSourcingActor
-
The following two types which are used for communicating with the data sourcing and resampling actors are also no longer part of the public API:
ComponentMetricIdComponentMetricRequest
-
The
ChannelRegistryis no longer part of the public API. -
The
Resulttypes for the power distribution results are now exposed through thefrequenz.sdk.microgrid.battery_poolmodule.
New Features
- Classes
BoundsandSystemBoundsnow implement the__contains__method, allowing the use of theinoperator to check whether a value falls within the bounds or not.
Enhancements
- The resampler now shows an error message where it is easier to identify the component and metric when it can't find relevant data for the current resampling window.
Bug Fixes
- Fixed a typing issue that occurs in some cases when composing formulas with constants.
- Fixed a bug where sending tasks in the data sourcing actor might not have been awaited.
- Updated the logical meter documentation to reflect the latest changes.
- Fixed a bug in the code examples in the getting-started tutorial.
- Fixed a bug in
ConfigManagingActorthat was not properly comparing the event path to the config file path when the config file is a relative path. - Re-expose
ComponentMetricIdto the docs. - Fixed typing ambiguities when building composite formulas on streaming data.
- Fixed a bug that was causing the
PowerDistributorto exit if power requests to PV inverters or EV chargers timeout. - Fix the handling of canceled tasks in the data sourcing and resampling actor.
- Fix a bug in PV power distribution by excluding inverters that haven't sent any data since startup.
- Prevent stacking of power requests to avoid delays in processing when the power request frequency exceeds the processing time.
- Fixes a bug in the ring buffer in case the updated value is missing and creates a gap in time.
What's Changed
- Clear release notes by @llucax in #978
- Update glossary by @cwasicki in #952
- Rename
microgrid.*_poolconstructors tonew_*_poolby @shsms in #979 - Fix typing for composing constants with formula builders by @shsms in #980
- Filter out irrelevant logs when checking for expected logs by @llucax in #983
- Properly keep references and await for concurrent tasks by @llucax in #984
- Add contains function to Bounds and SystemBounds by @0o111 in #962
- Cleanup
*Reportclasses as simple protocols with only methods by @shsms in #981 - Improve naming for per-phase component metric streams by @shsms in #987
- Fix battery manager string representation by @llucax in #989
- Update logical meter documentation by @matthias-wende-frequenz in #986
- Remove dependency to polars by @llucax in #991
- Bump brettcannon/check-for-changed-files from 1.2.0 to 1.2.1 by @dependabot in #994
- Bump docker/build-push-action from 5 to 6 by @dependabot in #993
- Bump the required group with 9 updates by @dependabot in #995
- Remove
request_timeoutparameter frompropose_powermethods by @shsms in #1000 - Remove power distribution results from
Reportobjects by @shsms in #998 - Remove extra comma from tutorial docs by @shsms in #1004
- Switch to the
LatestValueCachefrom the channels package by @shsms in #1002 - Fix ConfigManagingActor to handle relative paths by @daniel-zullo-frequenz in #1005
- Fix microgrid API URL in example by @llucax in #1006
- Use a more descriptive channel name for the resampler by @llucax in #1007
- Update sender type in ConfigManagingActor by @daniel-zullo-frequenz in #1010
- Expose
ComponentMetricIdin the public API by @llucax in #990 - Fix FormulaEngine typing by @shsms in #1011
- Use solipsism, time-machine in
*Pooltests by @shsms in #1013 - Fix PV power distribution by @daniel-zullo-frequenz in #1015
- Bump types-setuptools from 70.1.0.20240627 to 71.1.0.20240726 by @dependabot in #1019
- Fixes to the PowerDistributingActor by @shsms in #1020
- Make actor example loop forever by @llucax in #1029
- Handle
CancelledErrors properly by @llucax in #1027 - Fix PV inverters power distribution by @daniel-zullo-frequenz in #1028
- Prevent stacking of power requests by @daniel-zullo-frequenz in #1023
- Fix gap in ring buffer when updating missing values by @cwasicki in #1034
- Fix exit-on-timeout issue in PowerDistributor by @shsms in #1035
- Fix typo and improve formatting by @llucax in #1033
- Cleanup the
actorpackage by @shsms in #1031 - Fix grammar in release notes by @shsms in #1040
- Fix glossary links and restrict
mkdocs-autorefsupdates by @llucax in #1043 - Merge v1.0.0-rc6xx into v1.x.x by @llucax in #1042
- Prepare release notes for v1.0.0-rc800 by @shsms in #1046
Full Changelog: v1.0.0rc700...v1.0.0-rc800