Skip to content

v1.0.0-rc2101

Latest

Choose a tag to compare

@github-actions github-actions released this 02 Sep 10:05
· 27 commits to v1.x.x since this release
Immutable release. Only release title and notes can be modified.
v1.0.0-rc2101
35abc19

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