Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@

## Upgrading

* Widen the version range of api-common to also allow v0.8.x.
* Restrict entsoe client dependency version range up to v0.7.x.
* Listing gridpool orders that do not contain a price or quantity no longer raises an exception. Users must validate orders themselves.
<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->

## New Features

<!-- Here goes the main new features and examples or instructions on how to use them -->
* Support tags in CLI create-order command.

## Bug Fixes

* Fixed typo in the trading CLI help text.
<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
3 changes: 3 additions & 0 deletions src/frequenz/client/electricity_trading/cli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def receive_gridpool_orders(
@click.option("--currency", default="EUR", type=str)
@click.option("--duration", default=900, type=int)
@click.option("--sign_secret", default=None, type=str)
@click.option("--tag", default=None, type=str)
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The click option for --tag is missing a help description. Consider adding a help parameter to explain what the tag is used for, similar to other options in the function.

Suggested change
@click.option("--tag", default=None, type=str)
@click.option("--tag", default=None, type=str, help="An optional tag to identify or group the order.")

Copilot uses AI. Check for mistakes.
def create_order(
# pylint: disable=too-many-arguments
url: str,
Expand All @@ -181,6 +182,7 @@ def create_order(
currency: str,
duration: int,
sign_secret: str | None = None,
tag: str | None = None,
) -> None:
"""Create an order.

Expand All @@ -201,6 +203,7 @@ def create_order(
currency=currency,
duration=timedelta(seconds=duration),
sign_secret=sign_secret,
tag=tag,
)
)

Expand Down
3 changes: 3 additions & 0 deletions src/frequenz/client/electricity_trading/cli/etrading.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ async def create_order(
currency: str,
duration: timedelta,
sign_secret: str | None = None,
tag: str | None = None,
) -> None:
"""Create a limit order for a given price and quantity (in MW).

Expand All @@ -251,6 +252,7 @@ async def create_order(
currency: Currency of the price.
duration: Duration of the delivery period.
sign_secret: The cryptographic secret to use for HMAC generation.
tag: Optional tag to attach to the order.
"""
client = Client(server_url=url, auth_key=auth_key, sign_secret=sign_secret)

Expand All @@ -274,6 +276,7 @@ async def create_order(
currency=Currency[currency],
),
quantity=quantity,
tag=tag,
)

print_order(order)
Expand Down