Releases: frequenz-floss/frequenz-client-microgrid-python
v0.5.2
Frequenz Microgrid API Client Release Notes
New Features
- The client now supports setting reactive power for components through the new
set_reactive_powermethod.
What's Changed
Full Changelog: v0.5.1...v0.5.2
v0.5.1
Frequenz Microgrid API Client Release Notes
Bug Fixes
- Fix a bug where SSL was enabled by default. It is now disabled by default as in previous versions.
What's Changed
- Clear release notes by @llucax in #83
- Disable SSL by default by @llucax in #85
- Bump the required group across 1 directory with 4 updates by @dependabot in #86
Full Changelog: v0.5.0...v0.5.1
v0.5.0
Frequenz Microgrid API Client Release Notes
Upgrading
-
This release stops using
betterprotoandgrpclibas backend for gRPC and goes back to using Google'sgrpcioandprotobuf.If your code was using
betterprotoandgrpclib, it now needs to be ported to usegrpcioandprotobuftoo. Remember to also remove anybetterprotoandgrpclibdependencies from your project. -
We are now using base-client v0.6.0.
What's Changed
- Clear release notes by @llucax in #56
- Bump the required group with 14 updates by @dependabot in #57
- Bump docker/build-push-action from 5 to 6 by @dependabot in #58
- Bump brettcannon/check-for-changed-files from 1.2.0 to 1.2.1 by @dependabot in #59
- Configure dependabot to have separate minor updates for in-devel deps by @llucax in #61
- Bump mike from 2.1.1 to 2.1.2 by @dependabot in #65
- Bump pytest from 8.2.1 to 8.2.2 by @dependabot in #67
- Bump pydoclint from 0.4.1 to 0.5.3 by @dependabot in #63
- Fix patterns in dependabot.yml by @llucax in #70
- Bump the required group with 4 updates by @dependabot in #72
- Group GitHub action dependabot updates by @llucax in #71
- Bump the required group across 1 directory with 15 updates by @dependabot in #78
- Drop
betterproto/grpclib(and upgradeclient-base) by @llucax in #80 - Disable
pylintsno-name-in-modulecheck by @llucax in #81 - Prepare readme for release by @Marenz in #82
New Contributors
Full Changelog: v0.4.0...v0.5.0
v0.4.0
Frequenz Microgrid API Client Release Notes
Summary
This release migrates to use betterproto and grpclib instead of grpcio and protobuf internally. It also stops leaking these internal libraries to downstream users. It should now be possible to use the client without having to use grpclib or betterproto directly.
Upgrading
-
The client now uses a string URL to connect to the server, the
grpc_channelandtargetarguments are now replaced byserver_url. The current accepted format isgrpc://hostname[:<port:int=9090>][?ssl=<ssl:bool=false>], meaning that theportandsslare optional and default to 9090 andfalserespectively. You will have to adapt the way you connect to the server in your code. -
The client is now using
grpclibto connect to the server instead ofgrpcio. You might need to adapt your code if you are usinggrpciodirectly. -
The client now doesn't raise
grpc.aio.RpcErrorexceptions anymore. Instead, it raises its own exceptions, one per gRPC error status code, all inheriting fromGrpcError, which in turn inherits fromClientError(as any other exception raised by this library in the future).GrpcErrors have thegrpclib.GRPCErroras their__cause__. You might need to adapt your error handling code to catch these specific exceptions instead ofgrpc.aio.RpcError.You can also access the underlying
grpclib.GRPCErrorusing thegrpc_errorattribute forGrpStatusErrorexceptions, but it is discouraged because it makes downstream projects dependant ongrpclibtoo -
The client now uses protobuf/grpc bindings generated betterproto (frequenz-microgrid-betterproto) instead of grpcio (frequenz-api-microgrid). If you were using the bindings directly, you might need to do some minor adjustments to your code.
-
If an unknown EV charger component state is received, it will now be set to
EVChargerComponentState.UNKNOWNinstead ofEVChargerComponentState.UNSPECIFIED.
New Features
-
The client now raises more specific exceptions based on the gRPC status code, so you can more easily handle different types of errors.
For example:
try: connections = await client.connections() except OperationTimedOut: ...
instead of:
try: connections = await client.connections() except grpc.aio.RpcError as e: if e.code() == grpc.StatusCode.DEADLINE_EXCEEDED: ...
-
We now expose component errors as part of the streamed component data:
BatteryData.errorsInverterData.errors
-
We now expose component states as part of the streamed component data:
BatteryData.component_stateandBatteryData.relay_stateInverterData.component_state
-
Added the missing
EVChargerComponentState.UNKNOWNstate.
Bug Fixes
- Fix a leakage of
GrpcStreamBroadcasterinstances. - The user-passed retry strategy was not properly used by the data streaming methods.
- The client
set_bounds()method might have not done anything and if it did, errors were not properly raised.
What's Changed
- Clear release notes by @llucax in #32
- Bump nox from 2023.4.22 to 2024.3.2 by @dependabot in #35
- Update protobuf requirement from <5,>=4.21.6 to >=4.21.6,<6 by @dependabot in #34
- Bump nox from 2024.3.2 to 2024.4.15 in the required group by @dependabot in #38
- Improve exception messages by @llucax in #43
- Fix a few bugs related to
GrpcStreamBroadcasterby @llucax in #42 - Bump client-base to v0.4.0 by @llucax in #44
- Properly await for
AddInclusionBoundsby @llucax in #47 - Allow using
Noneto specify the default retry strategy by @llucax in #46 - Raise a new
ClientErrorinstead ofAioRpcErrorby @llucax in #48 - Convert to
betterprotoby @llucax in #37 - Make the client accept a server URL to connect to by @llucax in #49
- Add specific gRPC client errors by @llucax in #53
- Add missing state and error wrappers by @llucax in #54
Full Changelog: v0.3.0...v0.4.0
v0.3.0
Frequenz Microgrid API Client Release Notes
New Features
- The
reactive_poweris exposed for meters, inverters and EV chargers.
What's Changed
- Clear RELEASE_NOTES.md by @shsms in #27
- Add reactive power for inverters, meters and EV chargers by @llucax in #30
- Improve Location docs and tests by @llucax in #29
- Widen the channels dependency by @llucax in #31
Full Changelog: v0.2.0...v0.3.0
v0.2.0
Frequenz Microgrid API Client Release Notes
Summary
This release updates the minimum required frequenz-channels version is updated
to v1.0.0-rc1. This is a breaking change, because the channels API has changed.
Upgrading
Follow the upgrading instructions from the new channel release: v1.0.0-rc1.
What's Changed
- Clear release notes by @llucax in #25
- Update minimum
frequenz-channelsversion tov1.0.0-rc1by @shsms in #26
New Contributors
Full Changelog: v0.1.2...v0.2.0
v0.1.2
Frequenz Microgrid API Client Release Notes
Summary
This version downgrades the protobuf dependency to 4.21.6.
This is the version used in the SDK v1.0.0-rc5, which we imported the code from. If we don't do this we introduce an unnecessary dependency conflict with the SDK.
What's Changed
Full Changelog: v0.1.1...v0.1.2
v0.1.1
Frequenz Microgrid API Client Release Notes
Summary
This release add some symbols that were missing from the public API:
ComponentCategoryComponentMetadataComponentMetricIdComponentTypeFuseGridMetadataInverterType
What's Changed
Full Changelog: v0.1.0...v0.1.1
v0.1.0
Frequenz Microgrid API Client Release Notes
Summary
Code import from the SDK v1.0.0-rc5 release.
Upgrading
Changes compared to the code in the SDK v1.0.0-rc5 release:
-
The
MicrogridGrpcClientclass was renamed toApiClient.- The
retry_specconstructor argument was renamed toretry_strategy.
- The
-
The
MicrogridApiClientabstract base class was removed, useApiClientinstead. -
The
Connectionclass is now adataclassinstead of aNamedTuple. If you use the tuple-like interface (connection[0], etc.) you should use the named attributes instead or usedataclasses.astuple()to convert it to a tuple.
What's Changed
- Generate project structure using repo-config by @llucax in #1
- Import code from the SDK v1.0.0-rc5 by @llucax in #9
- Bump actions/cache from 3 to 4 by @dependabot in #5
- Bump actions/setup-python from 4 to 5 by @dependabot in #4
- Bump flake8 from 6.1.0 to 7.0.0 by @dependabot in #7
- Bump black from 23.9.1 to 24.2.0 by @dependabot in #8
- Bump actions/{up,down}load-artifact from 3 to 4 by @dependabot in #2
- Bump the optional group with 12 updates by @dependabot in #10
- Clean up the code by @llucax in #11
- Add more tests from the SDK v1.0.0-rc5 by @llucax in #12
- Use streaming helper and retry strategies from
frequenz-client-baseby @llucax in #17 - Upgrade
client-baseto v0.2.0 by @llucax in #20 - Bump mkdocs-material from 9.5.11 to 9.5.12 by @llucax in #19
New Contributors
- @llucax made their first contribution in #1
- @dependabot made their first contribution in #5
Full Changelog: https://github.com/frequenz-floss/frequenz-client-microgrid-python/commits/v0.1.0