Frequenz-sdk

Latest version: v0.25.2

Safety actively analyzes 642295 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 5

0.18.0

Release Notes

Summary

Upgrading

New Features

* A new class `OrderedRingBuffer` is now available, providing a sorted ring buffer of datetime-value pairs with tracking of any values that have not yet been written.
* Add logical meter formula for EV power.
* A `MovingWindow` class has been added that consumes a data stream from a logical meter and updates an `OrderedRingBuffer`.
* Add EVChargerPool implementation. It has only streaming state changes for ev chargers, now.
* Add 3-phase current formulas: `3-phase grid_current` and `3-phase ev_charger_current` to the LogicalMeter.


Bug Fixes

* Add COMPONENT_STATE_DISCHARGING as valid state for the inverter. DISCHARGING state was missing by mistake and this caused the power distributor to error out if the inverter is already discharging.


What's Changed
* Clean release notes by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/179
* Add 3-phase current formulas by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/164
* Sorted Ringbuffer by mathias-baumann-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/139
* Use MockMicrogridClient instead of a MockMicrogridServer in LogicalMeter tests by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/180
* Battery status with channel communication by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/171
* Update code to pass newly-released `black v23.1.0` by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/192
* Update to work with newly-release `pylint v2.16` by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/193
* Use `Sample` type with the RingBuffer by mathias-baumann-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/186
* Add logical meter formula generator for EV power by daniel-zullo-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/185
* Add an `EVChargerPool` implementation by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/194
* Add 3.11 to the supported Python versions by leandro-lucarella-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/195
* Add a Moving Window Class by matthias-wende-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/190
* Move dev dependencies to pyproject.toml by leandro-lucarella-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/199
* Add COMPONENT_STATE_DISCHARGING to valid inverter states by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/202

New Contributors
* matthias-wende-frequenz made their first contribution in https://github.com/frequenz-floss/frequenz-sdk-python/pull/190

**Full Changelog**: https://github.com/frequenz-floss/frequenz-sdk-python/compare/v0.17.0...v0.18.0

0.17.0

Broken version

**This version has a major bug in the power distributor, and it is recommended not to be used. Please upgrade to v0.18.0, there are no breaking changes so updating should be trivial.**

----

Release Notes

Summary

Upgrading

* The resampler now takes a `name` argument for `add_timeseries()`. This is only used for logging purposes.

* The resampler and resampling actor now takes a `ResamplerConfig` object in the constructor instead of the individual values.

* The resampler and resampling actor can emit errors or warnings if the buffer needed to resample is too big. If it is bigger than `ResamplingConfig.max_buffer_len`, the buffer will be truncated to that length, so the resampling can lose accuracy.

* The `ResamplingFunction` now takes different arguments:

* `resampling_period_s` was removed.
* `resampler_config` is the configuration of the resampler calling the resampling function.
* `source_properties` is the properties of the source being resampled.

* Update frequenz-channel-python dependency to the latest release v0.12.0

* The `MetricFetcher` now propagates *NaN* to handle None values when `None` are not treated from the stream as `0`s. Then any `FormulaStep` can compute the results without checking for None on each value involved. However the final result is written as `None` rather than NaN/INF in the `FormulaEngine`.

New Features

* The resampler and resampling actor can now take a few new options via the new `ResamplerConfig` object:

* `warn_buffer_len`: The minimum length of the resampling buffer that will emit a warning.
* `max_buffer_len`: The maximum length of the resampling buffer.

* The resampler now infers the input sampling rate of sources and use a buffer size according to it.

This information can be consulted via `resampler.get_source_properties(source)`. The buffer size is now calculated so it can store all the needed samples requested via the combination of `resampling_period_s`, `max_data_age_in_periods` and the calculated `input_sampling_period_s`.

If we are upsampling, one sample could be enough for back-filling, but we store `max_data_age_in_periods` using `input_sampling_period_s` as period, so the resampling functions can do more complex inter/extrapolation if they need to.

If we are downsampling, we want a buffer that can hold `max_data_age_in_periods * resampling_period_s` seconds of data, and we have one sample every `input_sampling_period_s`, so we use a buffer length of: `max_data_age_in_periods * resampling_period_s / input_sampling_period_s`

Bug Fixes

* Fixed logger creationg for some modules.

Some modules didn't create the logger properly so there was no way to configure them using the standard logger configuration system. Because of this, it might have happened that some log messages were never showed, or some message that the user didn't want to get were emitted anyway.

* When automatically generating formulas for calculating grid power, include measurements from EV chargers if any are directly connected to the grid.


What's Changed
* Clear release notes by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/158
* Make resampler infer the input sampling period and buffer length by leandro-lucarella-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/136
* Handle `NaN` values in FormulaEngine by daniel-zullo-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/99
* Use stricter typing for `eval_stack` used by the FormulaEngine by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/162
* Fix minimum requirements test by daniel-zullo-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/163
* Add documentation and usage instructions for noxfile by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/166
* Move code in `util` package to `_internal` by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/168
* Add mock microgrid implementation by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/169
* Define way to create object with async constructor by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/145
* Use measurements from EV chargers when calculating grid power by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/172
* Update frequenz-channel-python to the latest release v0.12.0 by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/173
* Add missing entry to the current release notes by daniel-zullo-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/174
* Update RELEASE NOTES about logical meter bugfix by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/176
* Update release notes before release by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/178

New Contributors
* daniel-zullo-frequenz made their first contribution in https://github.com/frequenz-floss/frequenz-sdk-python/pull/99

**Full Changelog**: https://github.com/frequenz-floss/frequenz-sdk-python/compare/v0.16.0...v0.17.0

0.16.4

Release Notes

Bug Fixes

- Hold on to a reference to all streaming tasks in the microgrid API client, so they don't get garbage collected.


What's Changed
* Remove broken CI steps that are not needed for v0.16.x by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/619


**Full Changelog**: https://github.com/frequenz-floss/frequenz-sdk-python/compare/v0.16.3...v0.16.4

0.16.2

Release Notes

Bug Fixes

- Ping `pypantic` version to `< 2`.


What's Changed
* Limit pydantic to v1 by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/475


**Full Changelog**: https://github.com/frequenz-floss/frequenz-sdk-python/compare/v0.16.1...v0.16.2

0.16.1

Release Notes

Bug Fixes

- Fix battery status logic: inverter that was discharging was considered as not working. So it was impossible to set any command until its state changed.

What's Changed
* Fix bug in battery status by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/237
* Update release notes by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/244


**Full Changelog**: https://github.com/frequenz-floss/frequenz-sdk-python/compare/v0.16.0...v0.16.1

0.16.0

Release Notes

Summary

The Frequenz SDK now supports Python 3.11.

New Features

- Upgrade PowerDistributingActor to track if batteries are working
https://github.com/frequenz-floss/frequenz-sdk-python/pull/117

- Simplify `Resampler` by moving configuration to its own class `ResamplerConfig`
https://github.com/frequenz-floss/frequenz-sdk-python/pull/131

- Add `initial_buffer_len` to the ResamplerConfig. This means that `Resampler` will store at least this number of arguments. Other `Resampler` behaviour won't change
https://github.com/frequenz-floss/frequenz-sdk-python/pull/131

- Ability to compose formula outputs into higher-order formulas:
https://github.com/frequenz-floss/frequenz-sdk-python/pull/133

- Add a formula generator for SoC in the LogicalMeter
https://github.com/frequenz-floss/frequenz-sdk-python/pull/137

Bug Fixes

- Formulas with repeated operators like `1 - 2 - 3` were getting
calculated incorrectly as `1 - (2 - 3)`. This has been fixed in
https://github.com/frequenz-floss/frequenz-sdk-python/pull/141

- Remove `microgrid_api` and `component_graph` arguments from PowerDistributingActor constructor
https://github.com/frequenz-floss/frequenz-sdk-python/pull/156


What's Changed
* Clear release notes by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/129
* Improve resampler buffer and config by leandro-lucarella-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/131
* README: Fix build status badge by leandro-lucarella-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/134
* Add a formula generator for SoC in the LogicalMeter by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/137
* Track status of the batteries by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/117
* Fix formula precedence bug in the `FormulaEngine` by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/141
* Add `FormulaChannel`s for composing formula outputs by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/133
* Update release notes by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/146
* Add a delay for the mock server to start, before creating a client by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/150
* Wait for a short time after starting the test actors by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/153
* Send 0 values from power formulas for non-existant component types by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/151
* Update power distributor to use frequenz.sdk.microgrid by ela-kotulska-frequenz in https://github.com/frequenz-floss/frequenz-sdk-python/pull/156
* Support python 3.11 by shsms in https://github.com/frequenz-floss/frequenz-sdk-python/pull/157


**Full Changelog**: https://github.com/frequenz-floss/frequenz-sdk-python/compare/v0.15.0...v0.16.0

Page 4 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.