Skip to content

Commit e28b03c

Browse files
Merge pull request #92 from Project-OMOTES/91-update-to-latest-mesido
91: Update to latest mesido 0.1.8.4
2 parents def86d4 + 3ea116b commit e28b03c

File tree

5 files changed

+17
-39
lines changed

5 files changed

+17
-39
lines changed

dev-requirements.txt

+3-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.8
2+
# This file is autogenerated by pip-compile with Python 3.10
33
# by the following command:
44
#
55
# pip-compile --constraint=requirements.txt --extra=dev --output-file=dev-requirements.txt pyproject.toml
@@ -20,11 +20,6 @@ antlr4-python3-runtime==4.7.2
2020
# via
2121
# -c requirements.txt
2222
# pymoca
23-
backports-zoneinfo[tzdata]==0.2.1
24-
# via
25-
# -c requirements.txt
26-
# celery
27-
# kombu
2823
billiard==4.2.0
2924
# via
3025
# -c requirements.txt
@@ -80,9 +75,7 @@ coolprop==6.6.0
8075
# -c requirements.txt
8176
# mesido
8277
coverage[toml]==7.4.1
83-
# via
84-
# coverage
85-
# pytest-cov
78+
# via pytest-cov
8679
exceptiongroup==1.2.0
8780
# via pytest
8881
flake8==6.1.0
@@ -106,8 +99,6 @@ idna==3.4
10699
# -c requirements.txt
107100
# requests
108101
# yarl
109-
importlib-metadata==7.0.2
110-
# via build
111102
influxdb==5.3.1
112103
# via
113104
# -c requirements.txt
@@ -126,7 +117,7 @@ lxml==4.9.3
126117
# pyecore
127118
mccabe==0.7.0
128119
# via flake8
129-
mesido==0.1.8.3
120+
mesido==0.1.8.4
130121
# via
131122
# -c requirements.txt
132123
# omotes-grow-worker (pyproject.toml)
@@ -286,14 +277,11 @@ tomli==2.0.1
286277
typing-extensions==4.11.0
287278
# via
288279
# -c requirements.txt
289-
# black
290-
# kombu
291280
# mypy
292281
# omotes-sdk-python
293282
tzdata==2023.3
294283
# via
295284
# -c requirements.txt
296-
# backports-zoneinfo
297285
# celery
298286
urllib3==2.0.4
299287
# via
@@ -316,8 +304,6 @@ yarl==1.9.4
316304
# -c requirements.txt
317305
# aio-pika
318306
# aiormq
319-
zipp==3.18.0
320-
# via importlib-metadata
321307

322308
# The following packages are considered to be unsafe in a requirements file:
323309
# pip

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ requires-python = ">=3.10"
2525

2626
dependencies = [
2727
"python-dotenv ~= 1.0.0",
28-
"mesido ~= 0.1.8.3",
28+
"mesido ~= 0.1.8.4",
2929
"omotes-sdk-python ~= 3.2.5"
3030
]
3131

requirements.txt

+4-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.8
2+
# This file is autogenerated by pip-compile with Python 3.10
33
# by the following command:
44
#
55
# pip-compile --output-file=requirements.txt pyproject.toml
@@ -12,10 +12,6 @@ amqp==5.2.0
1212
# via kombu
1313
antlr4-python3-runtime==4.7.2
1414
# via pymoca
15-
backports-zoneinfo[tzdata]==0.2.1
16-
# via
17-
# celery
18-
# kombu
1915
billiard==4.2.0
2016
# via celery
2117
casadi==3.6.3
@@ -54,7 +50,7 @@ kombu==5.3.4
5450
# via celery
5551
lxml==4.9.3
5652
# via pyecore
57-
mesido==0.1.8.3
53+
mesido==0.1.8.4
5854
# via omotes-grow-worker (pyproject.toml)
5955
msgpack==1.0.5
6056
# via influxdb
@@ -126,13 +122,9 @@ streamcapture==1.2.4
126122
strenum==0.4.15
127123
# via mesido
128124
typing-extensions==4.11.0
129-
# via
130-
# kombu
131-
# omotes-sdk-python
125+
# via omotes-sdk-python
132126
tzdata==2023.3
133-
# via
134-
# backports-zoneinfo
135-
# celery
127+
# via celery
136128
urllib3==2.0.4
137129
# via requests
138130
vine==5.1.0

src/grow_worker/worker_types.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
from mesido.workflows import NetworkSimulatorHIGHSWeeklyTimeStep
55
from mesido.workflows.grow_workflow import (
6-
EndScenarioSizingDiscountedStaged,
7-
EndScenarioSizingHeadLossDiscountedStaged,
6+
EndScenarioSizingHeadLossStaged,
7+
EndScenarioSizingStaged,
88
)
99
from mesido.workflows import (
1010
run_end_scenario_sizing,
@@ -26,8 +26,8 @@ class GrowTaskType(Enum):
2626

2727

2828
GROWProblem = Union[
29-
Type[EndScenarioSizingHeadLossDiscountedStaged],
30-
Type[EndScenarioSizingDiscountedStaged],
29+
Type[EndScenarioSizingHeadLossStaged],
30+
Type[EndScenarioSizingStaged],
3131
Type[NetworkSimulatorHIGHSWeeklyTimeStep],
3232
]
3333

@@ -40,13 +40,13 @@ def get_problem_type(task_type: GrowTaskType) -> GROWProblem:
4040
"""
4141
result: GROWProblem
4242
if task_type == GrowTaskType.GROW_OPTIMIZER_DEFAULT:
43-
result = EndScenarioSizingDiscountedStaged
43+
result = EndScenarioSizingStaged
4444
elif task_type == GrowTaskType.GROW_SIMULATOR:
4545
result = NetworkSimulatorHIGHSWeeklyTimeStep
4646
elif task_type == GrowTaskType.GROW_OPTIMIZER_NO_HEAT_LOSSES:
47-
result = EndScenarioSizingDiscountedStaged
47+
result = EndScenarioSizingStaged
4848
elif task_type == GrowTaskType.GROW_OPTIMIZER_WITH_PRESSURE:
49-
result = EndScenarioSizingHeadLossDiscountedStaged
49+
result = EndScenarioSizingHeadLossStaged
5050
else:
5151
raise RuntimeError(f"Unknown workflow type, please implement {task_type}")
5252

unit_test/test_worker_types.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from grow_worker.worker_types import (
33
get_problem_type,
44
GrowTaskType,
5-
EndScenarioSizingDiscountedStaged,
5+
EndScenarioSizingStaged,
66
)
77

88

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

1717
# Assert
18-
expected_result = EndScenarioSizingDiscountedStaged
18+
expected_result = EndScenarioSizingStaged
1919
self.assertEqual(expected_result, result)

0 commit comments

Comments
 (0)