Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 7 additions & 44 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,56 +2,19 @@

## Summary

This release rounds out `gridpool-cli` for the `assets` config layout and adds
gridpool enterprise ownership to the config model. The CLI can now generate,
validate, patch, and query merged config files.
<!-- Here goes a general summary of what this release is about -->

## Upgrading

- The legacy config layouts are no longer migrated on load: top-level microgrid
IDs and `meta`-nested microgrid fields are gone. A file with no `assets` table
now loads as empty and contributes nothing to a merge, rather than having its
top-level keys read as microgrid IDs. This lets a mixed list of files (some
carrying an `[app]` table for their own config, some an `assets` table) be
passed to `AssetsConfig.load_from_files` / `load_configs`, which reads only the
`assets`-bearing ones. Rebuild any legacy-layout files with `generate-config`.

- `generate-config` now writes the `assets.microgrids` layout and stamps
`assets.version`, instead of the legacy layout. Regenerate configs to get the
current format; generated files then load back without a migration.

- `generate-config --inplace` refuses legacy-layout files (top-level or
`meta`-nested), which it would duplicate rather than edit. Rebuild those from
scratch.
- Requires `frequenz-microgrid-component-graph` 0.6, which stops clamping the consumer
and producer formulas. `ComponentGraph.consumer_formula()` and
`ComponentGraph.producer_formula()` can now return values previously pinned
to zero: a negative consumer total, or a positive producer total.

## New Features

- `gridpool-cli validate <files>` checks config files offline and exits
non-zero on the first error, to gate config-repo CI. Each file must be valid
on its own, so a record names its own key and required fields; the files are
then checked merged, for the cross-record checks.

- `gridpool-cli` accepts `FREQUENZ_API_KEY` and `FREQUENZ_API_SECRET` as a
fallback pair for `ASSETS_API_AUTH_KEY` and `ASSETS_API_SIGN_SECRET`.

- Gridpools are described under `assets.gridpools`, each entry naming the
enterprise that owns the gridpool. `AssetsConfig.find_enterprise(gridpool_id)`
returns the configured owner.
`gridpool-cli find-enterprise <gridpool_id> <files>` prints it from the config.
`AssetsConfig.check` enforces the one-enterprise-per-gridpool invariant: a
gridpool's microgrids may not disagree on it, and a declared enterprise must
match the inferred one.

- A config derived from the Assets API now carries each microgrid's
`enterprise_id`.

- `generate-config --inplace` refreshes managed values while preserving
formatting; `--fill-missing` only adds absent values. Generated patches are
validated before writing.
<!-- Here goes the main new features and examples or instructions on how to use them -->

## Bug Fixes

- Config files with validity periods now load under marshmallow 3, not only
marshmallow 4. `tomllib` yields native `datetime` objects, which marshmallow
3's `DateTime` field rejected. `marshmallow` is now a direct dependency so the
minimum-version test exercises this path.
<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies = [
"marshmallow >= 3.18.0, < 5",
"marshmallow-dataclass >= 8.7.1, < 9",
"typing-extensions >= 4.14.1, < 5",
"frequenz-microgrid-component-graph >= 0.5.0, < 0.6",
"frequenz-microgrid-component-graph >= 0.6.0, < 0.7",
"frequenz-client-assets >= 0.5.0, < 0.6",
]
dynamic = ["version"]
Expand Down Expand Up @@ -72,7 +72,7 @@ dev-mkdocs = [
"mkdocs-literate-nav == 0.6.3",
"mkdocs-macros-plugin == 1.5.0",
"mkdocs-material == 9.7.7",
"mkdocstrings[python] == 1.0.6",
"mkdocstrings[python] == 1.0.7",
"mkdocstrings-python == 2.0.9",
"frequenz-repo-config[lib] == 0.19.0",
]
Expand Down