Skip to content

feat(config): add AssetsConfig for the whole config document - #125

Merged
cwasicki merged 2 commits into
frequenz-floss:v0.x.xfrom
cwasicki:assets
Aug 19, 2026
Merged

feat(config): add AssetsConfig for the whole config document#125
cwasicki merged 2 commits into
frequenz-floss:v0.x.xfrom
cwasicki:assets

Conversation

@cwasicki

Copy link
Copy Markdown
Collaborator

Gives the assets namespace a type instead of string literals threaded through dict navigation, so the entities still to come are added as fields rather than as more lookup code.

The document-level loader moves onto it, since what a config file holds is an assets document, of which microgrids are one entity. Entries are checked against the ID they are filed under in __post_init__, so the check also covers readers that load the class directly rather than through load_from_file.

Unknown entity tables are skipped with a warning, so an older reader keeps working against files that already carry newer entities.

Signed-off-by: cwasicki <126617870+cwasicki@users.noreply.github.com>
Gives the `assets` namespace a type instead of string literals threaded
through dict navigation, so the entities still to come are added as
fields rather than as more lookup code.

The document-level loader moves onto it, since what a config file holds
is an assets document, of which microgrids are one entity. Entries are
checked against the ID they are filed under in `__post_init__`, so the
check also covers readers that load the class directly rather than
through `load_from_file`.

Unknown entity tables are skipped with a warning, so an older reader
keeps working against files that already carry newer entities.

Signed-off-by: cwasicki <126617870+cwasicki@users.noreply.github.com>
@cwasicki
cwasicki requested review from a team as code owners August 19, 2026 11:48
@cwasicki
cwasicki requested review from llucax and malteschaaf and removed request for a team August 19, 2026 11:48
@github-actions github-actions Bot added part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests labels Aug 19, 2026
@cwasicki cwasicki changed the title feat(config): add AssetsConfig for the whole config document] feat(config): add AssetsConfig for the whole config document Aug 19, 2026
@cwasicki
cwasicki added this pull request to the merge queue Aug 19, 2026
Merged via the queue into frequenz-floss:v0.x.x with commit 2ceddee Aug 19, 2026
9 checks passed
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants