v1.0.0-rc2
Pre-releaseFrequenz Python SDK Release Notes
Summary
This version ships an experimental version of the Power Manager and includes user documentation.
Upgrading
-
microgrid.battery_pool()
method now accepts a priority value. -
BatteryPool
's control methods- Original methods
{set_power/charge/discharge}
are now replaced bypropose_{power/charge/discharge}
- The
propose_*
methods send power proposals to thePowerManagingActor
, where it can be overridden by proposals from other actors. - They no longer have the
adjust_power
flag, because thePowerManagingActor
will always adjust power to fit within the available bounds.
- Original methods
-
BatteryPool
's reporting methodspower_bounds
is replaced bypower_status
- The
power_status
method streams objects containing:- bounds adjusted to the actor's priorities
- the latest target power for the set of batteries
- the results from the power distributor for the last request
New Features
-
New and improved documentation.
-
A new User Guide section was added, with:
- A glossary.
- An introduction to actors.
-
A new Tutorials section was added, with:
- A getting started tutorial.
-
-
In
OrderedRingBuffer
:- Rename
datetime_to_index
toto_internal_index
to avoid confusion between the internal index and the external index. - Add
index_to_datetime
method to convert external index to corresponding datetime. - Remove
__setitem__
method to enforce usage of dedicatedupdate
method only.
- Rename
-
In
OrderedRingBuffer
andMovingWindow
:- Support for integer indices is added.
- Add
count_covered
method to count the number of elements covered by the used time range. - Add
fill_value
option to window method to impute missing values. By default missing values are imputed withNaN
.
-
Add
at
method toMovingWindow
to access a single element and use it in__getitem__
magic to fully support single element access. -
The PowerDistributingActor now supports n:m relations between inverters and batteries.
This means that one or more inverters can be connected to one or more batteries.
-
A
PowerManagingActor
implementation
Bug Fixes
- Fix rendering of diagrams in the documentation.
- The
__getitem__
magic of theMovingWindow
is fixed to support the same functionality that thewindow
method provides. - Fixes incorrect implementation of single element access in
__getitem__
magic ofMovingWindow
.
What's Changed
- Clear the release notes by @llucax in #675
- Bump the optional group with 9 updates by @dependabot in #683
- Bump docker/setup-buildx-action from 2 to 3 by @dependabot in #680
- Bump docker/setup-qemu-action from 2 to 3 by @dependabot in #681
- Bump docker/build-push-action from 4 to 5 by @dependabot in #682
- Add mkdocs-macros plugin by @llucax in #667
- docs: Add an introduction to actors by @llucax in #679
- mkdocs: Fix numbered code annotations by @llucax in #684
- Add getting started tutorial and tutorial section by @matthias-wende-frequenz in #656
- Remove setitem magic from ring buffer by @cwasicki in #670
- Allow using macros in docstrings by @llucax in #687
- Rename datetime_to_index to to_internal_index by @cwasicki in #686
- Fix mermaid diagrams custom renderer by @llucax in #690
- Update obsolete comment about networkx-stubs by @daniel-zullo-frequenz in #685
- Move Actors documentation to the
actor
module by @llucax in #688 - Don't use generics unnecessarily by @llucax in #698
- Improve Actors documentation by @llucax in #689
- Increment port in microgrid API client tests by @llucax in #699
- Support int indices and slice index behavior in ring buffer and moving window by @cwasicki in #668
- Fix single element access for moving window by @cwasicki in #672
- Rename
Introduction
toUser Guide
and moveTutorials
next to it by @llucax in #701 - Bump types-pytz from 2023.3.1.0 to 2023.3.1.1 by @dependabot in #695
- Bump types-protobuf from 4.24.0.1 to 4.24.0.2 by @dependabot in #696
- Bump types-pyyaml from 6.0.12.11 to 6.0.12.12 by @dependabot in #694
- PowerDistributing: Add support for n:m relations in invs:bats by @Marenz in #660
- Fix bug in how failed batteries are tracked in PowerDistributor by @shsms in #705
- Update pydantic to v2.3 by @daniel-zullo-frequenz in #703
- Add option to impute missing values in window method for moving window by @cwasicki in #669
- Bump pydoclint from 0.3.2 to 0.3.3 by @dependabot in #710
- Implement the PowerManagingActor by @shsms in #692
- Prepare release notes for v1.0.0-rc2 by @llucax in #723
Full Changelog: v1.0.0-rc1...v1.0.0-rc2