Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor scheduler interface - API and inner logic (#537)
Add `flex_model` & `flex_context` to /schedules/trigger/ API endpoint, and refactor how flex configuration is deserialized (by the Scheduler implementation instead of by the API endpoint). * Add flex_model & flex_context in API endpoint; refactor design for Scheduler implementations (moving some endpoint logic here); Signed-off-by: Nicolas Höning <nicolas@seita.nl> * add new schema modules Signed-off-by: Nicolas Höning <nicolas@seita.nl> * include two other flex context params in solver test Signed-off-by: Nicolas Höning <nicolas@seita.nl> * also support deprecated flex_context parameters, and align spelling of params with underscore in docstring Signed-off-by: Nicolas Höning <nicolas@seita.nl> * correctly handle flex-model validation errors when they come up in the endpoint Signed-off-by: Nicolas Höning <nicolas@seita.nl> * changelog: add deprecation warnings and mentions this PR Signed-off-by: Nicolas Höning <nicolas@seita.nl> * fix internal link Signed-off-by: Nicolas Höning <nicolas@seita.nl> * move flex-model and flex-context docs to notation module; small fixes in dummy custom scheduler Signed-off-by: Nicolas Höning <nicolas@seita.nl> * deprecate soc-sensor-id field, store soc states on the asset attributes in v3.0 as well, using a way that lets all schedulers save (parts of) it if they want. Signed-off-by: Nicolas Höning <nicolas@seita.nl> * check (and potentially fill in defaults for) soc_min and soc_max before we apply the schema (which expects non-nan values here) Signed-off-by: Nicolas Höning <nicolas@seita.nl> * make add schedule command work with our refactored scheduling code, small refactoring to save lines Signed-off-by: Nicolas Höning <nicolas@seita.nl> * rename the CLI command as it only represents storage right now (and we might choose that the CLI will be specific to our in-built flex models) Signed-off-by: Nicolas Höning <nicolas@seita.nl> * More thorough checks for passed soc-values in StorageScheduler, leads to small fix in API endpoint and scheduling tests Signed-off-by: Nicolas Höning <nicolas@seita.nl> * doc improvements from review Signed-off-by: Nicolas Höning <nicolas@seita.nl> * Change parameter names for flex model and context which come through the API to use hyphens, which is conventionally preferred. Signed-off-by: Nicolas Höning <nicolas@seita.nl> * Make `flexmeasures add schedule` a subgroup (#557) * Make `flexmeasuress add schedule` a subgroup: - invoke a default subcommand - show a deprecation warning Signed-off-by: F.N. Claessen <felix@seita.nl> * adapt CLI command name so it's clearer what is being added Signed-off-by: Nicolas Höning <nicolas@seita.nl> Signed-off-by: F.N. Claessen <felix@seita.nl> Signed-off-by: Nicolas Höning <nicolas@seita.nl> Co-authored-by: Nicolas Höning <nicolas@seita.nl> * add one missing documentation improvement from review Signed-off-by: Nicolas Höning <nicolas@seita.nl> * make sure hyphens are used in flex-model to the outside world (API, CLI) Signed-off-by: Nicolas Höning <nicolas@seita.nl> * smaller review items, mostly documentation Signed-off-by: Nicolas Höning <nicolas@seita.nl> * remove soc checks which added interpretation (should be part of another PR, if at all) Signed-off-by: Nicolas Höning <nicolas@seita.nl> * fixes to notation docs Signed-off-by: Nicolas Höning <nicolas@seita.nl> * make sure scheduling tests work on empty queues, with new fixture Signed-off-by: Nicolas Höning <nicolas@seita.nl> * remove two tests for previously removed util function Signed-off-by: Nicolas Höning <nicolas@seita.nl> * batch of small review comments Signed-off-by: Nicolas Höning <nicolas@seita.nl> * make get_data_source_info a class method of Scheduler Signed-off-by: Nicolas Höning <nicolas@seita.nl> * small simplification of get_data_source_for_job Signed-off-by: Nicolas Höning <nicolas@seita.nl> * specify min/max inclusiveness of roundtrip-efficiency parameter Signed-off-by: Nicolas Höning <nicolas@seita.nl> * create_scheduling_jobs accepts both object and ID Signed-off-by: Nicolas Höning <nicolas@seita.nl> * fix type hinting Signed-off-by: Nicolas Höning <nicolas@seita.nl> * API changelog & flex config introduction Signed-off-by: Nicolas Höning <nicolas@seita.nl> * two missing fixes Signed-off-by: Nicolas Höning <nicolas@seita.nl> * remove line about previously undocumented & now depreacated line Signed-off-by: Nicolas Höning <nicolas@seita.nl> * Deprecation headers for old fields that moved to flex-model and flex-context (#564) * Add deprecation and sunset response headers when deprecated fields are used Signed-off-by: F.N. Claessen <felix@seita.nl> * Refactor: duplicate code becomes util function Signed-off-by: F.N. Claessen <felix@seita.nl> * Correct deprecation and sunset links Signed-off-by: F.N. Claessen <felix@seita.nl> * rename to represent plural-default of param, update link to 3.0.5 API changelog Signed-off-by: Nicolas Höning <nicolas@seita.nl> Signed-off-by: F.N. Claessen <felix@seita.nl> Signed-off-by: Nicolas Höning <nicolas@seita.nl> Co-authored-by: Nicolas Höning <nicolas@seita.nl> * refactor where the code lives that builds device equality constraints from soc targets Signed-off-by: Nicolas Höning <nicolas@seita.nl> * change a sentence in notation Signed-off-by: Nicolas Höning <nicolas@seita.nl> * Rename inspection to deserialization Signed-off-by: F.N. Claessen <felix@seita.nl> * Fix DummyScheduler in documentation Signed-off-by: F.N. Claessen <felix@seita.nl> * Simplify imports for plugin developers (also facilitates renaming the planning module without needing plugin developers to upgrade their code) Signed-off-by: F.N. Claessen <felix@seita.nl> Signed-off-by: Nicolas Höning <nicolas@seita.nl> Signed-off-by: F.N. Claessen <felix@seita.nl> Co-authored-by: Felix Claessen <30658763+Flix6x@users.noreply.github.com> Co-authored-by: F.N. Claessen <felix@seita.nl>
- Loading branch information
1 parent
4dcec47
commit 60e3ec3
Showing
37 changed files
with
1,284 additions
and
628 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.