Skip to content

[WIP] Current GemPy Patches #640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 53 commits into from
Nov 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
244eaa9
'RaiseValueErrorCoordinates'
AlexanderJuestel Mar 30, 2021
269f16e
Updated README.md with link to Nilgün paper
flohorovicic Mar 31, 2021
e22acc9
Update optional-requirements.txt
Leguark Mar 31, 2021
4a1030f
basics minor edits
RichardScottOZ Apr 16, 2021
944e084
privileges
RichardScottOZ Apr 16, 2021
1c88785
Update visualization_3d.py
RichardScottOZ Apr 17, 2021
f08d978
Update data.py
RichardScottOZ Apr 17, 2021
8886b6f
Fix broken PyVista import
banesullivan Jun 8, 2021
49efb1f
Update _vista.py
banesullivan Jun 8, 2021
a983f89
Add pyqt5 for QtPy
banesullivan Jun 9, 2021
7fd0204
Merge pull request #595 from cgre-aachen/dev_aj4
AlexanderJuestel Sep 16, 2021
8e7b09a
Merge pull request #611 from banesullivan/patch-1
AlexanderJuestel Sep 16, 2021
c17de28
Merge pull request #600 from RichardScottOZ/master
AlexanderJuestel Sep 16, 2021
98dc1ed
Merge pull request #596 from cgre-aachen/flohorovicic-readme_patch
AlexanderJuestel Sep 16, 2021
f400a3f
Update data.py
RichardScottOZ Sep 16, 2021
0bb35a9
Merge pull request #602 from RichardScottOZ/patch-1
AlexanderJuestel Sep 16, 2021
9355497
'AddTestingandEnvironment'
AlexanderJuestel Sep 23, 2021
1474ac5
'Workflows'
AlexanderJuestel Oct 7, 2021
09d5cf2
'Workflows'
AlexanderJuestel Oct 7, 2021
044dd76
'Workflows'
AlexanderJuestel Oct 7, 2021
90c0b44
'Workflows'
AlexanderJuestel Oct 7, 2021
b7426cd
'Env_file'
AlexanderJuestel Oct 7, 2021
814483d
'Workflows'
AlexanderJuestel Oct 7, 2021
753ec68
'Workflows'
AlexanderJuestel Oct 8, 2021
e1d1374
'Changeenvfile'
AlexanderJuestel Oct 8, 2021
5bfdd83
'Addpyqt5'
AlexanderJuestel Oct 8, 2021
b71dcad
'Workflows'
AlexanderJuestel Oct 8, 2021
5958fed
'Workflows'
AlexanderJuestel Oct 8, 2021
ac0c2e0
Fix export to vtk
mkondratyev85 Oct 28, 2021
2378578
Merge pull request #649 from mkondratyev85/mkondratyev85_issue641
AlexanderJuestel Oct 29, 2021
89a8d5f
'Fix_Scalar_Bar'
AlexanderJuestel Oct 29, 2021
03c37db
Merge pull request #597 from cgre-aachen/Leguark-patch-1
AlexanderJuestel Oct 29, 2021
30006f0
'Add_geopandas_dep'
AlexanderJuestel Oct 29, 2021
3550e4b
'Add_COC'
AlexanderJuestel Oct 29, 2021
708ce96
- [DOC] Updated a data hash
Leguark Nov 11, 2021
e310022
- [BUG] 2D plotting was having a shape mismatch
Leguark Nov 11, 2021
f8ca4ba
Merge branch 'nov-2021-hotfixes' of https://github.com/cgre-aachen/ge…
Leguark Nov 11, 2021
6c8557c
- [ENH] Update dependencies
Leguark Nov 12, 2021
1b33752
- [BUG] Travis installing pooch
Leguark Nov 14, 2021
981a868
- [CI] Tweaking github actions
Leguark Nov 16, 2021
d083767
- [BUG] wrong name of dev-requirements
Leguark Nov 17, 2021
035d998
- [BUG] wrong name of dev-requirements
Leguark Nov 17, 2021
f240734
- [BUG] fixing actions
Leguark Nov 17, 2021
8f71c7f
- [BUG] fixing actions
Leguark Nov 18, 2021
0bcbb57
- [BUG] fixing actions
Leguark Nov 18, 2021
9520421
- [BUG] fixing actions
Leguark Nov 18, 2021
08cb723
- [BUG] fixing actions
Leguark Nov 18, 2021
9201713
- [BUG] fixing actions
Leguark Nov 18, 2021
e82af62
- [BUG] fixing actions
Leguark Nov 19, 2021
d7d46a8
- [BUG] fixing actions
Leguark Nov 19, 2021
a478cc2
- [BUG] fixing actions
Leguark Nov 19, 2021
73ae624
- [META] Update gempy version
Leguark Nov 21, 2021
7c03166
- [BUG] Fixing install libgl1-mesa-glx xvfb
Leguark Nov 22, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: GemPy CI Conda Requirements

on:
push:
branches: [ dev_alexj, master, main, release, fixing_actions ]

pull_request:
branches: [ dev_alexj, master, main, release ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
testing_conda:
name: Conda install ${{ matrix.case.os }} py${{ matrix.case.python-version }} ${{ matrix.case.name }}
runs-on: ${{ matrix.case.os }}-latest
defaults:
run:
shell: bash -l {0}

strategy:
fail-fast: false
matrix:
os: [ ubuntu, ] # macos, windows] # Only Linux currently.
case:
- python-version: 3.8
name: basic
os: ubuntu

env:
DISPLAY: ':99.0'
PYVISTA_OFF_SCREEN: 'True'
ALLOW_PLOTTING: true
SHELLOPTS: 'errexit:pipefail'
OS: ${{ matrix.case.os }}
PYTHON: ${{ matrix.case.python-version }}
GITHUBACTION: "true"

steps:
# Cancel any previous run of the test job; [pin v0.8.0 (2021-02-13)]
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v2
- name: Setup Headless Display
run: |
sudo apt-get update && sudo apt-get install libgl1-mesa-glx xvfb -y
sudo apt-get install -y xvfb
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3

- name: Install dependencies
run: |
conda list gempy
conda list gdal
conda list pyvista
conda list vtk
conda list pandas
conda list numpy
conda install gdal
python -m pip install --upgrade pip
pip install -r dev-requirements.txt

- name: Run tests with pytest
run: |
pytest

testing_pip:
name: Pip install ${{ matrix.case.os }} py${{ matrix.case.python-version }} ${{ matrix.case.name }}
runs-on: ${{ matrix.case.os }}-latest
defaults:
run:
shell: bash -l {0}

strategy:
fail-fast: false
matrix:
os: [ ubuntu, ] # macos, windows] # Only Linux currently.
case:
- python-version: 3.8
name: basic
os: ubuntu

env:
DISPLAY: ':99.0'
PYVISTA_OFF_SCREEN: 'True'
ALLOW_PLOTTING: true
SHELLOPTS: 'errexit:pipefail'
OS: ${{ matrix.case.os }}
PYTHON: ${{ matrix.case.python-version }}
GITHUBACTION: "true"
steps:
# Cancel any previous run of the test job; [pin v0.8.0 (2021-02-13)]
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v2
- name: Setup Headless Display
run: |
sudo apt-get update && sudo apt-get install libgl1-mesa-glx xvfb -y
sudo apt-get install -y xvfb
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
sleep 3

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt

- name: Run tests with pytest
run: |
pytest
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ install:
- conda install theano

# Installs from pip
- pip install welly pymc3 pooch
- pip install welly pymc3

- pip install scikit-image>=0.17 sklearn

Expand All @@ -62,6 +62,8 @@ install:

- python -c "import pyvista as pv;print(pv.Report())"

- pip install pooch

stages:
- test

Expand Down
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at florian.wellmann@cgre.rwth-aachen.de. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ Follow these [guidelines](https://github.com/cgre-aachen/gempy/blob/WIP_readme-u

## Publications using GemPy

* Güdük, N., de la Varga, M. Kaukolinna, J. and Wellmann, F. (in review). Model-Based Probabilistic Inversion Using Magnetic Data: A Case Study on the Kevitsa Deposit.
* Schaaf, A., de la Varga, M., Wellmann, F., & Bond, C. E. (2020). [Constraining stochastic 3-D structural geological models with topology information using Approximate Bayesian Computation using GemPy 2.1](https://gmd.copernicus.org/preprints/gmd-2020-136/gmd-2020-136.pdf). Geoscientific Model Development Discussions, 1-24.
* Stamm, F. A., de la Varga, M., and Wellmann, F. (2019). [Actors, actions, and uncertainties: optimizing decision-making based on 3-D structural geological models](https://se.copernicus.org/articles/10/2015/2019/se-10-2015-2019.html), Solid Earth, 10, 2015–2043.
* Güdük, N.; de la Varga, M.; Kaukolinna, J.; Wellmann, F. (2021). [Model-Based Probabilistic Inversion Using Magnetic Data: A Case Study on the Kevitsa Deposit](https://doi.org/10.3390/geosciences11040150). Geosciences, 11, 150. https://doi.org/10.3390/geosciences11040150 (open access).
* Schaaf, A., de la Varga, M., Wellmann, F., & Bond, C. E. (2020). [Constraining stochastic 3-D structural geological models with topology information using Approximate Bayesian Computation using GemPy 2.1](https://gmd.copernicus.org/preprints/gmd-2020-136/gmd-2020-136.pdf). Geoscientific Model Development Discussions, 1-24 (open access).
* Stamm, F. A., de la Varga, M., and Wellmann, F. (2019). [Actors, actions, and uncertainties: optimizing decision-making based on 3-D structural geological models](https://se.copernicus.org/articles/10/2015/2019/se-10-2015-2019.html), Solid Earth, 10, 2015–2043 (open access).
* Wellmann, F., Schaaf, A., de la Varga, M., & von Hagke, C. (2019). [From Google Earth to 3D Geology Problem 2: Seeing Below the Surface of the Digital Earth](
https://www.sciencedirect.com/science/article/pii/B9780128140482000156).
In Developments in Structural Geology and Tectonics (Vol. 5, pp. 189-204). Elsevier.
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-r optional-requirements.txt

# This are additional libraries necessary to run sphinx and all the test
sphinx
sphinx==3.5.4
sphinx_gallery
emg3d==0.11.0
ipywidgets
Expand Down
2 changes: 1 addition & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Here, we provide advice that should use in most cases (but certainly not all):

``$ conda install theano``

If the installation fails at some point try to re-install anaconda for a single user (no administrator priveleges)
If the installation fails at some point try to re-install anaconda for a single user (no administrator privileges)
and with the Path Environment set.
To use Theano with ``numpy version 1.16.0`` or following, it has to be updated to ``Theano 1.0.4`` using

Expand Down
7 changes: 7 additions & 0 deletions environment_conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: gempy
channels:
- conda-forge
dependencies:
- subsurface
- geopandas
- gempy
10 changes: 10 additions & 0 deletions environment_pip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: gempy
channels:
- conda-forge
dependencies:
- subsurface
- geopandas
- pip
- pip:
- gempy
- pyqt5
5 changes: 3 additions & 2 deletions examples/integrations/gempy_subsurface.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
import subsurface as sb
from subsurface.reader import read_netcdf

data_url = "https://raw.githubusercontent.com/softwareunderground/subsurface/t21-main/examples/tutorials/wells_unstructured.nc"
data_url = "https://raw.githubusercontent.com/softwareunderground/subsurface/main" \
"/examples/tutorials/wells_unstructured.nc"

data_hash = '05198041f2bffcc03d138f7f2b1802657228725c4a895d819d4f5fbc0e9978ca'
data_hash = "206290db4e563e379361725349ebf4a02628f4700d361599aedff37fab9cf5b9"
borehole_unstructured_data_file = pooch.retrieve(url=data_url,
known_hash=data_hash)

Expand Down
18 changes: 9 additions & 9 deletions examples/tutorials/ch1_fundamentals/ch1_1_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# - Additional data
# - Faults
#
# We will see each of this class in further detail in the future.
# We will see each of these classes in further detail in the future.
#
# Most of data can also be generated from raw data that comes in the form
# of CSV-files (CSV = comma-separated values). Such files might be
Expand All @@ -42,13 +42,13 @@
# Microsoft Excel or LibreOffice Calc.
#
# In this tutorial, all input data is created by importing such CSV-files.
# These exemplary files can be found in the ``input_data`` folder in the
# These example files can be found in the ``input_data`` folder in the
# root folder of GemPy. The data comprises :math:`x`-, :math:`y`- and
# :math:`z`-positional values for all surface points and orientation
# measurements. For the latter, poles, azimuth and polarity are
# additionally included. Surface points are furthermore assigned a
# formation. This might be a lithological unit such as "Sandstone" or a
# structural feature such as "Main Fault". It is decisive to remember
# structural feature such as "Main Fault". It is important to remember
# that, in GemPy, interface position points mark the **bottom** of a
# layer. If such points are needed to resemble a top of a formation (e.g.
# when modeling an intrusion), this can be achieved by defining a
Expand Down Expand Up @@ -119,13 +119,13 @@
#
# You can assign several surfaces to one series. The order of the units
# within such as series is only relevant for the color code, thus we
# recommend to be consistent. You can define this order via another
# recommend being consistent. You can define this order via another
# attribute "``order_formations``/ " or by using the specific command
# ``set_order_formations``. (If the order of the pile differs from the
# final result the color of the interfaces and input data will be
# different.)
#
# Every fault is treated as an independent series and have to be at set at
# Every fault is treated as an independent series and has to be at set at
# the **top of the pile**. The relative order between the distinct faults
# defines the tectonic relation between them (first entry is the
# youngest).
Expand Down Expand Up @@ -189,7 +189,7 @@
# Our model input data, here named "*geo\_model*", contains all the
# information that is essential for the construction of our model. You can
# access different types of information by using ``gp.get_data`` or simply
# by accessiong the atrribues.
# by accessiong the atrributes.
#
# We can, for example, return the coordinates of our modeling grid via:
#
Expand Down Expand Up @@ -283,15 +283,15 @@

# %%
# This function rescales the extent and coordinates of the original data
# (and store it in the attribute ``geo_data_res`` which behaves as a usual
# (and stores it in the attribute ``geo_data_res`` which behaves as a usual
# ``InputData`` object) and adds mathematical parameters that are needed
# for conducting the interpolation. The computation of this step may take
# a while, as it also compiles a theano function which is required for the
# model computation. However, should this not be needed, we can skip it by
# declaring ``compile_theano = False`` in the function.
#
# Furthermore, this preparation process includes an assignment of numbers
# to each formation. Note that GemPy's always creates a default basement
# to each formation. Note that GemPy always creates a default basement
# formation as the last formation number. Afterwards, numbers are
# allocated from youngest to oldest as defined by the sequence of series
# and formations. On the property ``formations`` on our interpolation
Expand All @@ -315,7 +315,7 @@
# ``compute_model``. By default, this will return two separate solutions
# in the form of arrays. The first gives information on the lithological
# formations, the second on the fault network in the model. These arrays
# consist of two subarrays as entries each:
# consist of two subarrays as entries described here:
#
# 1. Lithology block model solution:
#
Expand Down
2 changes: 1 addition & 1 deletion gempy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from gempy.plot import _plot as _plot

assert sys.version_info[0] >= 3, "GemPy requires Python 3.X" # sys.version_info[1] for minor e.g. 6
__version__ = '2.2.8'
__version__ = '2.2.10'

if __name__ == '__main__':
pass
Loading