Skip to content

Commit

Permalink
docs: changelog entry for v0.19.1, plus 2 fixes
Browse files Browse the repository at this point in the history
Signed-off-by: F.N. Claessen <felix@seita.nl>
  • Loading branch information
Flix6x committed Feb 26, 2024
1 parent 0b6f722 commit e15b67b
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 14 deletions.
2 changes: 1 addition & 1 deletion documentation/api/change_log.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ API change log
v3.0-16 | 2024-02-26
""""""""""""""""""""

- Fix support for providing a sensor definition to the ``site-power-capacity`` flex-config field for `/sensors/<id>/schedules/trigger` (POST).
- Fix support for providing a sensor definition to the ``power-capacity`` flex-model field for `/sensors/<id>/schedules/trigger` (POST).

v3.0-15 | 2024-01-11
""""""""""""""""""""
Expand Down
12 changes: 10 additions & 2 deletions documentation/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ Infrastructure / Support
----------------------




v0.19.1 | February 26, 2024
============================

* Support defining the ``power-capacity`` as a sensor in the API and CLI [see `PR #987 <https://github.com/FlexMeasures/flexmeasures/pull/987>`_]


v0.19.0 | February 18, 2024
============================

Expand Down Expand Up @@ -52,7 +60,8 @@ v0.18.2 | February 26, 2024
* Convert unit of the power capacities to ``MW`` instead of that of the storage power sensor [see `PR #979 <https://github.com/FlexMeasures/flexmeasures/pull/979>`_]
* Automatically update table navigation in the UI without requiring users to hard refresh their browser [see `PR #961 <https://github.com/FlexMeasures/flexmeasures/pull/961>`_]
* Updated documentation to enhance clarity for integrating plugins within the FlexMeasures Docker container [see `PR #958 <https://github.com/FlexMeasures/flexmeasures/pull/958>`_]
* Support defining the ``site-power-capacity`` as a sensor [see `PR #987 <https://github.com/FlexMeasures/flexmeasures/pull/987>`_]
* Support defining the ``power-capacity`` as a sensor in the API [see `PR #987 <https://github.com/FlexMeasures/flexmeasures/pull/987>`_]


v0.18.1 | January 15, 2024
============================
Expand All @@ -69,7 +78,6 @@ Bugfixes
* Fix the validation of the option ``--parent-asset`` of command ``flexmeasures add asset`` [see `PR #959 <https://github.com/FlexMeasures/flexmeasures/pull/959>`_]



v0.18.0 | December 23, 2023
============================

Expand Down
13 changes: 5 additions & 8 deletions documentation/cli/change_log.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ since v.0.20.0 | March XX, 2024

* Add command ``flexmeasures edit transfer-ownership`` to transfer the ownership of an asset and its children.

since v0.19.1 | February 26, 2024
=======================================

* Fix support for providing a sensor definition to the ``--storage-power-capacity`` option of the ``flexmeasures add schedule for-storage`` command.

since v0.19.0 | February 18, 2024
=======================================

Expand All @@ -32,19 +37,11 @@ since v0.19.0 | February 18, 2024
* ``--source-id`` -> ``--source``
* ``--user-id`` -> ``--user`
since v0.18.2 | February 26, 2024
=======================================
* Fix support for providing a sensor definition to the ``--site-power-capacity`` option of the ``flexmeasures add schedule for-storage`` command.


since v0.18.1 | January 15, 2024
=======================================
* Fix the validation of the option ``--parent-asset`` of command ``flexmeasures add asset``.


since v0.17.0 | November 8, 2023
=======================================

Expand Down
5 changes: 3 additions & 2 deletions flexmeasures/cli/data_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -1218,10 +1218,11 @@ def create_schedule(ctx):
@click.option(
"--storage-power-capacity",
"storage_power_capacity",
type=QuantityField("MW"),
type=QuantityOrSensor("MW"),
required=False,
default=None,
help="Storage consumption/production power capacity. Provide this as a quantity in power units (e.g. 1 MW or 1000 kW)."
help="Storage consumption/production power capacity. Provide this as a quantity in power units (e.g. 1 MW or 1000 kW)"
"or reference a sensor using 'sensor:<id>' (e.g. sensor:34)."
"It defines both-ways maximum power capacity.",
)
@click.option(
Expand Down
2 changes: 1 addition & 1 deletion flexmeasures/cli/tests/test_data_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def test_add_account(
@pytest.mark.skip_github
@pytest.mark.parametrize("storage_power_capacity", ["sensor", "quantity", None])
@pytest.mark.parametrize("storage_efficiency", ["sensor", "quantity", None])
def test_add_storage_scheduler(
def test_add_storage_schedule(
app,
add_market_prices_fresh_db,
storage_schedule_sensors,
Expand Down
6 changes: 6 additions & 0 deletions flexmeasures/data/models/planning/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,4 +411,10 @@ def get_continuous_series_sensor_or_quantity(

def nanmin_of_series_and_value(s: pd.Series, value: float | pd.Series) -> pd.Series:
"""Perform a nanmin between a Series and a float."""
if isinstance(value, pd.Series):
# Avoid strange InvalidIndexError on .clip due to different "dtype"
# pd.testing.assert_index_equal(value.index, s.index)
# [left]: datetime64[ns, +0000]
# [right]: datetime64[ns, UTC]
value = value.tz_convert("UTC")
return s.fillna(value).clip(upper=value)

0 comments on commit e15b67b

Please sign in to comment.