v1.0.0-rc1900
Pre-releaseFrequenz Python SDK Release Notes
Summary
This release introduces a number of breaking changes in the config manager, the new ComponentId/MicrogridId types and the numpy version update. It also includes bug-fixes to the component graph and power management.
Upgrading
-
Includes a major update of the numpy dependency to v2.x.
-
The logging configuration was changed, and now the logger name needs to be specified explicitly (the configuration key was used as the name before). This is to be compatible with configuration generated by the UI, which doesn't quote sub-key properly.
-
Before:
[logging.loggers."frequenz.sdk.config"] level = "DEBUG"
-
Now:
[logging.loggers.frequenz_config] name = "frequenz.sdk.config" level = "DEBUG"
-
-
The logging configuration now uses a separate class for the root logger configuration:
RootLoggerConfig.-
Before:
LoggingConfig(root_logger=LoggerConfig(level="ERROR"))
-
Now:
LoggingConfig(root_logger=RootLoggerConfig(level="ERROR"))
-
-
The SDK now depends on the
frequenz-client-microgridv0.7.x series. The main change is now all component and microgrid IDs need to be passed using the wrapper classesComponentId/MicrogridIdinstead ofint.
Bug Fixes
-
The power manager used to just forgot components when all proposals to them are withdrawn, leaving them at their last set power values. This has been fixed by getting the power manager to set the components to their default powers, based on the component category (according to the table below), as the last step.
component category default power Battery 0.0 PV Minimum power (aka max production power) EV Chargers Maximum power (aka max consumption power) -
PV Pool instances can now be created in sites without any PV. This allows for writing generic code that works for all locations, that depends on the PV power formula, for example.
-
Success/PartialFailureresults fromPVPool.power_distribution_resultsnow report correctsucceeded_powervalues. -
The
find_first_descendant_componentmethod in the component graph was allowing non-root components to be used as the root component during traversal. This was leading to confusing behaviour when the root component couldn't be identified deterministically. For example, if the root category was specified as a meter, it could start traversing from a different meter each time. It is no-longer possible to specify a root category anymore and it always traverses from theGRIDcomponent.
What's Changed
- Clear release notes by @shsms in #1203
- Bump setuptools from 78.1.0 to 80.1.0 by @dependabot in #1209
- Update marshmallow requirement from <4,>=3.19.0 to >=3.19.0,<5 by @dependabot in #1210
- Bump types-setuptools from 78.1.0.20250329 to 80.0.0.20250429 by @dependabot in #1211
- Bump the patch group with 3 updates by @dependabot in #1206
- Bump pydoclint from 0.6.5 to 0.6.6 by @dependabot in #1208
- Reset components to default power when all proposals are withdrawn by @shsms in #1212
- Bump the minor group across 1 directory with 7 updates by @dependabot in #1213
- Update numpy dependency to v2 by @cwasicki in #1160
- Update the logging config actor configuration format by @llucax in #1204
- Allow create PVPool instances in locations without PV by @shsms in #1215
- Use
Powerinstead offloatin PowerDistributor's battery manager by @shsms in #1214 - Ensure root component is as close as possible to the grid component by @shsms in #1216
- Upgrade to microgrid client v0.7 by @llucax in #1182
- Fix
succeeded_powercalculation in PV power distribution by @shsms in #1217 - Prepare for v1.0.0-rc1900 by @shsms in #1218
Full Changelog: v1.0.0-rc1802...v1.0.0-rc1900