Add directory option microgrid config#115
Closed
Mohammad-Tayyab-Frequenz wants to merge 3 commits into
Closed
Conversation
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
force-pushed
the
add-directory-option-microgrid-config
branch
from
July 22, 2026 14:15
bba682a to
b3116c6
Compare
cwasicki
reviewed
Jul 22, 2026
| 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. |
Collaborator
There was a problem hiding this comment.
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.
Collaborator
There was a problem hiding this comment.
If downstream still wants it, they can just call load_configs_from_files(list(Path(dir).glob("*.toml"))) etc.
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.
load_configs()andload_configs_from_files()now accept directory paths in addition to individual TOML files. When a directory is provided, all*.tomlfiles in that directory are loaded in sorted order.