corva-worker-python 2.3.1__py3-none-any.whl → 2.3.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {corva_worker_python-2.3.1.dist-info → corva_worker_python-2.3.3.dist-info}/METADATA +2 -2
- {corva_worker_python-2.3.1.dist-info → corva_worker_python-2.3.3.dist-info}/RECORD +6 -6
- worker/wellbore/factory.py +23 -17
- worker/wellbore/model/drillstring_components.py +12 -7
- {corva_worker_python-2.3.1.dist-info → corva_worker_python-2.3.3.dist-info}/WHEEL +0 -0
- {corva_worker_python-2.3.1.dist-info → corva_worker_python-2.3.3.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: corva-worker-python
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.3
|
|
4
4
|
Summary: SDK for interacting with Corva
|
|
5
5
|
Home-page: https://github.com/corva-ai/corva-worker-python
|
|
6
6
|
Author: Jordan Ambra <jordan.ambra@corva.ai>, Mohammadreza Kamyab <m.kamyab@corva.ai>
|
|
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
16
16
|
Classifier: Topic :: Software Development :: Libraries
|
|
17
17
|
Requires-Python: >=3.13
|
|
18
18
|
Requires-Dist: numpy>=2.3.5
|
|
19
|
-
Requires-Dist: redis
|
|
19
|
+
Requires-Dist: redis<8,>=5.2.1
|
|
20
20
|
Requires-Dist: requests>=2.32.5
|
|
21
21
|
Requires-Dist: simplejson>=3.20.2
|
|
22
22
|
Requires-Dist: urllib3>=2.5.0
|
|
@@ -43,7 +43,7 @@ worker/test/utils.py,sha256=Z7tgC_lUk2bRMlR-3tY9i5d836AdYlIY4i9WFFplheg,1479
|
|
|
43
43
|
worker/test/local_testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
44
|
worker/test/local_testing/to_local_transfer.py,sha256=QYLGtT9fgDKsSK3x2QsaNDCMOpPZ5rpOsSnSl5s--WI,12343
|
|
45
45
|
worker/wellbore/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
|
-
worker/wellbore/factory.py,sha256=
|
|
46
|
+
worker/wellbore/factory.py,sha256=fpvwkTxRI3uASKFMxI76nR3iuYlW6_JdUAZ-3y7uTOY,20095
|
|
47
47
|
worker/wellbore/measured_depth_finder.py,sha256=I5FmkELT0_k1ajlraeBx2Q-G3noqNTAw1wEPKyUAQOw,367
|
|
48
48
|
worker/wellbore/sections_mixin.py,sha256=JNeEKm_fRxMBBD7SUx7LM8lRDJjKIeIcVvcSOKt4DTY,1873
|
|
49
49
|
worker/wellbore/wellbore.py,sha256=syvYszkbN40BhzxCQ8m6VmSBGPp2wQR9sJ6TcSu7WO8,11907
|
|
@@ -51,13 +51,13 @@ worker/wellbore/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
|
51
51
|
worker/wellbore/model/ann.py,sha256=4xf-YQqyuWbMXDbH8XV0ohuga5r8SVO9lJVMgdxS-7c,3483
|
|
52
52
|
worker/wellbore/model/annulus.py,sha256=U2JHQtJp6KPVlcAZMlO2MvrQf0I-cM2GlM969RBn8fg,3805
|
|
53
53
|
worker/wellbore/model/drillstring.py,sha256=om3It2UVZs_WSlaVJmpNziEIlAdVlN58tGXjcK0qMDo,6441
|
|
54
|
-
worker/wellbore/model/drillstring_components.py,sha256=
|
|
54
|
+
worker/wellbore/model/drillstring_components.py,sha256=PgemkBONpXRanYrBgcKg_MUnh-YWiwGbBTxb8YpOdfc,14947
|
|
55
55
|
worker/wellbore/model/element.py,sha256=6axQ1eh3zwej_9kke9o1uXNtJv4UABMTK0VmsCDfJYQ,3231
|
|
56
56
|
worker/wellbore/model/enums.py,sha256=DZm-o9ZCM1hSRHw_CcOK4Oy2Q_bmpDM7Gx3GlKQ_bvE,2828
|
|
57
57
|
worker/wellbore/model/hole.py,sha256=LYikxOMJfxhc2yoKZN12pDBIl6W8apJcAGtGR3ZuvhM,10046
|
|
58
58
|
worker/wellbore/model/hole_section.py,sha256=4sfP19xiY--wV1Ve2MtRoNqpya-FdPhNNmTgxLb90uk,1630
|
|
59
59
|
worker/wellbore/model/riser.py,sha256=ElxvQMfdFTGGpJ1Jba_DNVue3zGAsm-05zDl1HBXwDk,824
|
|
60
|
-
corva_worker_python-2.3.
|
|
61
|
-
corva_worker_python-2.3.
|
|
62
|
-
corva_worker_python-2.3.
|
|
63
|
-
corva_worker_python-2.3.
|
|
60
|
+
corva_worker_python-2.3.3.dist-info/METADATA,sha256=1L6_hZTla6BsYxUwHLZXj98GyI2a_f9zX5OD2rH5cHg,1020
|
|
61
|
+
corva_worker_python-2.3.3.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
62
|
+
corva_worker_python-2.3.3.dist-info/top_level.txt,sha256=KrP-SOC-I1V0U33nVzMgkHR8wO-reJYASIvWVyLyFIY,7
|
|
63
|
+
corva_worker_python-2.3.3.dist-info/RECORD,,
|
worker/wellbore/factory.py
CHANGED
|
@@ -191,7 +191,6 @@ def get_detailed_hole_from_elements(
|
|
|
191
191
|
elements: List[dict],
|
|
192
192
|
previous_element_top_depth: float,
|
|
193
193
|
possible_top_depth: float,
|
|
194
|
-
extend_casing_to_top: bool,
|
|
195
194
|
is_riser: bool,
|
|
196
195
|
) -> Hole:
|
|
197
196
|
"""
|
|
@@ -200,18 +199,12 @@ def get_detailed_hole_from_elements(
|
|
|
200
199
|
:param previous_element_top_depth: will be used as the bottom depth of current component
|
|
201
200
|
:param possible_top_depth: possible top depth to which a casing/riser can extend.
|
|
202
201
|
In case of a casing, it will extend to the btm of riser (if available)
|
|
203
|
-
:param extend_casing_to_top: if the casing/riser should extend to the top
|
|
204
202
|
:param is_riser: If its a riser or a cased hole
|
|
205
203
|
:return: Hole with all the components as HoleSections
|
|
206
204
|
"""
|
|
207
205
|
casing_hole: Hole = Hole()
|
|
208
206
|
|
|
209
|
-
|
|
210
|
-
element
|
|
211
|
-
for index, element in enumerate(elements)
|
|
212
|
-
if check_casing_element_validity(element, index, extend_casing_to_top)
|
|
213
|
-
]
|
|
214
|
-
|
|
207
|
+
# Elements are expected to have been filtered with get_valid_casing_elements before this function is called.
|
|
215
208
|
for element in reversed(elements):
|
|
216
209
|
element_id = element.get("inner_diameter", 0.0)
|
|
217
210
|
element_length = element.get("length", 0.0)
|
|
@@ -270,6 +263,14 @@ def check_casing_element_validity(casing_element: dict, idx: int, extend_casing_
|
|
|
270
263
|
return True if element_family in ["casing_joints", "riser"] else False
|
|
271
264
|
|
|
272
265
|
|
|
266
|
+
def get_valid_casing_elements(elements: List[dict], extend_casing_to_top: bool) -> List[dict]:
|
|
267
|
+
return [
|
|
268
|
+
element
|
|
269
|
+
for element_index, element in enumerate(elements)
|
|
270
|
+
if check_casing_element_validity(element, element_index, extend_casing_to_top)
|
|
271
|
+
]
|
|
272
|
+
|
|
273
|
+
|
|
273
274
|
def set_casings(casings: List[dict]) -> Hole:
|
|
274
275
|
"""
|
|
275
276
|
Set the casing by providing the list of the jsons
|
|
@@ -319,29 +320,34 @@ def set_casings(casings: List[dict]) -> Hole:
|
|
|
319
320
|
casing_top = current_casing_top_depth
|
|
320
321
|
|
|
321
322
|
casing_elements: List[dict] = casing_object.get("components", [])
|
|
322
|
-
|
|
323
|
+
extend_casing_to_top = index == 0
|
|
324
|
+
valid_casing_elements = get_valid_casing_elements(casing_elements, extend_casing_to_top)
|
|
325
|
+
if not valid_casing_elements:
|
|
323
326
|
hole_section = HoleSection(**casing_object, hole_type=HoleType.CASED_HOLE)
|
|
324
327
|
casing_hole.sections.append(hole_section)
|
|
325
328
|
else:
|
|
326
329
|
previous_casing_element_top_depth = casing_bottom
|
|
327
330
|
# Individual casing elements have to be looped in reverse order to correctly account
|
|
328
331
|
# for the topmost element going to surface is not liner
|
|
329
|
-
extend_casing_to_top: bool = False
|
|
330
|
-
if index == 0:
|
|
331
|
-
extend_casing_to_top = True
|
|
332
332
|
casing_hole = get_detailed_hole_from_elements(
|
|
333
|
-
|
|
333
|
+
valid_casing_elements, previous_casing_element_top_depth, casing_top, False
|
|
334
334
|
)
|
|
335
335
|
|
|
336
336
|
casing_holes.append(casing_hole)
|
|
337
337
|
|
|
338
338
|
# Now adding the components of the riser to casingHoles
|
|
339
339
|
if riser:
|
|
340
|
-
|
|
340
|
+
riser_object = riser.get("data", {})
|
|
341
|
+
riser_elements: List[dict] = riser_object.get("components", [])
|
|
342
|
+
valid_riser_elements = get_valid_casing_elements(riser_elements, True)
|
|
341
343
|
previous_riser_element_top_depth = possible_casing_top_depth
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
344
|
+
if valid_riser_elements:
|
|
345
|
+
riser_hole: Hole = get_detailed_hole_from_elements(
|
|
346
|
+
valid_riser_elements, previous_riser_element_top_depth, 0.0, True
|
|
347
|
+
)
|
|
348
|
+
else:
|
|
349
|
+
riser_hole = Hole()
|
|
350
|
+
riser_hole.sections.append(Riser(**riser_object, hole_type=HoleType.CASED_HOLE))
|
|
345
351
|
casing_holes.insert(0, riser_hole)
|
|
346
352
|
|
|
347
353
|
return Hole.merge_holes(casing_holes)
|
|
@@ -5,7 +5,7 @@ from enum import Enum
|
|
|
5
5
|
import numpy as np
|
|
6
6
|
|
|
7
7
|
from worker.data.alert import Alerter
|
|
8
|
-
from worker.data.operations import equal, is_stream_app, nanround
|
|
8
|
+
from worker.data.operations import equal, is_stream_app, nanround, to_number
|
|
9
9
|
from worker.data.serialization import serialization
|
|
10
10
|
from worker.data.unit_conversions import US_LIQUID_GAL_to_INCH3
|
|
11
11
|
from worker.mixins.logging import Logger
|
|
@@ -338,10 +338,10 @@ class UnderReamer(Pipe):
|
|
|
338
338
|
self.alerted_at_timestamp: float = 0.0
|
|
339
339
|
self.ALERT_BACKOFF_TIME = 3600
|
|
340
340
|
|
|
341
|
-
self.tfa =
|
|
342
|
-
self.ur_opened_depth = kwargs.get("ur_opened_depth")
|
|
343
|
-
self.ur_opened_od =
|
|
344
|
-
self.flow_rate =
|
|
341
|
+
self.tfa = to_number(kwargs.get("tfa"))
|
|
342
|
+
self.ur_opened_depth = to_number(kwargs.get("ur_opened_depth"))
|
|
343
|
+
self.ur_opened_od = to_number(kwargs.get("ur_opened_od"))
|
|
344
|
+
self.flow_rate = to_number(kwargs.get("flow_rate"))
|
|
345
345
|
self.activation_logic = self.ActivationLogic(kwargs["activation_logic"])
|
|
346
346
|
self.pipe_type = PipeType.UNDERREAMER
|
|
347
347
|
|
|
@@ -368,11 +368,16 @@ class UnderReamer(Pipe):
|
|
|
368
368
|
return self.UnderReamerActivationType.ALREADY_ACTIVATED
|
|
369
369
|
|
|
370
370
|
# if it was never activated and logic is open hole
|
|
371
|
-
if self.activation_logic == self.ActivationLogic.OPEN_HOLE_ACTIVATED and
|
|
371
|
+
if self.activation_logic == self.ActivationLogic.OPEN_HOLE_ACTIVATED and self.ur_opened_depth is None:
|
|
372
372
|
return self.UnderReamerActivationType.OPEN_HOLE
|
|
373
373
|
|
|
374
374
|
# if it was never activated and logic is flow activated
|
|
375
|
-
if
|
|
375
|
+
if (
|
|
376
|
+
mud_flow_rate is not None
|
|
377
|
+
and self.flow_rate is not None
|
|
378
|
+
and mud_flow_rate > self.flow_rate
|
|
379
|
+
and self.ur_opened_depth is None
|
|
380
|
+
):
|
|
376
381
|
return self.UnderReamerActivationType.MUD_FLOW_RATE
|
|
377
382
|
|
|
378
383
|
# Otherwise unactivated
|
|
File without changes
|
|
File without changes
|