From 3ea116b398d993593967eb4855f59462e12a5682 Mon Sep 17 00:00:00 2001 From: Sebastiaan la Fleur Date: Thu, 12 Dec 2024 13:25:01 +0100 Subject: [PATCH] 91: Update to latest mesido 0.1.8.4 --- dev-requirements.txt | 20 +++----------------- pyproject.toml | 2 +- requirements.txt | 16 ++++------------ src/grow_worker/worker_types.py | 14 +++++++------- unit_test/test_worker_types.py | 4 ++-- 5 files changed, 17 insertions(+), 39 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index a993b52..55a454b 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile --constraint=requirements.txt --extra=dev --output-file=dev-requirements.txt pyproject.toml @@ -20,11 +20,6 @@ antlr4-python3-runtime==4.7.2 # via # -c requirements.txt # pymoca -backports-zoneinfo[tzdata]==0.2.1 - # via - # -c requirements.txt - # celery - # kombu billiard==4.2.0 # via # -c requirements.txt @@ -80,9 +75,7 @@ coolprop==6.6.0 # -c requirements.txt # mesido coverage[toml]==7.4.1 - # via - # coverage - # pytest-cov + # via pytest-cov exceptiongroup==1.2.0 # via pytest flake8==6.1.0 @@ -106,8 +99,6 @@ idna==3.4 # -c requirements.txt # requests # yarl -importlib-metadata==7.0.2 - # via build influxdb==5.3.1 # via # -c requirements.txt @@ -126,7 +117,7 @@ lxml==4.9.3 # pyecore mccabe==0.7.0 # via flake8 -mesido==0.1.8.3 +mesido==0.1.8.4 # via # -c requirements.txt # omotes-grow-worker (pyproject.toml) @@ -286,14 +277,11 @@ tomli==2.0.1 typing-extensions==4.11.0 # via # -c requirements.txt - # black - # kombu # mypy # omotes-sdk-python tzdata==2023.3 # via # -c requirements.txt - # backports-zoneinfo # celery urllib3==2.0.4 # via @@ -316,8 +304,6 @@ yarl==1.9.4 # -c requirements.txt # aio-pika # aiormq -zipp==3.18.0 - # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/pyproject.toml b/pyproject.toml index 50e094d..1a96d62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ requires-python = ">=3.10" dependencies = [ "python-dotenv ~= 1.0.0", - "mesido ~= 0.1.8.3", + "mesido ~= 0.1.8.4", "omotes-sdk-python ~= 3.2.5" ] diff --git a/requirements.txt b/requirements.txt index c154a4d..1102a18 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.8 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile --output-file=requirements.txt pyproject.toml @@ -12,10 +12,6 @@ amqp==5.2.0 # via kombu antlr4-python3-runtime==4.7.2 # via pymoca -backports-zoneinfo[tzdata]==0.2.1 - # via - # celery - # kombu billiard==4.2.0 # via celery casadi==3.6.3 @@ -54,7 +50,7 @@ kombu==5.3.4 # via celery lxml==4.9.3 # via pyecore -mesido==0.1.8.3 +mesido==0.1.8.4 # via omotes-grow-worker (pyproject.toml) msgpack==1.0.5 # via influxdb @@ -126,13 +122,9 @@ streamcapture==1.2.4 strenum==0.4.15 # via mesido typing-extensions==4.11.0 - # via - # kombu - # omotes-sdk-python + # via omotes-sdk-python tzdata==2023.3 - # via - # backports-zoneinfo - # celery + # via celery urllib3==2.0.4 # via requests vine==5.1.0 diff --git a/src/grow_worker/worker_types.py b/src/grow_worker/worker_types.py index 262bf99..7bbaca8 100644 --- a/src/grow_worker/worker_types.py +++ b/src/grow_worker/worker_types.py @@ -3,8 +3,8 @@ from mesido.workflows import NetworkSimulatorHIGHSWeeklyTimeStep from mesido.workflows.grow_workflow import ( - EndScenarioSizingDiscountedStaged, - EndScenarioSizingHeadLossDiscountedStaged, + EndScenarioSizingHeadLossStaged, + EndScenarioSizingStaged, ) from mesido.workflows import ( run_end_scenario_sizing, @@ -26,8 +26,8 @@ class GrowTaskType(Enum): GROWProblem = Union[ - Type[EndScenarioSizingHeadLossDiscountedStaged], - Type[EndScenarioSizingDiscountedStaged], + Type[EndScenarioSizingHeadLossStaged], + Type[EndScenarioSizingStaged], Type[NetworkSimulatorHIGHSWeeklyTimeStep], ] @@ -40,13 +40,13 @@ def get_problem_type(task_type: GrowTaskType) -> GROWProblem: """ result: GROWProblem if task_type == GrowTaskType.GROW_OPTIMIZER_DEFAULT: - result = EndScenarioSizingDiscountedStaged + result = EndScenarioSizingStaged elif task_type == GrowTaskType.GROW_SIMULATOR: result = NetworkSimulatorHIGHSWeeklyTimeStep elif task_type == GrowTaskType.GROW_OPTIMIZER_NO_HEAT_LOSSES: - result = EndScenarioSizingDiscountedStaged + result = EndScenarioSizingStaged elif task_type == GrowTaskType.GROW_OPTIMIZER_WITH_PRESSURE: - result = EndScenarioSizingHeadLossDiscountedStaged + result = EndScenarioSizingHeadLossStaged else: raise RuntimeError(f"Unknown workflow type, please implement {task_type}") diff --git a/unit_test/test_worker_types.py b/unit_test/test_worker_types.py index 0a0927e..a167a0d 100644 --- a/unit_test/test_worker_types.py +++ b/unit_test/test_worker_types.py @@ -2,7 +2,7 @@ from grow_worker.worker_types import ( get_problem_type, GrowTaskType, - EndScenarioSizingDiscountedStaged, + EndScenarioSizingStaged, ) @@ -15,5 +15,5 @@ def test__get_problem_type__is_correct_grow_optimizer(self) -> None: result = get_problem_type(task_type) # Assert - expected_result = EndScenarioSizingDiscountedStaged + expected_result = EndScenarioSizingStaged self.assertEqual(expected_result, result)