Fix load auto formula#80
Merged
Mohammad-Tayyab-Frequenz merged 2 commits intofrequenz-floss:v0.x.xfrom May 4, 2026
Merged
Conversation
Signed-off-by: Mohammad Tayyab <Mohammad.Tayyab@neustrom.de>
Signed-off-by: Mohammad Tayyab <Mohammad.Tayyab@neustrom.de>
cwasicki
reviewed
May 4, 2026
| assets_url, auth_key=assets_auth_key, sign_secret=assets_sign_secret | ||
| ) as assets_client: | ||
| for microgrid_id, config in microgrid_configs.items(): | ||
| relevant_ctypes = set(config.ctype.keys()) |
Collaborator
There was a problem hiding this comment.
Does this only load configs for ctypes that are loaded from the file? In future we don't want to pass in config files if not necessary.
Contributor
Author
There was a problem hiding this comment.
Yes, this logic assumes that we have a config file. load_configs also assumes we have a config file in place.
I will test out changes needed for these functions to work without a config file in a separate PR.
cwasicki
approved these changes
May 4, 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.
This PR aligns
load_configs_with_formulaswith the existingload_configsconvention.load_configsonly returns component types that are actually part of the microgrid, without adding extra component entries.Previously, formula auto-population could introduce non-microgrid component types as placeholder config entries.
Now, formula filling is restricted to already-present component types, preserving the same config shape and behavior.