gempy-project / gempy

GemPy is an open-source, Python-based 3-D structural geological modeling software, which allows the implicit (i.e. automatic) creation of complex geological models from interface and orientation data. It also offers support for stochastic modeling to address parameter and model uncertainties.
https://gempy.org
European Union Public License 1.2
989 stars 236 forks source link

[BUG] Failing unittest on main #764

Closed ckoerber closed 7 months ago

ckoerber commented 1 year ago

Describe the bug

While setting up GemPy from the most recent commit on main (10d6fff2c01990d88de40851cd4fdb00eb682a5a), I encountered five failing unittests.

=========================== short test summary info ============================
FAILED test/test_core/test_xsol.py::test_set_meshes - AttributeError: 'PolyDa...
FAILED test/test_core/test_grids/test_topography.py::test_real_grid_ales - At...
FAILED test/test_core/test_grids/test_topography.py::test_plot_2d_topography
FAILED test/test_core/test_grids/test_topography.py::test_plot_3d_structure_topo2
FAILED test/test_plotting/test_2d.py::test_plot_2d_test_labels - AttributeErr...
===== 5 failed, 150 passed, 9 skipped =====

In particluar, it seems that the the issues are caused by

# test/test_core/test_xsol.py:181
subsurface.visualization.to_pyvista_mesh(ts)

and

# test/test_core/test_grids/test_topography.py:53
p2d = gp.plot_2d(geo_model, section_names=['topography'], show_topography=True,
                         kwargs_topography={'hillshade': False, 'fill_contour': True})

The other issues are as well related to gp.plot_2d.

To Reproduce Provide detailed steps to reproduce the behavior:

  1. Cloning the repo on the most recent commit
  2. Installing the dev dependencies via pip
  3. Installing gdal==3.4.1 via pip
  4. Running pytest

Attachments

The full pytest log (non-verbose) and pip freeze file are attached below:

pytest.log pip-freeze.txt

Desktop (please complete the following information):

Additional context Tests were executed in an xorg xrdp session.

Please let me know if you need more information.

AlexanderJuestel commented 1 year ago

@ckoerber Thanks for pointing that out. We will try to fix the issues/errors for the upcoming GemPy 2.3 release!