v1.0.0-rc3
Pre-releaseFrequenz Python SDK Release Notes
Summary
The microgrid
package now exposes grid connections uniformly and introduces formula operators for consumption
and production
, replacing the logical_meter.*_{production,consumption}()
formulas. The actor
package restarts crashed actors with a delay, and the ConnectionManager
exposes the microgrid_id
and location
details.
There are also a few bug fixes, documentation improvements and other minor breaking changes.
Upgrading
-
actor
package-
Actors are now restarted after a small delay when they crash to avoid a busy loop and spamming the logs if the actor keeps failing to start.
-
The
include_broken_batteries
argument was removed from thePowerDistributingActor
'sRequest
. This option is no longer supported.
-
-
microgrid
package-
grid
: The grid connection is now exposed asmicrogrid.grid()
. This is more consistent with other objects exposed in themicrogrid
module, such asmicrogrid.battery_pool()
andmicrogrid.logical_meter()
. -
battery_pool()
: Theinclude_broken_batteries
argument was removed from thepropose_*()
methods (it was also removed from the underlying type,timeseries.BatteryPool
). This option is no longer supported. -
ComponentGraph
: The component graph is now exposed asmicrogrid.component_graph.ComponentGraph
. -
logical_meter()
: The*_consumption()
and*_production()
methods were removed. You should use the newconsumption
andproduction
formula operators instead.For example:
# Old: pv_consumption = logical_meter.pv_consumption_power() production = (logical_meter.pv_production_power() + logical_meter.chp_production_power()).build() # New: pv_consumption = logical_meter.pv_power().consumption().build() production = (logical_meter.pv_power().production() + logical_meter.chp_power().production()).build()
-
New Features
-
The configuration flag
resend_latest
can now be changed for channels owned by theChannelRegistry
. -
New formula operators for calculating
consumption()
andproduction()
were added. -
The
ConnectionManager
now fetches microgrid metadata when connecting to the microgrid and exposesmicrogrid_id
andlocation
properties of the connected microgrid.Users can access this information using
microgrid.connection_manager.get().microgrid_id
andmicrogrid.connection_manager.get().location
. -
The documentation has been improved to:
- Display signatures with types.
- Show inherited members.
- Publish documentation for pre-releases.
- Present the full tag name as the documentation version.
- Ensure all development branches have their documentation published (the
next
version has been removed). - Fix the order of the documentation versions.
Bug Fixes
-
Fixed incorrect grid current calculations in locations where the calculations depended on current measurements from an inverter.
-
Corrected the power failure report to exclude any failed power calculations from the successful ones.
What's Changed
- Remove support for
include_broken_batteries
in control commands by @shsms in #713 - Improve code reusability/modularity in PowerDistributor by @Marenz in #717
- Document microgrid concepts from an SDK perspective by @shsms in #722
- Documentation for the FormulaEngine by @shsms in #731
- Bump types-protobuf from 4.24.0.2 to 4.24.0.3 by @dependabot in #734
- Expose
ComponentGraph
from its own module by @shsms in #738 - Document methods for creating data pipeline interface objects by @shsms in #739
- Add a restart delay to actors to avoid spam-restarting of buggy actors by @christianparpart in #741
- Rename datetime to timestamp variables by @daniel-zullo-frequenz in #742
- Redesign access to migrogrid.grid() by @christianparpart in #707
- Set
resent_latest=True
forBatteryPool.power_status
's channels by @shsms in #743 - Clean warnings in tests by @daniel-zullo-frequenz in #744
- Add consumtion and production operations to Formula Engine by @matthias-wende-frequenz in #746
- Use exclusion bounds while calculating target powers in PowerManager by @shsms in #755
- Remove the consumption and production power formulas by @matthias-wende-frequenz in #697
- Change internal presense of the Grid, eliminating
_grid
by @christianparpart in #747 - Update DataSourcingActor to accept current requests for inverters by @shsms in #759
- Remove unused paranthesis in formula generators by @shsms in #761
- Fix bug in inverter current data extractor by @shsms in #762
- Rename nitrogen to Microgrid service by @andrew-stevenson-frequenz in #760
- Add try/finally to decorated context managers yield statement by @christianparpart in #757
- Fix power failure report by @daniel-zullo-frequenz in #763
- Update to repo-config v0.7.4 by @llucax in #752
- Make the SDK's representation of bounds data internal by @shsms in #756
- Bump mike from 1.1.2 to 2.0.0 by @dependabot in #766
- Use a custom logger in the data sourcing actor by @shsms in #769
- Fetch and expose microgrid ID and location by @daniel-zullo-frequenz in #708
- Prepare release notes for the v1.0.0-rc3 release by @llucax in #775
New Contributors
- @andrew-stevenson-frequenz made their first contribution in #760
Full Changelog: v1.0.0-rc2...v1.0.0-rc3