Fix: CEM work session#188
Draft
Flix6x wants to merge 136 commits into
Draft
Conversation
…, consolidating all dependencies into pyproject.toml and a single uv.lock file. This simplifies and speeds up the development setup greatly. Changes: - Switch build backend from setuptools to hatchling - Remove setup.cfg, tox.ini, .isort.cfg and setup.py in favour of .flake8 and pyproject.toml - Add Poethepoet tasks - Upgrade main Python version (CI/CD, .python-version, etc.) to 3.12 - Deprecate Python 3.9 - Add .python-version for consistent Python version management - Create separate Dockerfile for flexmeasures-client - Replace pip-tools with uv in all CI/CD workflows - Remove ci/run_mypy.sh in favour of Poethepoet task - Update documentation Signed-off-by: Stijn van Houwelingen <teadrinkingprogrammer@github.io>
Signed-off-by: Stijn van Houwelingen <teadrinkingprogrammer@github.io>
Signed-off-by: Stijn van Houwelingen <teadrinkingprogrammer@github.io>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
This reverts commit d63afe5.
…connection shuts down Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
This reverts commit 4799585.
Signed-off-by: F.N. Claessen <claessen@seita.nl>
… is missing Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
This reverts commit 5328de9.
Signed-off-by: F.N. Claessen <claessen@seita.nl>
…) and make system_description_id optional Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
This reverts commit 374e44a.
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
…andlers accordingly Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
# Conflicts: # .github/agents/copilot.md
…ix-handshake-handler # Conflicts: # docs/CEM.rst # src/flexmeasures_client/s2/control_types/FRBC/frbc_simple.py # src/flexmeasures_client/s2/control_types/FRBC/frbc_tunes.py # src/flexmeasures_client/s2/script/websockets_server.py
…dler # Conflicts: # docs/CEM.rst # src/flexmeasures_client/s2/script/websockets_server.py
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
…dler # Conflicts: # src/flexmeasures_client/client.py
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Coverage Report for CI Build 24732265334Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage increased (+0.005%) to 96.204%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
…dler # Conflicts: # src/flexmeasures_client/client.py
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
…dler # Conflicts: # src/flexmeasures_client/client.py
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
Signed-off-by: F.N. Claessen <claessen@seita.nl>
- Update test assertions to use ._control.control_type instead of ._control_type - Add handler_ready flag initialization for tests that register but don't await map_resource_to_asset - Add background task cleanup after tests that create background tasks - All CEM tests pass individually
- Move handler_ready flag setting from map_resource_to_asset into register_control_type - This makes the code cleaner and removes redundant manual flag setting in tests - Ensures handler_ready is set atomically with handler registration
… attribute Context: - _control and _handler_build_tasks were defined as class attributes - This caused all CEM instances to share the same state - The RM integration test showed 'FRBC not active yet' because stale state persisted between operations Change: - Moved _control and _handler_build_tasks initialization to __init__ as instance attributes - Initialized before super().__init__() to ensure parent's discover() call has access to control_type property - Each CEM instance now has its own isolated ControlContext and handler build tasks dict This was the root cause of the integration test failures where RM would report 'FRBC not active yet'.
…_server watchdog Context: - _control_type was a class attribute left over from the old code - It was set to None but never updated, causing the watchdog to never activate FRBC - websockets_server.py was checking this stale attribute instead of the new _control.control_type Change: - Removed stale _control_type = None class attribute - Updated rm_details_watchdog() to use _control.control_type instead - This ensures the watchdog properly detects ResourceManagerDetails arrival and sends SelectControlType activation
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.
Follow-up to #187.
FRBC.FillLevelTargetProfileandFRBC.UsageForecastto theFRBCSimplehandler.SimpleFRBChandler to get to the point thatFRBCInstructionsare sent back.FRBC.LeakageBehaviourto theFRBCSimplehandler.