orchid-python-api 5.24.1__tar.gz → 5.24.4__tar.gz

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.
Files changed (84) hide show
  1. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/PKG-INFO +9 -9
  2. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/ReleaseNotes.md +46 -0
  3. orchid_python_api-5.24.4/orchid/VERSION +1 -0
  4. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/configuration.py +31 -36
  5. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/dot_net.py +1 -2
  6. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/native_data_frame_adapter.py +5 -0
  7. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/native_monitor_adapter.py +3 -3
  8. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/native_stage_adapter.py +4 -4
  9. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/net_date_time.py +4 -5
  10. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/net_stage_qc.py +1 -1
  11. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/script_adapter_context.py +1 -1
  12. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/version.py +12 -8
  13. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/change_stage_times.py +2 -2
  14. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/low_level/add_stages_low.py +1 -1
  15. orchid_python_api-5.24.4/orchid_python_api/requirements.txt +8 -0
  16. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/pyproject.toml +10 -11
  17. orchid_python_api-5.24.1/orchid/VERSION +0 -1
  18. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/LICENSE +0 -0
  19. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/README.md +0 -0
  20. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/copy_orchid_examples.py +0 -0
  21. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/copy_orchid_low_level_examples.py +0 -0
  22. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/copy_orchid_manual_examples.py +0 -0
  23. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/copy_orchid_tutorials.py +0 -0
  24. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/__init__.py +0 -0
  25. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/__version__.py +0 -0
  26. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/base.py +0 -0
  27. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/base_time_series_adapter.py +0 -0
  28. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/convert.py +0 -0
  29. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/core.py +0 -0
  30. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/dom_project_object.py +0 -0
  31. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/dot_net_disposable.py +0 -0
  32. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/dot_net_dom_access.py +0 -0
  33. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/measurement.py +0 -0
  34. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/native_project_user_data_adapter.py +0 -0
  35. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/native_stage_part_adapter.py +0 -0
  36. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/native_subsurface_point.py +0 -0
  37. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/native_time_series_adapter.py +0 -0
  38. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/native_trajectory_adapter.py +0 -0
  39. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/native_treatment_calculations.py +0 -0
  40. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/native_treatment_curve_adapter.py +0 -0
  41. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/native_well_adapter.py +0 -0
  42. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/net_enumerable.py +0 -0
  43. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/net_fracture_diagnostics_factory.py +0 -0
  44. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/net_quantity.py +0 -0
  45. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/physical_quantity.py +0 -0
  46. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/project.py +0 -0
  47. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/project_store.py +0 -0
  48. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/reference_origins.py +0 -0
  49. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/searchable_data_frames.py +0 -0
  50. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/searchable_project_objects.py +0 -0
  51. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/searchable_stage_parts.py +0 -0
  52. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/searchable_stages.py +0 -0
  53. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/unit_system.py +0 -0
  54. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid/validation.py +0 -0
  55. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/__init__.py +0 -0
  56. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/add_stages.py +0 -0
  57. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/completion_analysis.ipynb +0 -0
  58. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/completion_analysis.py +0 -0
  59. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/low_level/auto_pick.ipynb +0 -0
  60. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/low_level/auto_pick.py +0 -0
  61. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/low_level/auto_pick_and_create_stage_attribute.py +0 -0
  62. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/low_level/auto_pick_iterate_example.py +0 -0
  63. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/low_level/monitor_time_series.py +0 -0
  64. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/low_level/multi_picking_events.py +0 -0
  65. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/manual/data_frame_with_guid.ipynb +0 -0
  66. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/manual/data_frame_with_guid.py +0 -0
  67. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/plot_time_series.ipynb +0 -0
  68. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/plot_time_series.py +0 -0
  69. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/plot_trajectories.ipynb +0 -0
  70. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/plot_trajectories.py +0 -0
  71. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/plot_treatment.ipynb +0 -0
  72. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/plot_treatment.py +0 -0
  73. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/python_api.yaml.example +0 -0
  74. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/pythonnet3/internal_tests.ipynb +0 -0
  75. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/pythonnet3/internal_tests.py +0 -0
  76. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/pythonnet3/low_level.ipynb +0 -0
  77. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/pythonnet3/low_level.py +0 -0
  78. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/search_data_frames.ipynb +0 -0
  79. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/search_data_frames.py +0 -0
  80. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/stage_qc_results.py +0 -0
  81. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/volume_2_first_response.ipynb +0 -0
  82. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/examples/volume_2_first_response.py +0 -0
  83. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/tutorials/dom_navigation_tutorial.ipynb +0 -0
  84. {orchid_python_api-5.24.1 → orchid_python_api-5.24.4}/orchid_python_api/tutorials/dom_navigation_tutorial.py +0 -0
@@ -1,15 +1,15 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: orchid-python-api
3
- Version: 5.24.1
3
+ Version: 5.24.4
4
4
  Summary: Defines and implements the Python API for Orchid*. (*Orchid is a mark of KAPPA.)
5
5
  Home-page: https://github.com/Reveal-Energy-Services/orchid-python-api
6
6
  License: Apache-2.0
7
7
  Keywords: Orchid Integration,Fracture Diagnostics
8
8
  Author: KAPPA.
9
- Author-email: support@reveal-energy.com
9
+ Author-email: support@kappaeng.com
10
10
  Maintainer: KAPPA.
11
- Maintainer-email: support@reveal-energy.com
12
- Requires-Python: >=3.10,<3.11
11
+ Maintainer-email: support@kappaeng.com
12
+ Requires-Python: >=3.10,<3.13
13
13
  Classifier: Development Status :: 5 - Production/Stable
14
14
  Classifier: Intended Audience :: Other Audience
15
15
  Classifier: Intended Audience :: Science/Research
@@ -18,20 +18,20 @@ Classifier: Operating System :: Microsoft :: Windows :: Windows 10
18
18
  Classifier: Programming Language :: Python
19
19
  Classifier: Programming Language :: Python :: 3
20
20
  Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
21
23
  Classifier: Programming Language :: Python :: Implementation :: CPython
22
24
  Classifier: Topic :: Scientific/Engineering
23
25
  Classifier: Topic :: Software Development :: Libraries
24
26
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
25
27
  Requires-Dist: deal (>=4.23.4,<5.0.0)
26
28
  Requires-Dist: ipython (>=8.7.0,<9.0.0)
27
- Requires-Dist: jupyter (>=1.0.0,<2.0.0)
28
- Requires-Dist: jupyterlab (>=3.5.1,<4.0.0)
29
29
  Requires-Dist: matplotlib (>=3.6.2,<4.0.0)
30
30
  Requires-Dist: numpy (>=1.23.5,<2.0.0)
31
31
  Requires-Dist: option (>=2.1.0,<3.0.0)
32
- Requires-Dist: packaging (>=22.0,<23.0)
33
- Requires-Dist: pandas (>=1.5.2,<2.0.0)
34
- Requires-Dist: pendulum (>=2.1.2,<3.0.0)
32
+ Requires-Dist: packaging (>=24.1,<25.0)
33
+ Requires-Dist: pandas (>=2.2.2,<3.0.0)
34
+ Requires-Dist: pendulum (>=3.0.0,<4.0.0)
35
35
  Requires-Dist: pint (>=0.20.1,<0.21.0)
36
36
  Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
37
37
  Requires-Dist: pythonnet (==3.0.3)
@@ -13,6 +13,52 @@ the [Python grip utility](https://pypi.org/project/grip/). This application allo
13
13
  files before sending off to GitHub". Although you need not send any of these file to `GitHub`, by using `grip`
14
14
  to render the file, you can much more easily navigate the document links.
15
15
 
16
+ ### Release notes for 5.24.4
17
+
18
+ This release is the production release of the Orchid Python API corresponding to Orchid 5.24.3. We have made the necessary
19
+ updates to the Python API to remain compatible with the .NET API.
20
+
21
+ We have also updated dependencies on the Python side. Note that we skipped the 5.24.2 release as it was a smaller, quicker release.
22
+
23
+ #### Possible breaking .NET API changes
24
+
25
+ - None
26
+
27
+ #### Resolved Issues
28
+
29
+ - None
30
+
31
+ #### Features
32
+
33
+ - None
34
+
35
+ #### Known Issues
36
+
37
+ - None
38
+
39
+ ### Release notes for 5.24.3
40
+
41
+ This release is the production release of the Orchid Python API corresponding to Orchid 5.24.3. We have made the necessary
42
+ updates to the Python API to remain compatible with the .NET API.
43
+
44
+ We have also updated dependencies on the Python side. Note that we skipped the 5.24.2 release as it was a smaller, quicker release.
45
+
46
+ #### Possible breaking .NET API changes
47
+
48
+ - None
49
+
50
+ #### Resolved Issues
51
+
52
+ - None
53
+
54
+ #### Features
55
+
56
+ - None
57
+
58
+ #### Known Issues
59
+
60
+ - None
61
+
16
62
  ### Release notes for 5.24.1
17
63
 
18
64
  This release is the production release of the Orchid Python API corresponding to Orchid 5.24.1. We have made the necessary
@@ -0,0 +1 @@
1
+ 5.24.4
@@ -19,13 +19,12 @@ import glob
19
19
  import logging
20
20
  import os
21
21
  import pathlib
22
- from typing import Dict
22
+ from typing import Dict, Any
23
23
  import warnings
24
-
25
24
  import toolz.curried as toolz
26
25
  import yaml
27
26
 
28
- import orchid.version
27
+ from orchid.version import get_orchid_sdk_version
29
28
 
30
29
 
31
30
  _logger = logging.getLogger(__name__)
@@ -40,28 +39,20 @@ ORCHID_ROOT_ENV_VAR = 'ORCHID_ROOT'
40
39
  ORCHID_TRAINING_DATA_ENV_VAR = 'ORCHID_TRAINING_DATA'
41
40
 
42
41
 
43
- def get_environment_configuration() -> Dict:
42
+ def get_environment_configuration() -> Dict[str, Dict[str, str]]:
44
43
  """
45
44
  Gets the API configuration from the system environment.
46
45
 
47
46
  Returns:
48
47
  The configuration, if any, calculated from the system environment.
49
48
  """
50
- environment_configuration = {}
51
- if ORCHID_ROOT_ENV_VAR in os.environ and ORCHID_TRAINING_DATA_ENV_VAR in os.environ:
52
- environment_configuration = {'orchid': {'root': os.environ[ORCHID_ROOT_ENV_VAR],
53
- 'training_data': os.environ[ORCHID_TRAINING_DATA_ENV_VAR]}}
54
- elif ORCHID_ROOT_ENV_VAR in os.environ:
55
- environment_configuration = {'orchid': {'root': os.environ[ORCHID_ROOT_ENV_VAR]}}
56
- elif ORCHID_TRAINING_DATA_ENV_VAR in os.environ:
57
- environment_configuration = {'orchid': {'training_data': os.environ[ORCHID_TRAINING_DATA_ENV_VAR]}}
58
-
49
+ environment_configuration = {'orchid': {key: os.environ[env_var] for key, env_var in
50
+ [('root', ORCHID_ROOT_ENV_VAR), ('training_data', ORCHID_TRAINING_DATA_ENV_VAR)] if env_var in os.environ}}
59
51
  _logger.debug(f'environment configuration = {environment_configuration}')
60
-
61
52
  return environment_configuration
62
53
 
63
54
 
64
- def get_fallback_configuration() -> Dict:
55
+ def get_fallback_configuration() -> Dict[str, Dict[str, str]]:
65
56
  """
66
57
  Returns final fallback API configuration.
67
58
 
@@ -80,24 +71,25 @@ def get_fallback_configuration() -> Dict:
80
71
  # `$ProgramFiles/Reveal Energy Services, Inc/Orchid/<version-specific-directory>`. The following code
81
72
  # calculates an actual location by substituting the current version number for the symbol,
82
73
  # `<version-specific-directory>`.
83
- standard_orchid_dir = pathlib.Path(os.environ['ProgramFiles']).joinpath('Reveal Energy Services',
84
- 'Orchid')
85
- version_id = orchid.version.api_version()
86
- version_dirname = f'Orchid-{version_id.major}.{version_id.minor}.{version_id.micro}'
87
- glob_path = standard_orchid_dir.joinpath(f'{version_dirname}*', 'PythonApiLibs')
88
- candidate_directories = glob.glob(str(glob_path))
89
- if len(candidate_directories) == 1:
90
- fallback = {'orchid': {'root': str(candidate_directories[0])}}
91
- elif len(candidate_directories) == 0:
92
- fallback = {}
93
- else:
94
- fallback = {}
95
- warnings.warn(f'Fallback configuration found multiple matches for {str(glob_path)}')
96
- _logger.debug(f'fallback configuration={fallback}')
74
+ program_files_path = os.environ.get("ProgramFiles")
75
+ fallback = {}
76
+ if program_files_path is not None:
77
+ orchid_version = get_orchid_sdk_version() + '.*'
78
+ python_api_lib_pattern_path = os.path.join(program_files_path, 'Reveal Energy Services', 'Orchid', orchid_version, 'Orchid-'+orchid_version, 'PythonApiLibs')
79
+ matching_paths = glob.glob(python_api_lib_pattern_path)
80
+ if len(matching_paths) == 1:
81
+ python_api_lib_path = matching_paths[0]
82
+ _logger.info(f"PythonApiLibs path found : {python_api_lib_path}")
83
+ fallback = {'orchid': {'root': str(matching_paths[0])}}
84
+ elif len(matching_paths) == 0:
85
+ _logger.info(f"PythonApiLibs path not found for {str(python_api_lib_pattern_path)}")
86
+ else:
87
+ warnings.warn(f'Fallback configuration found multiple matches for {str(python_api_lib_pattern_path)}')
88
+ _logger.debug(f'fallback configuration={fallback}')
97
89
  return fallback
98
90
 
99
91
 
100
- def get_file_configuration() -> Dict:
92
+ def get_file_configuration() -> Dict[str, Any]:
101
93
  """
102
94
  Returns the API configuration read from the file system.
103
95
 
@@ -117,7 +109,7 @@ def get_file_configuration() -> Dict:
117
109
  return file
118
110
 
119
111
 
120
- def python_api() -> Dict[str, str]:
112
+ def get_configuration() -> Dict[str, Dict[str, Any]]:
121
113
  """
122
114
  Calculate the configuration for the Python API.
123
115
 
@@ -128,12 +120,15 @@ def python_api() -> Dict[str, str]:
128
120
  file_configuration = get_file_configuration()
129
121
  env_configuration = get_environment_configuration()
130
122
 
131
- result = merge_configurations(fallback_configuration, file_configuration, env_configuration)
132
- _logger.debug(f'result configuration={result}')
133
- return result
123
+ configuration_dict = merge_configurations(fallback_configuration, file_configuration, env_configuration)
124
+ if not configuration_dict.get('orchid') or (configuration_dict.get('orchid') and not configuration_dict['orchid'].get('root')):
125
+ raise ConfigurationError("You must create an environment variable ORCHID_ROOT or a config file to set up the path to the PythonApiLibs folder since it's not in the default location")
126
+
127
+ _logger.debug(f'result configuration={configuration_dict}')
128
+ return configuration_dict
134
129
 
135
130
 
136
- def merge_configurations(fallback_configuration, file_configuration, env_configuration):
131
+ def merge_configurations(fallback_configuration: Dict[str, Dict[str, str]], file_configuration: Dict[str, Dict[str, Any]], env_configuration: Dict[str, Dict[str, str]]) -> Dict[str, Dict[str, Any]]:
137
132
  # The rules for merging these configurations is not the same as a simple dictionary. The rules are:
138
133
  # - If two different configurations share a top-level key, merge the second level dictionaries.
139
134
  # - Then merge the distinct top-level keys.
@@ -163,5 +158,5 @@ def training_data_path() -> pathlib.Path:
163
158
  This function raises KeyError if the training directory path is not available from the package
164
159
  configuration.
165
160
  """
166
- result = pathlib.Path(toolz.get_in(['orchid', 'training_data'], python_api()))
161
+ result = pathlib.Path(toolz.get_in(['orchid', 'training_data'], get_configuration()))
167
162
  return result
@@ -54,8 +54,7 @@ def app_settings_path() -> str:
54
54
 
55
55
  :return: The required pathname.
56
56
  """
57
- result = os.fspath(pathlib.Path(toolz.get_in(['orchid', 'root'],
58
- orchid.configuration.python_api())).joinpath('appSettings.json'))
57
+ result = os.fspath(pathlib.Path(toolz.get_in(['orchid', 'root'], orchid.configuration.get_configuration())).joinpath('appSettings.json'))
59
58
  return result
60
59
 
61
60
 
@@ -13,6 +13,7 @@
13
13
  #
14
14
 
15
15
  import dataclasses
16
+ import traceback
16
17
  import uuid
17
18
  from typing import Iterable
18
19
 
@@ -227,9 +228,13 @@ def _table_row_to_dict(reader):
227
228
  except ValueError as ve:
228
229
  if 'DateTimeOffset.MinValue' in str(ve):
229
230
  raise DataFrameAdapterDateTimeOffsetMinValueError(column_no, column_name)
231
+ else:
232
+ raise Exception(f"Cannot read value from dot net data table column {column_no} named {column_name}, value {value}, {traceback.format_exc()}")
230
233
  except TypeError as te:
231
234
  if 'System.DateTime' in str(te):
232
235
  raise DataFrameAdapterDateTimeError(value.GetType())
236
+ else:
237
+ raise Exception(f"Cannot read value from dot net data table column {column_no} named {column_name}, value {value}, {traceback.format_exc()}")
233
238
 
234
239
  result = toolz.pipe(
235
240
  reader.FieldCount,
@@ -61,7 +61,7 @@ class NativeMonitorAdapter(dpo.DomProjectObject):
61
61
 
62
62
  Returns:
63
63
  The time range during which this monitor is active. The type of the returned value is
64
- `pendulum.Period`. See the [documentation](https://pendulum.eustace.io/docs/) to understand the
65
- methods available from a `pendulum.Period` instance.
64
+ `pendulum.Interval`. See the [documentation](https://pendulum.eustace.io/docs/) to understand the
65
+ methods available from a `pendulum.Interval` instance.
66
66
  """
67
- return pendulum.Period(self.start_time, self.stop_time)
67
+ return pendulum.Interval(self.start_time, self.stop_time)
@@ -141,10 +141,10 @@ class NativeStageAdapter(dpo.DomProjectObject):
141
141
  stop_time = dna.transformed_dom_property('stop_time', 'The stop time of the stage treatment',
142
142
  ndt.as_date_time)
143
143
 
144
- def _get_time_range(self) -> pdt.Period:
145
- return pdt.period(self.start_time, self.stop_time)
144
+ def _get_time_range(self) -> pdt.Interval:
145
+ return pdt.Interval(self.start_time, self.stop_time)
146
146
 
147
- def _set_time_range(self, to_time_range: pdt.Period):
147
+ def _set_time_range(self, to_time_range: pdt.Interval):
148
148
  to_start_net_time = ndt.as_net_date_time(to_time_range.start)
149
149
  to_stop_net_time = ndt.as_net_date_time(to_time_range.end)
150
150
  if len(self.stage_parts()) == 1:
@@ -486,7 +486,7 @@ class CreateStageDto:
486
486
  # issue with Orchid.
487
487
  #
488
488
  # Note supplying no value (an implicit `None`) results in the largest possible .NET time range.
489
- maybe_time_range: Optional[pdt.Period] = None
489
+ maybe_time_range: Optional[pdt.Interval] = None
490
490
  # WARNING: one must currently supply an ISIP for each stage; otherwise, Orchid fails to correctly load
491
491
  # the project saved with the added stages.
492
492
  maybe_isip: Optional[om.Quantity] = None # If not `None`, must be a pressure
@@ -24,7 +24,6 @@ from typing import Tuple, Union
24
24
 
25
25
  import dateutil.tz as duz
26
26
  import pendulum as pdt
27
- import pendulum.tz as ptz
28
27
 
29
28
  from orchid import base
30
29
 
@@ -170,7 +169,7 @@ def _(net_time_point: DateTime) -> pdt.DateTime:
170
169
  return NAT
171
170
 
172
171
  if net_time_point.Kind == DateTimeKind.Utc:
173
- return _net_time_point_to_datetime(base.constantly(ptz.UTC), net_time_point)
172
+ return _net_time_point_to_datetime(base.constantly(pdt.UTC), net_time_point)
174
173
 
175
174
  if net_time_point.Kind == DateTimeKind.Unspecified:
176
175
  raise NetDateTimeUnspecifiedDateTimeKindError(net_time_point)
@@ -201,9 +200,9 @@ def _(net_time_point: DateTimeOffset) -> pdt.DateTime:
201
200
  def net_date_time_offset_to_timezone(ntp):
202
201
  integral_offset = int(ntp.Offset.TotalSeconds)
203
202
  if integral_offset == 0:
204
- return ptz.UTC
203
+ return pdt.UTC
205
204
 
206
- return ptz.timezone(integral_offset)
205
+ return pdt.timezone(integral_offset)
207
206
 
208
207
  return _net_time_point_to_datetime(net_date_time_offset_to_timezone, net_time_point)
209
208
 
@@ -227,7 +226,7 @@ def as_net_date_time(time_point: pdt.DateTime) -> DateTime:
227
226
  if time_point == NAT:
228
227
  return DateTime.MinValue
229
228
 
230
- if not time_point.tzinfo == ptz.UTC:
229
+ if not time_point.tzinfo == pdt.UTC:
231
230
  raise NetDateTimeNoTzInfoError(time_point)
232
231
 
233
232
  carry_seconds, milliseconds = microseconds_to_milliseconds_with_carry(time_point.microsecond)
@@ -28,7 +28,7 @@ import uuid
28
28
  import toolz.curried as toolz
29
29
 
30
30
  # noinspection PyUnresolvedReferences,PyPackageRequirements
31
- from Orchid.Common import CorrectionStatus as NetCorrectionStatus
31
+ from Orchid.FractureDiagnostics import CorrectionStatus as NetCorrectionStatus
32
32
 
33
33
 
34
34
  class CorrectionStatus(enum.Enum):
@@ -32,7 +32,7 @@ def append_orchid_assemblies_directory_path() -> None:
32
32
  """
33
33
  Append the directory containing the required Orchid assemblies to `sys.path`.
34
34
  """
35
- orchid_bin_dir = toolz.get_in(['orchid', 'root'], orchid.configuration.python_api())
35
+ orchid_bin_dir = toolz.get_in(['orchid', 'root'], orchid.configuration.get_configuration())
36
36
  if orchid_bin_dir not in sys.path:
37
37
  sys.path.append(orchid_bin_dir)
38
38
 
@@ -14,20 +14,24 @@
14
14
  #
15
15
  # This file is part of Orchid and related technologies.
16
16
  #
17
-
17
+ import re
18
18
  import pathlib
19
19
 
20
- import packaging.version as pv
21
-
22
20
 
23
- def api_version():
21
+ def get_orchid_sdk_version():
24
22
  """
25
23
  Calculate the Python API version.
26
24
 
27
25
  Returns:
28
26
  The Python API version read from the `VERSION` file.
29
27
  """
30
- with pathlib.Path(__file__).parent.joinpath('VERSION').open() as version_file:
31
- text_version = version_file.read()
32
- result = pv.parse(text_version)
33
- return result
28
+ try:
29
+ with pathlib.Path(__file__).parent.joinpath('VERSION').open() as version_file:
30
+ text_version = version_file.read()
31
+ version_match = re.search(r'\d+\.\d+\.\d+(?:\.\d+)?', text_version)
32
+ if version_match:
33
+ return version_match.group()
34
+ else:
35
+ raise ValueError("Cannot find a correct version number in VERSION file.")
36
+ except FileNotFoundError:
37
+ raise FileNotFoundError("Missing VERSION file")
@@ -41,11 +41,11 @@ def change_stage_time_range(project):
41
41
  # Start time before change
42
42
  ante_start_time = stage.start_time
43
43
  ante_stop_time = stage.stop_time
44
- logging.info(f'Stage time_range before {pendulum.Period(ante_start_time, ante_stop_time)}')
44
+ logging.info(f'Stage time_range before {pendulum.Interval(ante_start_time, ante_stop_time)}')
45
45
 
46
46
  post_start_time = ante_start_time.subtract(minutes=10)
47
47
  post_stop_time = ante_stop_time.add(minutes=10)
48
- stage.time_range = pendulum.Period(post_start_time, post_stop_time)
48
+ stage.time_range = pendulum.Interval(post_start_time, post_stop_time)
49
49
  logging.info(f'Stage time_range after {stage.time_range}')
50
50
 
51
51
 
@@ -74,7 +74,7 @@ class CreateStageDto:
74
74
  # issue with Orchid.
75
75
  #
76
76
  # Note supplying no value (an implicit `None`) results in the largest possible .NET time range.
77
- maybe_time_range: Optional[pendulum.Period] = None
77
+ maybe_time_range: Optional[pendulum.Interval] = None
78
78
 
79
79
  # WARNING: one must currently supply an ISIP for each stage; otherwise, Orchid fails to correctly load
80
80
  # the project saved with the added stages.
@@ -0,0 +1,8 @@
1
+ clr==1.0.3
2
+ matplotlib==3.9.1
3
+ numpy==2.0.1
4
+ pandas==2.2.2
5
+ pendulum==3.0.0
6
+ pythonnet==3.0.3
7
+ scipy==1.14.0
8
+ seaborn==0.13.2
@@ -4,17 +4,16 @@ build-backend = "poetry.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "orchid-python-api"
7
- version = "5.24.1"
7
+ version = "5.24.4"
8
8
  description = "Defines and implements the Python API for Orchid*. (*Orchid is a mark of KAPPA.)"
9
- authors = [ "KAPPA. <support@reveal-energy.com>",]
10
- maintainers = [ "KAPPA. <support@reveal-energy.com>",]
9
+ authors = [ "KAPPA. <support@kappaeng.com>",]
10
+ maintainers = [ "KAPPA. <support@kappaeng.com>",]
11
11
  license = "Apache-2.0"
12
12
  readme = "README.md"
13
13
  homepage="https://github.com/Reveal-Energy-Services/orchid-python-api"
14
14
  repository="https://github.com/Reveal-Energy-Services/orchid-python-api"
15
15
  documentation="https://github.com/Reveal-Energy-Services/orchid-python-api/wiki"
16
- keywords=["Orchid Integration",
17
- "Fracture Diagnostics"]
16
+ keywords=["Orchid Integration", "Fracture Diagnostics"]
18
17
  classifiers=[
19
18
  # Trove classifiers
20
19
  # Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
@@ -55,21 +54,19 @@ include=[
55
54
  exclude=["orchid/.ipynb_checkpoints/", "**/*py~"]
56
55
 
57
56
  [tool.poetry.dependencies]
58
- python = ">=3.10,<3.11"
57
+ python = ">=3.10,<3.13"
59
58
  pythonnet = "3.0.3"
60
59
  numpy = "^1.23.5"
61
60
  # Allow consumers to create `datetime` instances using `dateutil`, for example, by calling `dateutil.parse()`, and
62
61
  # accept those instances when supplying a time point as a function/method argument.
63
62
  python-dateutil = "^2.8.2"
64
- jupyter = "^1.0.0"
65
63
  matplotlib = "^3.6.2"
66
- pandas = "^1.5.2"
67
- pendulum = "^2.1.2"
64
+ pandas = "^2.2.2"
65
+ pendulum = "^3.0.0"
68
66
  option = "^2.1.0"
69
67
  deal = "^4.23.4"
70
68
  ipython = "^8.7.0"
71
- jupyterlab = "^3.5.1"
72
- packaging = "^22.0"
69
+ packaging = "^24.1"
73
70
  pint = "^0.20.1"
74
71
  pyyaml = "^6.0"
75
72
  seaborn = "^0.12.1"
@@ -87,6 +84,8 @@ copy_orchid_manual_examples = "copy_orchid_manual_examples:main"
87
84
  Issues = "https://github.com/Reveal-Energy-Services/orchid-python-api/issues"
88
85
 
89
86
  [tool.poetry.group.dev.dependencies]
87
+ platformdirs = "^4.2.2"
88
+ fastjsonschema = "^2.20.0"
90
89
  pyhamcrest = "^2.0.4"
91
90
  behave = "^1.2.6"
92
91
  invoke = "^1.7.3"
@@ -1 +0,0 @@
1
- 5.24.1