Skip to content

Conversation

@Flix6x
Copy link
Contributor

@Flix6x Flix6x commented Jan 23, 2026

See #165 for full details.

Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x self-assigned this Jan 23, 2026
@Flix6x
Copy link
Contributor Author

Flix6x commented Jan 23, 2026

@copilot fix the linting and tests. Since this is currently a breaking change, I need you to adapt client.get_assets to allow toggling to this new behaviour, with the default set to the old behaviour incl. a deprecation/future warning with instructions on how the user can upgrade their code. Finally, check client.py for other objects fetched from FlexMeasures that current returning serialized JSON (hint: get_sensor, get_sensors and get_asset), and apply the fix introduced by this PR to those fields, too. Make sure .precommit-config and tests pass.

Copy link
Contributor

Copilot AI commented Jan 23, 2026

@Flix6x I've opened a new pull request, #165, to work on those changes. Once the pull request is ready, I'll request review from you.

#165)

* Initial plan

* Add parse_json_fields parameter to asset and sensor methods

Co-authored-by: Flix6x <30658763+Flix6x@users.noreply.github.com>

* Address code review feedback: add logging and use helper function

Co-authored-by: Flix6x <30658763+Flix6x@users.noreply.github.com>

* Improve code: use lazy logging and consistent parsing logic

Co-authored-by: Flix6x <30658763+Flix6x@users.noreply.github.com>

* Fix edge case handling and improve test formatting

Co-authored-by: Flix6x <30658763+Flix6x@users.noreply.github.com>

* Add proper error handling for JSON parsing in custom scheduler

Co-authored-by: Flix6x <30658763+Flix6x@users.noreply.github.com>

* Improve comment clarity for defensive programming

Co-authored-by: Flix6x <30658763+Flix6x@users.noreply.github.com>

* style: flake8

Signed-off-by: F.N. Claessen <felix@seita.nl>

---------

Signed-off-by: F.N. Claessen <felix@seita.nl>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Flix6x <30658763+Flix6x@users.noreply.github.com>
Co-authored-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x merged commit fec6d1d into main Jan 23, 2026
8 checks passed
@Flix6x Flix6x deleted the fix/load-json-fields branch January 23, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants