Skip to content

Releases: frequenz-floss/frequenz-sdk-python

v1.0.0-rc2101

02 Sep 10:05
Immutable release. Only release title and notes can be modified.
v1.0.0-rc2101
35abc19
Compare
Choose a tag to compare

Frequenz Python SDK Release Notes

Summary

This release provides an experimental, opt-in, time-jumps resilient resampler, that can be enabled by using the new ResamplerConfig2 class.

Upgrading

  • The resampling function now takes plain floats as values instead of Quantity objects.
  • frequenz.sdk.timeseries.UNIX_EPOCH was removed, use frequenz.core.datetime.UNIX_EPOCH instead.

New Features

  • A new configuration mode was added to the resampler (and thus the resampling actor and microgrid high-level interface). When passing a new ResamplerConfig2 instance to the resampler, it will use a wall clock timer instead of a monotonic clock timer. This timer adjustes sleeps to account for drifts in the monotonic clock, and thus allows for more accurate resampling in cases where the monotonic clock drifts away from the wall clock. The monotonic clock timer option will be deprecated in the future, as it is not really suitable for resampling. The new ResamplerConfig2 class accepts a WallClockTimerConfig to fine-tune the wall clock timer behavior, if necessary.

    Example usage:

    from frequenz.sdk import microgrid
    from frequenz.sdk.timeseries import ResamplerConfig2
    
     await microgrid.initialize(
         MICROGRID_API_URL,
         # Just replace the old `ResamplerConfig` with the new `ResamplerConfig2`
         resampler_config=ResamplerConfig2(resampling_period=timedelta(seconds=1.0)),
     )

Bug Fixes

  • When using the new wall clock timer in the resampmler, it will now resync to the system time if it drifts away for more than a resample period, and do dynamic adjustments to the timer if the monotonic clock has a small drift compared to the wall clock.

  • A power distributor logging issue is fixed, that was causing the power for multiple batteries connected to the same inverter to be reported incorrectly.

What's Changed

  • Bump the minor group across 1 directory with 6 updates by @dependabot[bot] in #1240
  • Improve resampler structure and performance by @llucax in #1242
  • Bump pytest-asyncio from 0.26.0 to 1.0.0 by @dependabot[bot] in #1244
  • Bump the patch group with 6 updates by @dependabot[bot] in #1243
  • Remove obsolete hpack logging adjustment from examples by @Copilot in #1247
  • Bump async-solipsism from 0.7 to 0.8 by @dependabot[bot] in #1257
  • Bump pytest-asyncio from 1.0.0 to 1.1.0 by @dependabot[bot] in #1256
  • Bump types-setuptools from 80.9.0.20250529 to 80.9.0.20250801 by @dependabot[bot] in #1255
  • Bump types-markdown from 3.8.0.20250415 to 3.8.0.20250708 by @dependabot[bot] in #1253
  • Bump mkdocs-material from 9.6.15 to 9.6.16 in the patch group by @dependabot[bot] in #1250
  • Bump the compatible group with 2 updates by @dependabot[bot] in #1258
  • Bump types-protobuf from 6.30.2.20250516 to 6.30.2.20250703 by @dependabot[bot] in #1254
  • Bump the minor group with 2 updates by @dependabot[bot] in #1251
  • Remove unncessary use of tzdata in tests by @denini08 in #1261
  • Add a wall clock attached timer by @llucax in #1249
  • Bump mkdocstrings[python] from 0.29.1 to 0.30.0 in the mkdocstrings group by @dependabot[bot] in #1252
  • Fix log when multiple batteries are attached to an inverter by @shsms in #1262
  • Bump types-protobuf from 6.30.2.20250703 to 6.30.2.20250822 by @dependabot[bot] in #1272
  • Bump mkdocstrings-python from 1.16.12 to 1.18.2 in the mkdocstrings group by @dependabot[bot] in #1267
  • Bump the patch group with 3 updates by @dependabot[bot] in #1265
  • Bump hypothesis from 6.136.8 to 6.138.13 in the minor group by @dependabot[bot] in #1266
  • Bump actions/checkout from 4 to 5 by @dependabot[bot] in #1264
  • Bump pydoclint from 0.6.6 to 0.7.1 by @dependabot[bot] in #1268
  • Bump setuptools-scm[toml] from 8.3.1 to 9.2.0 by @dependabot[bot] in #1271
  • Bump actions/download-artifact from 4 to 5 in the artifacts group by @dependabot[bot] in #1263
  • Bump types-markdown from 3.8.0.20250708 to 3.8.0.20250809 by @dependabot[bot] in #1270
  • Bump types-setuptools from 80.9.0.20250801 to 80.9.0.20250822 by @dependabot[bot] in #1269
  • Prepare release notes for the release by @llucax in #1273

New Contributors

  • @Copilot made their first contribution in #1247
  • @denini08 made their first contribution in #1261

Full Changelog: v1.0.0-rc2100...v1.0.0-rc2101

v1.0.0-rc2100

26 Jun 12:43
v1.0.0-rc2100
9d617fa
Compare
Choose a tag to compare

Frequenz Python SDK Release Notes

Summary

Upgrading

  • The microgrid client dependency has been updated to version 0.9.0

New Features

Bug Fixes

What's Changed

New Contributors

Full Changelog: v1.0.0-rc2001...v1.0.0-rc2100

v1.0.0-rc2002

24 Jun 12:56
v1.0.0-rc2002
9d617fa
Compare
Choose a tag to compare
v1.0.0-rc2002 Pre-release
Pre-release

Frequenz Python SDK Release Notes

Summary

Upgrading

  • The microgrid client dependency has been updated to version 0.9.0

New Features

Bug Fixes

What's Changed

New Contributors

Full Changelog: v1.0.0-rc2001...v1.0.0-rc2002

v1.0.0-rc2001

11 Jun 09:47
v1.0.0-rc2001
56f1671
Compare
Choose a tag to compare
v1.0.0-rc2001 Pre-release
Pre-release

Frequenz Python SDK Release Notes

Bug Fixes

  • Fix TypeError raised by BatteryManager when distributing power

What's Changed

Full Changelog: v1.0.0-rc2000...v1.0.0-rc2001

v1.0.0-rc2000

26 May 14:33
v1.0.0-rc2000
b9bcd2d
Compare
Choose a tag to compare
v1.0.0-rc2000 Pre-release
Pre-release

Frequenz Python SDK Release Notes

New Features

  • The SDK now officially support Python 3.13.

Bug Fixes

  • Fixed issue where actors would restart instead of stopping when exceptions occurred during cancellation. Actors now properly stop and surface the unhandled exception.

What's Changed

Full Changelog: v1.0.0-rc1900...v1.0.0-rc2000

v1.0.0-rc1900

16 May 08:58
v1.0.0-rc1900
3b61b7c
Compare
Choose a tag to compare
v1.0.0-rc1900 Pre-release
Pre-release

Frequenz 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-microgrid v0.7.x series. The main change is now all component and microgrid IDs need to be passed using the wrapper classes ComponentId/MicrogridId instead of int.

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/PartialFailure results from PVPool.power_distribution_results now report correct succeeded_power values.

  • The find_first_descendant_component method 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 the GRID component.

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 Power instead of float in 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_power calculation 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

v1.0.0-rc1802

22 Apr 10:24
v1.0.0-rc1802
c1c887e
Compare
Choose a tag to compare
v1.0.0-rc1802 Pre-release
Pre-release

Frequenz Python SDK Release Notes

Bug Fixes

  • The additive ShiftingMatryoshka algorithm was made for batteries, but got set as the default algorithm for PV and EV chargers. This is now reversed and PV and EV chargers are back to using the original Matryoshka algorithm.

What's Changed

  • Clear release notes by @shsms in #1201
  • Use the additive ShiftingMatryoshka algorithm only for batteries by @shsms in #1202

Full Changelog: v1.0.0-rc1801...v1.0.0-rc1802

v1.0.0-rc1801

16 Apr 08:56
v1.0.0-rc1801
8bdcbc9
Compare
Choose a tag to compare
v1.0.0-rc1801 Pre-release
Pre-release

Frequenz Python SDK Release Notes

Bug Fixes

  • Fixes a bug where battery pool metrics would stop for one actor when another actor managing the same components stops its pool.

What's Changed

Full Changelog: v1.0.0-rc1800...v1.0.0-rc1801

v1.0.0-rc1800

15 Apr 08:40
v1.0.0-rc1800
326998b
Compare
Choose a tag to compare
v1.0.0-rc1800 Pre-release
Pre-release

Frequenz Python SDK Release Notes

Upgrading

  • The microgrid.new_*_pool methods no longer accept a set_operating_point parameter.
  • The power manager now uses a new algorithm described here.

Bug Fixes

  • Fix MetricFetcher leaks when a requested metric fetcher already existed.

What's Changed

Full Changelog: v1.0.0-rc1700...v1.0.0-rc1800

v1.0.0-rc1700

28 Feb 09:45
v1.0.0-rc1700
fe7321c
Compare
Choose a tag to compare
v1.0.0-rc1700 Pre-release
Pre-release

Frequenz Python SDK Release Notes

Summary

New Features

  • Add a stop() method to the FormulaEngine. Now it is possible to stop custom formulas.

  • Stop fallback formulas when primary formula starts working again.

Bug Fixes

  • Fixed a bug with formulas raising exception when stopped.

  • Fixed a bug that raised CancelledError when actor was started with frequenz.sdk.actor.run and stopped.

  • Stop catching BaseException in frequenz.sdk.actor.run. Only CancelledError and Exception are caught now.

What's Changed

Full Changelog: v1.0.0-rc1600...v1.0.0-rc1700