Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

79: Update mesido to 0.1.8.1 #80

Merged
merged 2 commits into from
Nov 11, 2024
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
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ lxml==4.9.3
# pyecore
mccabe==0.7.0
# via flake8
mesido==0.1.7
mesido==0.1.8.1
# via
# -c requirements.txt
# omotes-grow-worker (pyproject.toml)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ requires-python = ">=3.10"

dependencies = [
"python-dotenv ~= 1.0.0",
"mesido ~= 0.1.7.0",
"mesido ~= 0.1.8.1",
"omotes-sdk-python ~= 3.2.2"
]

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ kombu==5.3.4
# via celery
lxml==4.9.3
# via pyecore
mesido==0.1.7
mesido==0.1.8.1
# via omotes-grow-worker (pyproject.toml)
msgpack==1.0.5
# via influxdb
Expand Down
8 changes: 4 additions & 4 deletions src/grow_worker/worker_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from mesido.workflows import NetworkSimulatorHIGHSWeeklyTimeStep
from mesido.workflows.grow_workflow import (
EndScenarioSizingDiscountedStagedHIGHS,
EndScenarioSizingDiscountedStaged,
EndScenarioSizingHeadLossDiscountedStaged,
)
from mesido.workflows import (
Expand All @@ -27,7 +27,7 @@ class GrowTaskType(Enum):

GROWProblem = Union[
Type[EndScenarioSizingHeadLossDiscountedStaged],
Type[EndScenarioSizingDiscountedStagedHIGHS],
Type[EndScenarioSizingDiscountedStaged],
Type[NetworkSimulatorHIGHSWeeklyTimeStep],
]

Expand All @@ -40,11 +40,11 @@ def get_problem_type(task_type: GrowTaskType) -> GROWProblem:
"""
result: GROWProblem
if task_type == GrowTaskType.GROW_OPTIMIZER_DEFAULT:
result = EndScenarioSizingDiscountedStagedHIGHS
result = EndScenarioSizingDiscountedStaged
elif task_type == GrowTaskType.GROW_SIMULATOR:
result = NetworkSimulatorHIGHSWeeklyTimeStep
elif task_type == GrowTaskType.GROW_OPTIMIZER_NO_HEAT_LOSSES:
result = EndScenarioSizingDiscountedStagedHIGHS
result = EndScenarioSizingDiscountedStaged
elif task_type == GrowTaskType.GROW_OPTIMIZER_WITH_PRESSURE:
result = EndScenarioSizingHeadLossDiscountedStaged
else:
Expand Down
4 changes: 2 additions & 2 deletions unit_test/test_worker_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from grow_worker.worker_types import (
get_problem_type,
GrowTaskType,
EndScenarioSizingDiscountedStagedHIGHS,
EndScenarioSizingDiscountedStaged,
)


Expand All @@ -15,5 +15,5 @@ def test__get_problem_type__is_correct_grow_optimizer(self) -> None:
result = get_problem_type(task_type)

# Assert
expected_result = EndScenarioSizingDiscountedStagedHIGHS
expected_result = EndScenarioSizingDiscountedStaged
self.assertEqual(expected_result, result)
Loading