feat(config): add AssetsConfig for the whole config document - #125
Merged
Conversation
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
requested review from
llucax and
malteschaaf
and removed request for
a team
August 19, 2026 11:48
Mohammad-Tayyab-Frequenz
approved these changes
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gives the
assetsnamespace 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 throughload_from_file.Unknown entity tables are skipped with a warning, so an older reader keeps working against files that already carry newer entities.