Skip to content

Commit 5677833

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 1990bce + c8ddac3 commit 5677833

37 files changed

+752
-317
lines changed

WhatsNewGemPy3.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ To ensure compatibility with our new octree approach, we have implemented dual c
4343

4444
**7. Initial Steps in LiquidEarth Integration**
4545

46-
We have begun integrating GemPy with the LiquidEarth app to significantly extend GemPy's applicability in practical scenarios, enhancing workflow integration and data visualization capabilities. LiquidEarth, developed by the same main developers as GemPy, is a commercial, cloud-based software solution. It empowers experts to visualize, edit, and communicate geological data and models in intuitive 3D, facilitating real-time collaboration across multiple devices, independent of location.
46+
We have begun integrating GemPy with the [LiquidEarth app](https://www.terranigma-solutions.com/liquid-earth-one) to significantly extend GemPy's applicability in practical scenarios, enhancing workflow integration and data visualization capabilities. LiquidEarth, developed by the same main developers as GemPy, is a commercial, cloud-based software solution. It empowers experts to visualize, edit, and communicate geological data and models in intuitive 3D, facilitating real-time collaboration across multiple devices, independent of location.
4747

4848
This integration aims to leverage LiquidEarth's commercial platform, which utilizes emerging technologies to provide novel environments for working with 3D geoscience data and focuses on ease of use and on offering a low entry barrier. Simultaneously, GemPy will continue to serve as a completely free and open-source tool, offering a flexible, reliable, and transparent solution for 3D geological modeling. Together, this direct integration between GemPy and LiquidEarth is designed to maximize the strengths of both systems: enhancing the visual representation of 3D geoscience projects, connecting them to the broader open-source geoscience ecosystem, and enhancing the utility of GemPy for companies and industry applications.
4949

@@ -55,4 +55,4 @@ GemPy v3 introduces numerous other smaller changes and feature prototypes. These
5555

5656
**In Conclusion**
5757

58-
With the release of v3, we are reinforcing the role of GemPy as a key contributing piece within the larger open-source geoscience ecosystem. This update not only improves core functionalities but also introduces important integrations and enhancements that make it more robust and pave the way for future developments. Dedicated to advancing GemPy as a valuable tool for both academic research and industry applications, our team values your ongoing support and feedback. We invite you to explore the new features and join us in shaping the future of open-source geosciences. Looking forward to the results and innovative applications you achieve with this new version of GemPy!
58+
With the release of v3, we are reinforcing the role of GemPy as a key contributing piece within the larger open-source geoscience ecosystem. This update not only improves core functionalities but also introduces important integrations and enhancements that make it more robust and pave the way for future developments. Dedicated to advancing GemPy as a valuable tool for both academic research and industry applications, our team values your ongoing support and feedback. We invite you to explore the new features and join us in shaping the future of open-source geosciences. Looking forward to the results and innovative applications you achieve with this new version of GemPy!
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Goals
2+
3+
- [ ] 1. Fixing 2024.2.0 for whatever version of python that is not working
4+
5+
6+
## TODO:
7+
8+
- [x] Analyze error:
9+
- [x] Set up environment 3.11
10+
- [x] Fixing the lines of code
11+
- [x] Test the code
12+
- [ ] Release hot fix
13+
14+
## Extra points:
15+
- [ ] Setting up github actions
16+
- [ ] Categories for the tests like I did in subsurface
17+
- [ ] Run tests in python 3.10, 3.11 and 3.12

docs/developers_notes/dev_log/log_2024-06.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66
- [ ] Run something with octrees again
77
- [ ] **We do need settings presets**
88

9+
10+
## Release Notes:
11+
- (Beta) Pivot grids
12+
- Analysis tools:
13+
- Eigenvalues and condition numbers
14+
- Transformed data plots
15+
- Octree refinement evaluation
16+
- Improved octree testing
17+
- LiquidEarth integration
18+
- Chunking for large grids
919

1020
## Notes:
1121
### Optimizing interpolation June 2024

docs/source/api_reference.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,31 @@ GemPy API
1515
compute_model
1616
create_geomodel
1717
map_stack_to_surfaces
18+
structural_elements_from_borehole_set
19+
set_section_grid
20+
set_active_grid
21+
set_topography_from_random
22+
set_topography_from_file
23+
set_topography_from_subsurface_structured_grid
24+
set_topography_from_arrays
25+
set_custom_grid
26+
set_centered_grid
27+
generate_example_model
28+
set_fault_relation
29+
set_is_fault
30+
set_is_finite_fault
31+
add_surface_points
32+
add_orientations
33+
delete_surface_points
34+
delete_orientations
35+
create_orientations_from_surface_points_coords
36+
modify_surface_points
37+
modify_orientations
38+
add_structural_group
39+
remove_structural_group_by_index
40+
remove_structural_group_by_name
41+
remove_element_by_name
42+
calculate_gravity_gradient
1843

1944

2045
Plot
@@ -48,8 +73,12 @@ Modeling Classes
4873
OrientationsTable
4974
InterpolationOptions
5075
Grid
76+
Topography
5177
Solutions
5278
RawArraysSolution
79+
FaultsData
80+
GeophysicsInput
81+
Transform
5382

5483
Helper Classes
5584
--------------
@@ -59,6 +88,8 @@ Helper Classes
5988
:template: class.rst
6089

6190
ImporterHelper
91+
GemPyEngineConfig
92+
ColorsGenerator
6293

6394
Enumerators
6495
-----------
@@ -68,3 +99,6 @@ Enumerators
6899
:template: class.rst
69100

70101
StackRelationType
102+
GlobalAnisotropy
103+
AvailableBackends
104+
FaultsRelationSpecialCase

docs/source/conf.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@
2222
import sys
2323
import warnings
2424

25-
import sphinx_gallery
25+
import pyvista
2626
from sphinx_gallery.sorting import FileNameSortKey
27+
2728
import gempy
28-
import pyvista
29-
import numpy as np
29+
30+
# External examples:
31+
sys.path.insert(0, os.path.abspath('.'))
32+
import make_external_gallery
33+
34+
make_external_gallery.make_example_gallery()
3035

3136
# region PyVista Configuration
3237
pyvista.set_error_output_file('errors.txt')
@@ -61,6 +66,10 @@
6166
'sphinx.ext.githubpages',
6267
'sphinx.ext.napoleon',
6368
'sphinx_gallery.gen_gallery',
69+
"pyvista.ext.plot_directive",
70+
"sphinx_design",
71+
'sphinx_automodapi.automodapi',
72+
'sphinx_automodapi.smart_resolver',
6473
]
6574

6675
if run_intersphinx := False: # Example configuration for intersphinx: refer to the Python standard library.

docs/source/external/_do_not_delete.txt

Whitespace-only changes.

docs/source/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ Contents:
4242
tutorials/index
4343
examples/index
4444

45+
.. toctree::
46+
:maxdepth: 2
47+
:caption: External examples
48+
49+
external/external_examples
50+
4551
.. toctree::
4652
:maxdepth: 2
4753
:caption: API Reference

docs/source/make_external_gallery.py

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
"""
2+
Modified after https://github.com/pyvista/pyvista/blob/ab70c26edbcfb107286c827bd4914562056219fb/docs/make_external_gallery.py
3+
4+
A helper script to generate the external 2-examples gallery.
5+
"""
6+
import os
7+
from io import StringIO
8+
9+
10+
def format_icon(title, description, link, image):
11+
body = r"""
12+
.. grid-item-card:: {}
13+
:link: {}
14+
:text-align: center
15+
:class-title: pyvista-card-title
16+
17+
.. image:: {}
18+
"""
19+
content = body.format(title, link, image)
20+
return content
21+
22+
23+
class Example():
24+
def __init__(self, title, description, link, image):
25+
self.title = title
26+
self.description = description
27+
self.link = link
28+
self.image = image
29+
30+
def format(self):
31+
return format_icon(self.title, self.description, self.link, self.image)
32+
33+
34+
###############################################################################
35+
36+
articles = dict(
37+
_1=Example(
38+
title="Vector Model 1: Construction",
39+
description="Build a basic structural model",
40+
link="https://vector-raw-materials.github.io/vector-geology/examples/02_structural_modeling/01_model_1_gempy_step_by_step.html#sphx-glr-examples-02-structural-modeling-01-model-1-gempy-step-by-step-py",
41+
image="https://vector-raw-materials.github.io/vector-geology/_images/sphx_glr_01_model_1_gempy_step_by_step_001.png",
42+
),
43+
_2=Example(
44+
title="Vector Model 1: Forward Gravity",
45+
description="Get the gravity response of the model",
46+
link="https://vector-raw-materials.github.io/vector-geology/examples/03_forward_engines/02_model_1_gempy_fw_gravity.html#sphx-glr-examples-03-forward-engines-02-model-1-gempy-fw-gravity-py",
47+
image="https://vector-raw-materials.github.io/vector-geology/_images/sphx_glr_02_model_1_gempy_fw_gravity_003.png",
48+
),
49+
_3=Example(
50+
title="Spremberg: Importing Boreholes",
51+
description="Import data from well csv files",
52+
link="https://vector-raw-materials.github.io/vector-geology/examples/02_structural_modeling/03_model_spremberg_import.html#sphx-glr-examples-02-structural-modeling-03-model-spremberg-import-py",
53+
image="https://vector-raw-materials.github.io/vector-geology/_images/sphx_glr_03_model_spremberg_import_003.png",
54+
),
55+
_4=Example(
56+
title="Spremberg: Constructing the Model",
57+
description="Build a structural model from borehole data",
58+
link="https://vector-raw-materials.github.io/vector-geology/examples/02_structural_modeling/04_model_spremberg_building.html#sphx-glr-examples-02-structural-modeling-04-model-spremberg-building-py",
59+
image="https://vector-raw-materials.github.io/vector-geology/_images/sphx_glr_04_model_spremberg_building_008.png",
60+
),
61+
)
62+
63+
64+
###############################################################################
65+
66+
def make_example_gallery():
67+
"""Make the example gallery."""
68+
path = "./external/external_examples.rst"
69+
70+
with StringIO() as new_fid:
71+
new_fid.write(
72+
"""
73+
.. _external_examples:
74+
75+
External Examples
76+
==================
77+
78+
Vector Examples
79+
---------------
80+
These are examples from the Vector project.
81+
82+
.. grid:: 3
83+
:gutter: 1
84+
85+
"""
86+
)
87+
# Reverse to put the latest items at the top
88+
for example in list(articles.values())[::-1]:
89+
new_fid.write(example.format())
90+
91+
new_fid.write(
92+
"""
93+
94+
.. raw:: html
95+
96+
<div class="sphx-glr-clear"></div>
97+
98+
99+
"""
100+
)
101+
new_fid.seek(0)
102+
new_text = new_fid.read()
103+
104+
# check if it's necessary to overwrite the table
105+
existing = ""
106+
if os.path.exists(path):
107+
with open(path) as existing_fid:
108+
existing = existing_fid.read()
109+
110+
# write if different or does not exist
111+
if new_text != existing:
112+
with open(path, "w", encoding="utf-8") as fid:
113+
fid.write(new_text)
114+
115+
return

0 commit comments

Comments
 (0)