rock-physics-open 0.2.0__py3-none-any.whl → 0.2.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.

Potentially problematic release.


This version of rock-physics-open might be problematic. Click here for more details.

@@ -6,7 +6,13 @@ import numpy as np
6
6
  INITIATE = False
7
7
 
8
8
 
9
- def get_snapshot_name(step: int = 1, include_snapshot_dir=True) -> str:
9
+ def get_snapshot_name(
10
+ step: int = 1,
11
+ include_filename: bool = True,
12
+ include_function_name: bool = True,
13
+ include_extension: bool = True,
14
+ include_snapshot_dir=True,
15
+ ) -> str:
10
16
  """
11
17
  Parameters
12
18
  ----------
@@ -20,7 +26,7 @@ def get_snapshot_name(step: int = 1, include_snapshot_dir=True) -> str:
20
26
  trace = inspect.stack()
21
27
  for frame in trace[step:]:
22
28
  if not any(
23
- keyword in frame.filename
29
+ keyword in frame.function
24
30
  for keyword in [
25
31
  "pydev",
26
32
  "ipython-input",
@@ -33,8 +39,12 @@ def get_snapshot_name(step: int = 1, include_snapshot_dir=True) -> str:
33
39
  frame = trace[step]
34
40
 
35
41
  dir_name = Path(frame.filename).parent / "snapshots"
36
- file_name = f"{Path(frame.filename).stem}_{frame.function}.npz"
37
- return str(dir_name / file_name) if include_snapshot_dir else file_name
42
+ file_name = Path(frame.filename).stem if include_filename else ""
43
+ function_name = frame.function if include_function_name else ""
44
+ extension = ".npz" if include_extension else ""
45
+ parts = [part for part in [file_name, function_name] if part]
46
+ base_name = "_".join(parts) + extension
47
+ return str(dir_name / base_name) if include_snapshot_dir else base_name
38
48
 
39
49
 
40
50
  def store_snapshot(snapshot_name: str, *args: np.ndarray) -> bool:
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.2.0'
21
- __version_tuple__ = version_tuple = (0, 2, 0)
20
+ __version__ = version = '0.2.1'
21
+ __version_tuple__ = version_tuple = (0, 2, 1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rock_physics_open
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Equinor Rock Physics Module
5
5
  Author-email: Harald Flesche <hfle@equinor.com>, Eivind Jahren <ejah@equinor.com>, Jimmy Zurcher <jiz@equinor.com>
6
6
  Maintainer-email: Harald Flesche <hfle@equinor.com>, Eirik Ola Aksnes <eoaksnes@equinor.com>, Christopher Collin Løkken <chcl@equinor.com>, Sivert Utne <sutn@equinor.com>
@@ -80,7 +80,7 @@ Alternatively, you can update the dependencies in your `pyproject.toml` file:
80
80
  <!-- x-release-please-start-version -->
81
81
  ```toml
82
82
  dependencies = [
83
- "rock-physics-open == 0.2.0",
83
+ "rock-physics-open == 0.2.1",
84
84
  ]
85
85
  ```
86
86
  <!-- x-release-please-end-version -->
@@ -1,5 +1,5 @@
1
1
  rock_physics_open/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- rock_physics_open/version.py,sha256=iB5DfB5V6YB5Wo4JmvS-txT42QtmGaWcWp3udRT7zCI,511
2
+ rock_physics_open/version.py,sha256=UoNvMtd4wCG76RwoSpNCUtaFyTwakGcZolfjXzNVSMY,511
3
3
  rock_physics_open/equinor_utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  rock_physics_open/equinor_utilities/anisotropy.py,sha256=toEsuIW_gHr34gZQpam3sQTl0ap6nAq1pW5hcX9GOHI,4469
5
5
  rock_physics_open/equinor_utilities/conversions.py,sha256=d6SGPbzYsmYBvhDqnohg1lPjAeYGOc0z_vdsuFeNlb4,194
@@ -24,7 +24,7 @@ rock_physics_open/equinor_utilities/machine_learning_utilities/run_regression.py
24
24
  rock_physics_open/equinor_utilities/machine_learning_utilities/sigmoidal_model.py,sha256=XczrkhwSF1bAO0XcYMirbj0ilLyZG6RgT7cX2owPufw,6001
25
25
  rock_physics_open/equinor_utilities/snapshot_test_utilities/__init__.py,sha256=lcbI80ZH6JQS0jI-eUITFBafHVRdhQ5VwttPolHnJyI,255
26
26
  rock_physics_open/equinor_utilities/snapshot_test_utilities/compare_snapshots.py,sha256=DBF9SNrC7H2V_zTNjmWK-Nz5b0uqNdx5Nktt858VJak,5457
27
- rock_physics_open/equinor_utilities/snapshot_test_utilities/snapshots.py,sha256=fiFqqKh7iTHMoo2rjl41KovbOm2_B2rw_QLWhI9XIBU,1731
27
+ rock_physics_open/equinor_utilities/snapshot_test_utilities/snapshots.py,sha256=CXLttELG2krN41WYph-zUFnhE3852g3HZlkp7yTTlIE,2085
28
28
  rock_physics_open/equinor_utilities/std_functions/__init__.py,sha256=MLOfMxRazS9tGOVvuLkUp-E4b6jRWOP4YCLf8si624c,1121
29
29
  rock_physics_open/equinor_utilities/std_functions/backus_ave.py,sha256=sYaXSfqjR69U_UFaMmrD5aEbR_0FrL7ZIWGg-Yi8QNo,1607
30
30
  rock_physics_open/equinor_utilities/std_functions/dvorkin_nur.py,sha256=TerlLcuP92ihf5vHaJES5KLyleG3CR7NWSExDI1jLIY,2138
@@ -135,8 +135,8 @@ rock_physics_open/ternary_plots/shale_prop_ternary.py,sha256=5-NB4LoXRP7JPQYaJBZ
135
135
  rock_physics_open/ternary_plots/ternary_patches.py,sha256=oYaIkCbzC4L19VWBz5iphVdQnpHX9kdy0p2NK65aIIM,7256
136
136
  rock_physics_open/ternary_plots/ternary_plot_utilities.py,sha256=weFDWyzd7wgr3xB63Q-xtT-KoJA6FNIDWuTkA7jr94Q,5669
137
137
  rock_physics_open/ternary_plots/unconventionals_ternary.py,sha256=KWjcBrjI8Tgr2FYpz1ey-DPuhUeSC7b5mpN8OzwNa4I,1823
138
- rock_physics_open-0.2.0.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
139
- rock_physics_open-0.2.0.dist-info/METADATA,sha256=swSAgEPAbnAGWi5i3eQ3nQDEc4T0AfPDD_2lMoIS5Ug,4077
140
- rock_physics_open-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
141
- rock_physics_open-0.2.0.dist-info/top_level.txt,sha256=zFBbfbv2pshFJvcvcLLigDmlJjjg08iDdb6ABgncaP8,18
142
- rock_physics_open-0.2.0.dist-info/RECORD,,
138
+ rock_physics_open-0.2.1.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
139
+ rock_physics_open-0.2.1.dist-info/METADATA,sha256=AmuCWkHVmurlmByxtjArsXpe_OEm1ZvfbMDunRy1yLA,4077
140
+ rock_physics_open-0.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
141
+ rock_physics_open-0.2.1.dist-info/top_level.txt,sha256=zFBbfbv2pshFJvcvcLLigDmlJjjg08iDdb6ABgncaP8,18
142
+ rock_physics_open-0.2.1.dist-info/RECORD,,