v1.0.0-rc6
Pre-releaseFrequenz Python SDK Release Notes
Summary
The most notable features for this release is the addition of the PVPool
(exposed via microgrid.pv_pool()
), which can be used to manage PV arrays as a single entity and the EVChargerPool
(microgrid.ev_charger_pool()
) learning to manage power for the whole pool (before it could only be used to control chargers individually).
Another notable change is the microgrid API client being moved to its own repository.
Upgrading
-
The SDK is now using the microgrid API client from
frequenz-client-microgrid
. You should update your code if you are using the microgrid API client directly. -
The minimum required
frequenz-channels
version is nowv1.0.0-rc1
. -
The set of battery IDs managed by a battery pool are now available through
BatteryPool.component_ids
, and no longer throughBatteryPool.battery_ids
. This is done to have a consistent interface with other*Pool
s. -
The
maxsize
parameter in calls toBatteryPool.{soc/capacity/temperature}.new_receiver()
methods have now been renamed tolimit
, to be consistent with the channels repository. -
Support for per-component interaction in
EVChargerPool
has been removed. Please use the newpropose_power()
method to manage power for the whole pool. If you still need to manage power of chargers individually, you can create one pool per charger. -
PV power is now available from
microgrid.pv_pool().power
, and no longer frommicrogrid.logical_meter().pv_power
.
New Features
-
EVChargerPool
/microgrid.ev_charger_pool()
: Newpropose_power
andpower_status
methods have been added, similar to theBatteryPool
. These method interface with thePowerManager
andPowerDistributor
, which currently uses a first-come-first-serve algorithm to distribute power to EVs. -
A PV pool (
PVPool
/microgrid.pv_pool()
) was added, withpropose_power
,power_status
andpower
methods similar to Battery and EV pools. -
The microgrid API client now exposes the reactive power for inverters, meters and EV chargers.
Enhancements
-
Warning messages are logged when multiple instances of
*Pool
s are created for the same set of batteries, with the same priority values. -
A warning message will now be logged if no relevant samples are found in a component for resampling.
Bug Fixes
-
A bug was fixed where the grid fuse was not created properly and would end up with a
max_current
with typefloat
instead ofCurrent
. -
BatteryPool.propose_discharge
now converts power values to the passive-sign convention. Earlier it was not doing this and that was causing it to charge instead of discharge. -
Fix a bug that was causing the power managing actor to crash and restart when cleaning up old proposals.
What's Changed
- Clear release notes by @llucax in #617
- Initialize a
Grid
object with a givenFuse
limit by @tiyash-basu-frequenz in #610 - Upgrade to repo-config v0.6.1 by @llucax in #620
- Bump polars from 0.18.15 to 0.19.1 by @dependabot in #626
- Bump the optional group with 4 updates by @dependabot in #634
- Bump types-setuptools from 68.1.0.0 to 68.1.0.1 by @dependabot in #635
- Don't return
None
from battery pool methods by @stefan-brus-frequenz in #612 - Clarify documentation of BatteryPool soc and capacity methods by @stefan-brus-frequenz in #637
- Document class and module attributes by @daniel-zullo-frequenz in #618
- Add microgrid.frequency() by @Marenz in #579
- Treat NaN as gap in ring buffer by @cwasicki in #641
- Replace obsolete types by @daniel-zullo-frequenz in #644
- Move "fake_time" fixture to conftest.py by @stefan-brus-frequenz in #639
- Improve formula formatting to use infix notation by @christianparpart in #613
- Merge v0.25.1 by @llucax in #652
- Add a glossary to the documentation by @llucax in #647
- Add capacity, oldest and newest timestamp to moving window by @cwasicki in #598
- [ci] Add tests for non-native architectures by @tiyash-basu-frequenz in #622
- Bump actions/checkout from 3 to 4 by @dependabot in #655
- ci: Fix publishing of documentation on push by @llucax in #657
- Add a job to join the
nox
matrix jobs by @llucax in #661 - Add more formula tests for min and max functions by @matthias-wende-frequenz in #623
- Fixes on copy behavior in ring buffer window method by @cwasicki in #638
- Drop formula step Averager by @christianparpart in #645
- Refactor power distribution Result by @daniel-zullo-frequenz in #659
- Adjust the glossary to 80 columns by @llucax in #666
- Replace len magic with count_valid method in ring buffer and moving window by @cwasicki in #664
- Prepare release notes for the 1.0.0-rc1 release by @llucax in #674
- 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
- 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
- Clear release notes by @llucax in #777
- Make
PowerManagingActor
more modular and generic by @shsms in #773 - Fix type hint errors in microgrid client by @daniel-zullo-frequenz in #778
- Use custom loggers for each module by @daniel-zullo-frequenz in #780
- Bump types-protobuf from 4.24.0.3 to 4.24.0.4 by @dependabot in #749
- Modularize status tracking for pools of components in the power distributing actor by @shsms in #779
- Generalize PowerDistributingActor by @shsms in #786
- Move Fuse to timeseries module by @daniel-zullo-frequenz in #781
- Move grid power and current metrics to Grid by @daniel-zullo-frequenz in #758
- Bump frequenz-channels from 0.16 to 1.0.0b2 by @christianparpart in #764
- Rename
ComponentGraph.components()
parameters to be plural by @Marenz in #791 - Update some tests to use time machine by @matthias-wende-frequenz in #798
- Un-Peekable-ification of the PowerDistributingActor by @shsms in #800
- Pass through 0W requests to the microgrid API independent of exclusion bounds by @shsms in #801
- Update
frequency()
to no longer have parameters by @Marenz in #788 - Fix frequency sending
Quantity
by @Marenz in #804 - Fix the resampler handling of output zeros by @llucax in #811
- Fetch and stream 3-phase voltage by @daniel-zullo-frequenz in #815
- Speedup tests by lowering the actors restart delay by @llucax in #828
- Bump actions/setup-python from 4 to 5 by @dependabot in #834
- Add missing type hints to instance members by @llucax in #809
- Fix bug in
GridFrequency
quantity conversion by @llucax in #807 - Improve (and fix some) test finalization by @llucax in #838
- Make the registry type-aware by @llucax in #830
- Improve BatteryPool's SoC accuracy at the edges by @shsms in #843
- Some component status cleanup by @shsms in #839
- Drop old propsals from the PowerManager by @shsms in #845
- Improvements to EVChargerData coming from the microgrid API by @shsms in #848
- Use a sentinel in
LatestValueCache
to denote if the cache is empty by @shsms in #846 - Move consumer and producer formulas out from logical meter by @daniel-zullo-frequenz in #799
- Parse Quantity Strings by @Marenz in #824
- Bump frequenz-api-microgrid to 0.15.3 by @llucax in #855
- Bump the optional group with 14 updates by @dependabot in #837
- Bump types-protobuf from 4.24.0.4 to 4.24.0.20240129 by @dependabot in #867
- Bump flake8 from 6.1.0 to 7.0.0 by @dependabot in #860
- Bump setuptools related dependencies by @dependabot in #863
- Bump actions/cache from 3 to 4 by @dependabot in #858
- Bump pylint from 2.17.5 to 3.0.3 by @dependabot in #866
- Bump black from 23.12.1 to 24.1.1 by @dependabot in #865
- Remove unused type stubs by @llucax in #869
- Add release notes summary for the release by @llucax in #870
- Clear release notes by @llucax in #871
- Fetch and stream 3-phase power by @daniel-zullo-frequenz in #847
- Remove remaining traces of darglint by @llucax in #873
- Make sure
base_value
is alwaysfloat
by @llucax in #874 - Remove the last reference to darglint by @llucax in #877
- Mock resampler: Improve variable names by @llucax in #879
- Allow multiplying
Quantity
byfloat
by @llucax in #875 - Remove unnecessary send adapter by @llucax in #878
- Bump actions/{up,down}load-artifact from 3 to 4 by @dependabot in #833
- Allow all quantities division by
float | Self
by @llucax in #876 - Cleanup and modularization of Power Manager, Power Distributor and DataPipeline by @shsms in #881
- More updates for n:m support - battery pool's power formula by @Marenz in #730
- Prepare release notes for 1.0.0-rc5 by @llucax in #884
- Clear release notes by @llucax in #886
- Bump types-markdown from 3.5.0.3 to 3.5.0.20240129 by @dependabot in #889
- Bump actions/labeler from 4.3.0 to 5.0.0 by @dependabot in #836
- Replace the internal microgrid API client with
frequenz-client-microgrid
by @llucax in #892 - Upgrade channel version to
1.0.0-rc1
by @shsms in #893 - Improve consistency between
*Pool
s by @shsms in #894 - Remove support for per-component interaction in EVChargerPool by @shsms in #895
- Add a
ComponentCategory
parameter to thePowerDistributingActor
by @shsms in #896 - Bug fixes in the PowerManager and the BatteryPool by @shsms in #898
- Widen the channels dependency to allow for the final 1.0.0 release by @llucax in #909
- Amend actor documentation by @daniel-zullo-frequenz in #883
- Control methods for
EVChargerPool
usingPowerManager
andPowerDistributor
by @shsms in #900 - Warn if duplicate
*pool
instances are being created by @shsms in #904 - Some EV charger pool cleanup and fixes by @shsms in #919
- Add a
PVPool
implementation by @shsms in #914 - Bump the optional group with 17 updates by @dependabot in #911
- Prepare release notes for the v1.0.0-rc6 release by @llucax in #924
- Log when no relevant samples are found for resampling by @daniel-zullo-frequenz in #923
- Update microgrid client to v0.3 by @matthias-wende-frequenz in #925
New Contributors
- @stefan-brus-frequenz made their first contribution in #612
- @andrew-stevenson-frequenz made their first contribution in #760
Full Changelog: v0.25.2...v1.0.0-rc6