Skip to content

Add directory option microgrid config#115

Closed
Mohammad-Tayyab-Frequenz wants to merge 3 commits into
frequenz-floss:v0.x.xfrom
Mohammad-Tayyab-Frequenz:add-directory-option-microgrid-config
Closed

Add directory option microgrid config#115
Mohammad-Tayyab-Frequenz wants to merge 3 commits into
frequenz-floss:v0.x.xfrom
Mohammad-Tayyab-Frequenz:add-directory-option-microgrid-config

Conversation

@Mohammad-Tayyab-Frequenz

Copy link
Copy Markdown
Contributor

load_configs() and load_configs_from_files() now accept directory paths in addition to individual TOML files. When a directory is provided, all *.toml files in that directory are loaded in sorted order.

@Mohammad-Tayyab-Frequenz
Mohammad-Tayyab-Frequenz requested review from a team as code owners July 22, 2026 13:50
@github-actions github-actions Bot added part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests labels Jul 22, 2026
Signed-off-by: Mohammad Tayyab <Mohammad.Tayyab@neustrom.de>
Signed-off-by: Mohammad Tayyab <Mohammad.Tayyab@neustrom.de>
Signed-off-by: Mohammad Tayyab <Mohammad.Tayyab@neustrom.de>
@Mohammad-Tayyab-Frequenz
Mohammad-Tayyab-Frequenz force-pushed the add-directory-option-microgrid-config branch from bba682a to b3116c6 Compare July 22, 2026 14:15
microgrid_config_files: str | Path | list[str | Path] | None = None,
) -> dict[str, "MicrogridConfig"]:
"""Load multiple microgrid configurations from one or more files.
"""Load multiple microgrid configurations from one or more paths/files.

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.

We just removed the support from this to reduce the complexity. If you need support for folders let's add another function that calls loads the files from a folder and calls load_configs_from_files on them.

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.

If downstream still wants it, they can just call load_configs_from_files(list(Path(dir).glob("*.toml"))) etc.

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.

3 participants