completor 1.0.1__py3-none-any.whl → 1.1.0__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.
@@ -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
- start_segment, start_branch = _update_segmentbranch(lateral.df_device, df_annulus)
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
- else:
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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: completor
3
- Version: 1.0.1
3
+ Version: 1.1.0
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
@@ -17,7 +17,7 @@ Requires-Dist: docutils (==0.20.1) ; extra == "ert"
17
17
  Requires-Dist: ert (>=11.1.0,<12.0.0) ; extra == "ert"
18
18
  Requires-Dist: matplotlib (>=3.9.2,<4.0.0)
19
19
  Requires-Dist: numpy (<2.0.0)
20
- Requires-Dist: pandas (>=2.2.3,<3.0.0)
20
+ Requires-Dist: pandas (>=2.1.4,<3.0.0)
21
21
  Requires-Dist: pyqt5-qt5 (==5.15.2) ; extra == "ert"
22
22
  Requires-Dist: pytest-env (>=1.1.4,<2.0.0)
23
23
  Requires-Dist: rstcheck-core (>=1.2.1,<2.0.0) ; extra == "ert"
@@ -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=8DGrrUKHLMUz3k9hrcEMnyAWzKR04KrT4HkAR3tVZKA,23191
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,7 +11,7 @@ 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=_McIv2fSVROBV1JarPLxoOX9OA6ILIh72zwqedHwosQ,9037
14
+ completor/main.py,sha256=EwZYUEeYzKLy_L47VEcTuUATbjZCw3J-WQVe6iAHIGc,8964
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
@@ -20,8 +20,8 @@ completor/utils.py,sha256=6dvclzQ6yAvnqal6bzlE7C1iKWiT-sGjFCCu2tuMdG4,13542
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.0.1.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
24
- completor-1.0.1.dist-info/METADATA,sha256=z4bPc8-m3xisqxBAAkvD30zuLRZCTDo1pDBk8sTSIrQ,7913
25
- completor-1.0.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
26
- completor-1.0.1.dist-info/entry_points.txt,sha256=co5L2_CC2QQWVdEALeMp-NIC4mx4nRpcLcvpVXMYdeI,106
27
- completor-1.0.1.dist-info/RECORD,,
23
+ completor-1.1.0.dist-info/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
24
+ completor-1.1.0.dist-info/METADATA,sha256=9OL0dXgeM0r6N7iqQgwxQ5xqyjz4S6w6M9mBXvt3ay8,7913
25
+ completor-1.1.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
26
+ completor-1.1.0.dist-info/entry_points.txt,sha256=co5L2_CC2QQWVdEALeMp-NIC4mx4nRpcLcvpVXMYdeI,106
27
+ completor-1.1.0.dist-info/RECORD,,