completor 1.0.1__py3-none-any.whl → 1.1.1__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.
- completor/create_output.py +3 -6
- completor/main.py +5 -7
- completor/utils.py +1 -1
- {completor-1.0.1.dist-info → completor-1.1.1.dist-info}/METADATA +8 -8
- {completor-1.0.1.dist-info → completor-1.1.1.dist-info}/RECORD +8 -8
- {completor-1.0.1.dist-info → completor-1.1.1.dist-info}/LICENSE +0 -0
- {completor-1.0.1.dist-info → completor-1.1.1.dist-info}/WHEEL +0 -0
- {completor-1.0.1.dist-info → completor-1.1.1.dist-info}/entry_points.txt +0 -0
completor/create_output.py
CHANGED
|
@@ -76,7 +76,8 @@ def format_output(well: Well, case: ReadCasefile, figure_name: str | None = None
|
|
|
76
76
|
if df_annulus.empty:
|
|
77
77
|
logger.info("No annular flow in Well : %s Lateral : %d", well.well_name, lateral.lateral_number)
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
if not lateral.df_device.empty:
|
|
80
|
+
start_segment, start_branch = _update_segmentbranch(lateral.df_device, df_annulus)
|
|
80
81
|
|
|
81
82
|
lateral.df_tubing = _connect_lateral(well.well_name, lateral, top, well, case)
|
|
82
83
|
|
|
@@ -234,15 +235,11 @@ def _update_segmentbranch(df_device: pd.DataFrame, df_annulus: pd.DataFrame) ->
|
|
|
234
235
|
Returns:
|
|
235
236
|
The numbers for starting segment and branch.
|
|
236
237
|
|
|
237
|
-
Raises:
|
|
238
|
-
ValueError: If there is neither device nor annulus data.
|
|
239
238
|
"""
|
|
240
|
-
if df_annulus.empty and df_device.empty:
|
|
241
|
-
raise ValueError("Cannot determine starting segment and branch without device and annulus data.")
|
|
242
239
|
if df_annulus.empty and not df_device.empty:
|
|
243
240
|
start_segment = max(df_device[Headers.START_SEGMENT_NUMBER].to_numpy()) + 1
|
|
244
241
|
start_branch = max(df_device[Headers.BRANCH].to_numpy()) + 1
|
|
245
|
-
|
|
242
|
+
elif not df_annulus.empty:
|
|
246
243
|
start_segment = max(df_annulus[Headers.START_SEGMENT_NUMBER].to_numpy()) + 1
|
|
247
244
|
start_branch = max(df_annulus[Headers.BRANCH].to_numpy()) + 1
|
|
248
245
|
return start_segment, start_branch
|
completor/main.py
CHANGED
|
@@ -7,7 +7,6 @@ import os
|
|
|
7
7
|
import re
|
|
8
8
|
import time
|
|
9
9
|
|
|
10
|
-
import pandas as pd
|
|
11
10
|
from tqdm import tqdm
|
|
12
11
|
|
|
13
12
|
from completor import create_output, parse, read_schedule, utils
|
|
@@ -27,8 +26,6 @@ from completor.utils import (
|
|
|
27
26
|
)
|
|
28
27
|
from completor.wells import Well
|
|
29
28
|
|
|
30
|
-
pd.set_option("future.no_silent_downcasting", True)
|
|
31
|
-
|
|
32
29
|
|
|
33
30
|
def get_content_and_path(case_content: str, file_path: str | None, keyword: str) -> tuple[str | None, str | None]:
|
|
34
31
|
"""Get the contents of a file from a path defined by user or case file.
|
|
@@ -92,7 +89,6 @@ def create(
|
|
|
92
89
|
"""
|
|
93
90
|
case = ReadCasefile(case_file=case_file, schedule_file=schedule, output_file=new_file)
|
|
94
91
|
active_wells = utils.get_active_wells(case.completion_table, case.gp_perf_devicelayer)
|
|
95
|
-
|
|
96
92
|
figure_name = None
|
|
97
93
|
if show_fig:
|
|
98
94
|
figure_no = 1
|
|
@@ -126,11 +122,13 @@ def create(
|
|
|
126
122
|
for chunk in find_keyword_data(Keywords.COMPLETION_SEGMENTS, schedule):
|
|
127
123
|
clean_data = clean_raw_data(chunk, Keywords.COMPLETION_SEGMENTS)
|
|
128
124
|
meaningful_data = read_schedule.set_compsegs(meaningful_data, clean_data)
|
|
129
|
-
|
|
130
125
|
for i, well_name in tqdm(enumerate(active_wells.tolist()), total=len(active_wells)):
|
|
131
|
-
|
|
126
|
+
try:
|
|
127
|
+
well = Well(well_name, i, case, meaningful_data[well_name])
|
|
128
|
+
except KeyError:
|
|
129
|
+
logger.warning(f"Well '{well_name}' is written in case file but does not exist in schedule file.")
|
|
130
|
+
continue
|
|
132
131
|
compdat, welsegs, compsegs, bonus = create_output.format_output(well, case, figure_name)
|
|
133
|
-
|
|
134
132
|
for keyword in [Keywords.COMPLETION_SEGMENTS, Keywords.WELL_SEGMENTS, Keywords.COMPLETION_DATA]:
|
|
135
133
|
old_data = find_well_keyword_data(well_name, keyword, schedule)
|
|
136
134
|
if not old_data:
|
completor/utils.py
CHANGED
|
@@ -338,7 +338,7 @@ def find_well_keyword_data(well: str, keyword: str, text: str) -> str:
|
|
|
338
338
|
if once:
|
|
339
339
|
lines.append(line)
|
|
340
340
|
continue
|
|
341
|
-
if well
|
|
341
|
+
if well == line.split()[0].replace("'", "").replace('"', ""):
|
|
342
342
|
if keyword in [Keywords.WELL_SEGMENTS, Keywords.COMPLETION_SEGMENTS]:
|
|
343
343
|
# These keywords should just be the entire match as they never contain more than one well.
|
|
344
344
|
return match
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: completor
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.1
|
|
4
4
|
Summary: Advanced mulit-segmented well completion tool.
|
|
5
5
|
Home-page: https://github.com/equinor/completor
|
|
6
6
|
License: LGPL-3.0-only
|
|
@@ -14,15 +14,15 @@ Classifier: Programming Language :: Python :: 3
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
15
|
Provides-Extra: ert
|
|
16
16
|
Requires-Dist: docutils (==0.20.1) ; extra == "ert"
|
|
17
|
-
Requires-Dist: ert (
|
|
18
|
-
Requires-Dist: matplotlib (>=3.
|
|
19
|
-
Requires-Dist: numpy (<2
|
|
20
|
-
Requires-Dist: pandas (>=2.
|
|
17
|
+
Requires-Dist: ert (>11.1.0) ; extra == "ert"
|
|
18
|
+
Requires-Dist: matplotlib (>=3.6,<4.0)
|
|
19
|
+
Requires-Dist: numpy (<2)
|
|
20
|
+
Requires-Dist: pandas (>=2.1.4,<3.0.0)
|
|
21
21
|
Requires-Dist: pyqt5-qt5 (==5.15.2) ; extra == "ert"
|
|
22
|
-
Requires-Dist: pytest-env (>=1
|
|
22
|
+
Requires-Dist: pytest-env (>=1,<2)
|
|
23
23
|
Requires-Dist: rstcheck-core (>=1.2.1,<2.0.0) ; extra == "ert"
|
|
24
|
-
Requires-Dist: scipy (>=1.
|
|
25
|
-
Requires-Dist: tqdm (>=4.
|
|
24
|
+
Requires-Dist: scipy (>=1.10,<2.0)
|
|
25
|
+
Requires-Dist: tqdm (>=4.50,<5.0)
|
|
26
26
|
Project-URL: Bug Tracker, https://github.com/equinor/completor/issues
|
|
27
27
|
Project-URL: Documentation, https://equinor.github.io/completor
|
|
28
28
|
Project-URL: Repository, https://github.com/equinor/completor
|
|
@@ -2,7 +2,7 @@ completor/__init__.py,sha256=k6amf7jhp7KkBIlaw93-NZITxyZjPSzA5McFAZh8yv8,76
|
|
|
2
2
|
completor/completion.py,sha256=COtRZpEdmuf3X_uOvEYYLz428nQSn1Z8QH-7TTREyus,30485
|
|
3
3
|
completor/config_jobs/run_completor,sha256=XePKj2xocfGF0XFRqr7sqfpZGrjgWcfaZLHIhVvGFCQ,600
|
|
4
4
|
completor/constants.py,sha256=Th7fzID5NPUhyV2RRc5h9qRQ963cKGT3TVCX_bsAtHA,12802
|
|
5
|
-
completor/create_output.py,sha256=
|
|
5
|
+
completor/create_output.py,sha256=3IIndoE0aE1ZTKVnjMLi56mJLVbgrYTWkEJs4XkqZDU,23028
|
|
6
6
|
completor/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
completor/exceptions/clean_exceptions.py,sha256=uQ2jgGfvUDAoS56JBWh-8ZCPIMB4hvYxLF-snA-_-pg,373
|
|
8
8
|
completor/exceptions/exceptions.py,sha256=eS00mVzmC4gQ7MUyGSknvKotmo2XzNGyp007mhjLMy0,5081
|
|
@@ -11,17 +11,17 @@ completor/hook_implementations/jobs.py,sha256=8Ao8UadfJzEY7jWzj6C_OXm18fHmfXrbCB
|
|
|
11
11
|
completor/input_validation.py,sha256=OGY5oCdctlqzeg5Z2l4cmRb3ITtSjLp1Ufp0Joj7aKA,13495
|
|
12
12
|
completor/launch_args_parser.py,sha256=gb3FcyufZlRnKS3BZkFmgVH1VoSxMD0MbCLsHZKmz4c,1413
|
|
13
13
|
completor/logger.py,sha256=gYDbPL8ca5qT_MqYlDKEMKcSfIXW_59QklX8Gss5b2U,4784
|
|
14
|
-
completor/main.py,sha256=
|
|
14
|
+
completor/main.py,sha256=ipARMDXXqPYRtBxYQnlj5MohepwkgrQkX3s2IJEaEcI,9151
|
|
15
15
|
completor/parse.py,sha256=EGlt9CgkrXPqa7woyWQ5t_nh6OWsFrc2SJr8aFr_KsQ,20133
|
|
16
16
|
completor/prepare_outputs.py,sha256=fenEo3UfDzXF4jaxi9vDI-g-BkYSti0LxILJf7lO84A,72081
|
|
17
17
|
completor/read_casefile.py,sha256=ZJj-xrpcTeagJmqqi72UIOIcq9uQJaEZClbCA1lW4yw,34081
|
|
18
18
|
completor/read_schedule.py,sha256=IYyCubOggFGg664h1flTl7MUJhJWyibr6JsptnURjUA,18101
|
|
19
|
-
completor/utils.py,sha256=
|
|
19
|
+
completor/utils.py,sha256=JFzTvt4wLZm-VUoamneQgUBVfdoPJmNAlgdQ80qOL5Y,13576
|
|
20
20
|
completor/visualization.py,sha256=ObxThqIyW3fsvVIupxVsgySFI_54n_Di-HTzFtDMSgo,4580
|
|
21
21
|
completor/visualize_well.py,sha256=I2kp2rnM2eFV4RUWnTTysPTqQKNEBicF2S9Z3rrAsNA,8672
|
|
22
22
|
completor/wells.py,sha256=oj3e65tSIDFJEpfOKkr_j4H3RyFKpdjZBAcef7sUoaY,12124
|
|
23
|
-
completor-1.
|
|
24
|
-
completor-1.
|
|
25
|
-
completor-1.
|
|
26
|
-
completor-1.
|
|
27
|
-
completor-1.
|
|
23
|
+
completor-1.1.1.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
|
24
|
+
completor-1.1.1.dist-info/METADATA,sha256=TIfdCVY0R8QPFW2nNseFcfgflD7GVu-vNKwP8VcRU_c,7880
|
|
25
|
+
completor-1.1.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
26
|
+
completor-1.1.1.dist-info/entry_points.txt,sha256=co5L2_CC2QQWVdEALeMp-NIC4mx4nRpcLcvpVXMYdeI,106
|
|
27
|
+
completor-1.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|