Skip to content

feat: support assets api 0.3#114

Merged
sandovalrr merged 1 commit into
frequenz-floss:v0.x.xfrom
sandovalrr:feat/assets-api-0-3
Jul 9, 2026
Merged

feat: support assets api 0.3#114
sandovalrr merged 1 commit into
frequenz-floss:v0.x.xfrom
sandovalrr:feat/assets-api-0-3

Conversation

@sandovalrr

Copy link
Copy Markdown
Contributor

No description provided.

@sandovalrr sandovalrr requested review from a team as code owners June 19, 2026 15:51
@sandovalrr sandovalrr requested review from daniel-zullo-frequenz and removed request for a team June 19, 2026 15:51
@github-actions github-actions Bot added part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests labels Jun 19, 2026
@sandovalrr sandovalrr requested a review from eduardiazf June 19, 2026 15:53
Signed-off-by: Richard Sandoval <rsandovaldev@gmail.com>
@sandovalrr sandovalrr force-pushed the feat/assets-api-0-3 branch from 17a24ec to 8545fc6 Compare June 19, 2026 16:07
@github-actions github-actions Bot added the part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) label Jun 19, 2026
@sandovalrr sandovalrr requested a review from Copilot July 7, 2026 10:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Python Assets client to support frequenz-api-assets / Assets API 0.3.x by adding new list RPC client methods plus the corresponding domain models, protobuf conversions, and test cases.

Changes:

  • Added new client methods for listing gridpools, gridpool energy schedules, market topology relations, microgrids, and microgrid sensors.
  • Introduced new domain model types (e.g., Gridpool, Interval, MarketTopologyRelation, Sensor, etc.) and protobuf conversion helpers.
  • Expanded list_microgrid_electrical_components() with component_ids and categories filters, and added/extended test coverage + release notes.

Reviewed changes

Copilot reviewed 39 out of 39 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_client.py Adds parametrized tests for newly supported list RPCs.
tests/client_test_cases/list_microgrids/success_case.py Success test case data for list_microgrids().
tests/client_test_cases/list_microgrids/error_case.py Permission-denied test case for list_microgrids().
tests/client_test_cases/list_microgrids/empty_case.py Empty-response test case for list_microgrids().
tests/client_test_cases/list_microgrid_sensors/success_case.py Success test case data for list_microgrid_sensors().
tests/client_test_cases/list_microgrid_sensors/error_case.py Permission-denied test case for list_microgrid_sensors().
tests/client_test_cases/list_microgrid_sensors/empty_case.py Empty-response test case for list_microgrid_sensors().
tests/client_test_cases/list_microgrid_electrical_components/filtered_case.py Adds a filtered listing test case for electrical components.
tests/client_test_cases/list_microgrid_electrical_component_connections/filtered_case.py Adds a filtered listing test case for component connections.
tests/client_test_cases/list_market_topology_relations/success_case.py Success test case data for list_market_topology_relations().
tests/client_test_cases/list_market_topology_relations/error_case.py Permission-denied test case for list_market_topology_relations().
tests/client_test_cases/list_market_topology_relations/empty_case.py Empty-response test case for list_market_topology_relations().
tests/client_test_cases/list_gridpools/success_case.py Success test case data for list_gridpools().
tests/client_test_cases/list_gridpools/error_case.py Permission-denied test case for list_gridpools().
tests/client_test_cases/list_gridpools/empty_case.py Empty-response test case for list_gridpools().
tests/client_test_cases/list_gridpool_energy_schedules/success_case.py Success test case data for list_gridpool_energy_schedules().
tests/client_test_cases/list_gridpool_energy_schedules/error_case.py Permission-denied test case for list_gridpool_energy_schedules().
tests/client_test_cases/list_gridpool_energy_schedules/empty_case.py Empty-response test case for list_gridpool_energy_schedules().
src/frequenz/client/assets/electrical_component/_electrical_component_proto.py Switches enum conversion helper to enum_from_proto().
src/frequenz/client/assets/_sensor.py Adds Sensor domain model.
src/frequenz/client/assets/_sensor_proto.py Adds protobuf → domain conversion for sensors.
src/frequenz/client/assets/_microgrid_proto.py Switches microgrid enum conversion helper to enum_from_proto().
src/frequenz/client/assets/_market_topology.py Adds market topology domain models/enums.
src/frequenz/client/assets/_market_topology_proto.py Adds protobuf → domain conversion for market topology.
src/frequenz/client/assets/_market_location.py Adds market location domain models/enums.
src/frequenz/client/assets/_market_location_proto.py Adds protobuf → domain conversion for market locations + ID value helper.
src/frequenz/client/assets/_interval.py Adds Interval domain type with validation.
src/frequenz/client/assets/_interval_proto.py Adds Interval ↔ protobuf conversion.
src/frequenz/client/assets/_gridpool.py Adds Gridpool domain model.
src/frequenz/client/assets/_gridpool_proto.py Adds protobuf → domain conversion for gridpools.
src/frequenz/client/assets/_gridpool_energy_schedule.py Adds gridpool energy schedule domain models/enums.
src/frequenz/client/assets/_gridpool_energy_schedule_proto.py Adds protobuf → domain conversion for gridpool energy schedules.
src/frequenz/client/assets/_delivery_area_proto.py Switches enum conversion helper and adds delivery_area_to_proto().
src/frequenz/client/assets/_client.py Implements new list methods + adds filters to electrical component listing.
src/frequenz/client/assets/_balancing_group.py Adds BalancingGroup domain model.
src/frequenz/client/assets/_balancing_group_proto.py Adds protobuf → domain conversion for balancing groups.
src/frequenz/client/assets/init.py Exports newly added domain types and enums.
RELEASE_NOTES.md Documents the newly added client methods and filters.
pyproject.toml Bumps dependency versions to match the new API support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@phillip-wenig-frequenz phillip-wenig-frequenz left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

direkt mapping from protobuf to code, and copilot didn't find anything wrong. It also looks good to me. LGTM

Comment thread src/frequenz/client/assets/_client.py

@llucax llucax left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh, damn, this is a blow to my work on client-common. I guess it is urgent as usual, but if it is not, it would be better to skip adding all common wrappers here and add them to client-common instead. I'm still polishing the approach on error handling, so there might be some instability still, but by now I think it should be mostly clear.

For how things are currently in this client, I gave this a very quick look and LGTM, but not approving because I'm not familiar with all the gridpool stuff.

@sandovalrr sandovalrr added this pull request to the merge queue Jul 9, 2026
Merged via the queue into frequenz-floss:v0.x.x with commit fd815c1 Jul 9, 2026
7 checks passed
@sandovalrr sandovalrr deleted the feat/assets-api-0-3 branch July 9, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests part:tooling Affects the development tooling (CI, deployment, dependency management, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants