Skip to content

Fix load auto formula#80

Merged
Mohammad-Tayyab-Frequenz merged 2 commits intofrequenz-floss:v0.x.xfrom
Mohammad-Tayyab-Frequenz:fix-load-auto-formula
May 4, 2026
Merged

Fix load auto formula#80
Mohammad-Tayyab-Frequenz merged 2 commits intofrequenz-floss:v0.x.xfrom
Mohammad-Tayyab-Frequenz:fix-load-auto-formula

Conversation

@Mohammad-Tayyab-Frequenz
Copy link
Copy Markdown
Contributor

This PR aligns load_configs_with_formulas with the existing load_configs convention.
load_configs only 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.

Signed-off-by: Mohammad Tayyab <Mohammad.Tayyab@neustrom.de>
Signed-off-by: Mohammad Tayyab <Mohammad.Tayyab@neustrom.de>
@Mohammad-Tayyab-Frequenz Mohammad-Tayyab-Frequenz requested review from a team as code owners May 4, 2026 12:39
@Mohammad-Tayyab-Frequenz Mohammad-Tayyab-Frequenz requested review from shsms and removed request for a team May 4, 2026 12:39
@github-actions github-actions Bot added the part:docs Affects the documentation label 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())
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@Mohammad-Tayyab-Frequenz Mohammad-Tayyab-Frequenz added this pull request to the merge queue May 4, 2026
Merged via the queue into frequenz-floss:v0.x.x with commit 43cdb75 May 4, 2026
8 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants