Skip to content

refactor: create geos-pv package #71

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 26 commits into from
Apr 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
14d1132
Create geos-pv package with geosLogReader
mlemayTTE Mar 26, 2025
a5a9819
Move PV tools and delete PVPythonViewConfigurator
Mar 26, 2025
79612ce
Merge branch 'main' into lemay/feature/geospv_package
mlemayTTE Apr 2, 2025
c556362
set local dependency path management
mlemayTTE Apr 2, 2025
341613c
update doc
mlemayTTE Apr 3, 2025
8b417e3
fix doc
mlemayTTE Apr 3, 2025
078808e
update project config
mlemayTTE Apr 3, 2025
18123f0
Manage PV plugins dependency
mlemayTTE Apr 3, 2025
9ee93a6
typing and linting fix
mlemayTTE Apr 3, 2025
1c100a8
Merge branch 'main' into lemay/feature/geospv_package
mlemayTTE Apr 4, 2025
d5b608c
Merge branch 'main' into lemay/feature/geospv_package
mlemayTTE Apr 7, 2025
0e542e1
add .vscode to .gitignore
mlemayTTE Apr 7, 2025
e39555f
linting and formatting
mlemayTTE Apr 7, 2025
a4f97e1
bug fix and settup geos-pv tests
mlemayTTE Apr 7, 2025
32463d2
fix doc issues
mlemayTTE Apr 7, 2025
7d5fe5d
fix ci geos-geomecanics and linting
mlemayTTE Apr 7, 2025
a891a83
Merge branch 'main' into lemay/feature/geospv_package
mlemayTTE Apr 8, 2025
5eec486
update geos-pv doc
mlemayTTE Apr 9, 2025
b6f9116
Merge branch 'main' into lemay/feature/geospv_package
alexbenedicto Apr 10, 2025
99686dd
Add contribution explanations for geos-pv
mlemayTTE Apr 11, 2025
ec09cf9
Merge branch 'main' into lemay/feature/geospv_package
mlemayTTE Apr 14, 2025
1759dc5
Fix doc ci
mlemayTTE Apr 14, 2025
2c39455
Update pyproject and requirements
alexbenedicto Apr 15, 2025
625b45d
Revert "Update pyproject and requirements"
mlemayTTE Apr 15, 2025
33e78e0
Harmonize dependency versions
mlemayTTE Apr 15, 2025
b8f499f
Update installation instructions
mlemayTTE Apr 15, 2025
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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,7 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
#.idea/

# VSCode
.vscode
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ Installation
python -m pytest ./<PACKAGE_NAME>
```

**NOTE: geos-pv package cannot be build alone, but together with Paraview ([see Paraview compilation guide](https://gitlab.kitware.com/paraview/paraview/-/blob/master/Documentation/dev/build.md)). It is recommended to use Paraview v5.12+, which is based on python 3.10+. Alternatively, plugins from geos-pv/PVplugins can be manually loaded into Paraview ([see documentation](https://docs.paraview.org/en/latest/ReferenceManual/pythonProgrammableFilter.html#python-algorithm)).**
[!WARNING]
Due to local package conflicts with `pip install`, it is recommended either to build the packages one by one, or to inlude only top-level packages (see dependency tree hereabove) in the build list.

[!NOTE]
geos-pv package cannot be build alone, but together with Paraview ([see Paraview compilation guide](https://gitlab.kitware.com/paraview/paraview/-/blob/master/Documentation/dev/build.md)). It is recommended to use Paraview v5.12+, which is based on python 3.10+. Alternatively, plugins from geos-pv/PVplugins can be manually loaded into Paraview ([see documentation](https://docs.paraview.org/en/latest/ReferenceManual/pythonProgrammableFilter.html#python-algorithm)).


Contributions
Expand All @@ -141,8 +145,8 @@ If you would like to report a bug, please submit an [issue](https://github.com/G
If you would like to contribute to GEOS Python packages, please respect the following guidelines:

1. Create a new branch named from this template: `[CONTRIBUTOR]/[TYPE]/[TITLE]` where CONTRIBUTOR is the name of the contributor, TYPE is the type of contribution among 'feature', 'refactor', 'doc', 'ci', TITLE is a short title for the branch.
1. Add your code trying to integrate into the current code architecture.
1. Push the branch, open a new PR, and add reviewers
2. Add your code trying to integrate into the current code architecture.
3. Push the branch, open a new PR respecting naming [semantics](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716), and add reviewers

If you do not have the rights to push the code and open new PRs, consider opening a new issue to explain what you want to do and ask for the dev rights.

Expand Down Expand Up @@ -170,6 +174,9 @@ dependencies = [
]
```

[!IMPORTANT]
geos-pv dependencies are managed using a requirements.txt (together with the setup.py) file where all internal (and external if needed) dependencies are present. It ensures that internal dependency paths are correctly set when plugins are manually loaded into Paraview.

Release
-------

Expand Down
5 changes: 3 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

# Add python modules to be documented
python_root = '..'
python_modules = ( 'geos-ats', 'geos-geomechanics', 'geos-mesh', 'geos-posp', 'geos-timehistory', 'geos-utils', 'geos-xml-tools', 'geos-xml-viewer', 'hdf5-wrapper', 'pygeos-tools' )
python_modules = ( 'geos-ats', 'geos-geomechanics', 'geos-mesh', 'geos-posp', 'geos-pv', 'geos-timehistory', 'geos-utils', 'geos-xml-tools', 'geos-xml-viewer', 'hdf5-wrapper', 'pygeos-tools' )


for m in python_modules:
sys.path.insert( 0, os.path.abspath( os.path.join( python_root, m, 'src' ) ) )
Expand Down Expand Up @@ -48,7 +49,7 @@
]

autoclass_content = 'both'
autodoc_mock_imports = [ "ats", "colorcet", "h5py", "lxml", "meshio", "mpi4py", "scipy", "paraview", "pygeosx", "pylvarray", "vtk", "xmlschema", "xsdata" ]
autodoc_mock_imports = [ "ats", "colorcet", "h5py", "lxml", "matplotlib", "meshio", "mpi4py", "scipy", "pandas", "paraview", "pygeosx", "pylvarray", "vtk", "xmlschema", "xsdata", ]
autodoc_typehints = 'none'
autodoc_typehints_format = 'short'
suppress_warnings = [ "autodoc.mocked_object" ]
Expand Down
12 changes: 12 additions & 0 deletions docs/geos-pv.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
GEOS Paraview plugins
=====================

.. toctree::
:maxdepth: 5
:caption: Contents:

./geos_pv_docs/home.rst

./geos_pv_docs/modules.rst

./geos_pv_docs/readers.rst
18 changes: 2 additions & 16 deletions docs/geos_posp_docs/PVplugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,7 @@ PVGeomechanicsWorkflowVolumeWell plugin

.. automodule:: PVplugins.PVGeomechanicsWorkflowVolumeWell


PVGeosLogReader plugin
--------------------------------

.. automodule:: PVplugins.PVGeosLogReader


PVMergeBlocksEnhanced plugin
PVplugins.PVMergeBlocksEnhanced module
--------------------------------------

.. automodule:: PVplugins.PVMergeBlocksEnhanced
Expand All @@ -93,14 +86,7 @@ PVMohrCirclePlot plugin

.. automodule:: PVplugins.PVMohrCirclePlot


PVPythonViewConfigurator plugin
-----------------------------------------

.. automodule:: PVplugins.PVPythonViewConfigurator


PVSurfaceGeomechanics plugin
PVplugins.PVSurfaceGeomechanics module
--------------------------------------

.. automodule:: PVplugins.PVSurfaceGeomechanics
Expand Down
2 changes: 0 additions & 2 deletions docs/geos_posp_docs/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ Processing

filters

readers

processing

pyvistaTools
8 changes: 0 additions & 8 deletions docs/geos_posp_docs/processing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,6 @@ Processing functions

This package define functions to process data.

geos_posp.processing.geosLogReaderFunctions module
------------------------------------------------------

.. automodule:: geos_posp.processing.geosLogReaderFunctions
:members:
:undoc-members:
:show-inheritance:

geos_posp.processing.multiblockInpectorTreeFunctions module
---------------------------------------------------------------

Expand Down
36 changes: 0 additions & 36 deletions docs/geos_posp_docs/readers.rst

This file was deleted.

23 changes: 0 additions & 23 deletions docs/geos_posp_docs/visu.pythonViewUtils.rst

This file was deleted.

4 changes: 1 addition & 3 deletions docs/geos_posp_docs/visu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ This package includes visualization tools dedicated to Paraview software.

visu.PVUtils

visu.mohrCircles

visu.pythonViewUtils
visu.mohrCircles
45 changes: 45 additions & 0 deletions docs/geos_pv_docs/geosLogReaderUtils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
GeosLogReaderUtils functions
============================

This package define functions dedicated to the GeosLogReader.


geos.pv.geosLogReaderUtils.GeosLogReaderAquifers module
-------------------------------------------------------------------

.. automodule:: geos.pv.geosLogReaderUtils.GeosLogReaderAquifers
:members:
:undoc-members:
:show-inheritance:

geos.pv.geosLogReaderUtils.geosLogReaderConvergence module
---------------------------------------------------------------------

.. automodule:: geos.pv.geosLogReaderUtils.GeosLogReaderConvergence
:members:
:undoc-members:
:show-inheritance:

geos.pv.geosLogReaderUtils.GeosLogReaderFlow module
---------------------------------------------------------------

.. automodule:: geos.pv.geosLogReaderUtils.GeosLogReaderFlow
:members:
:undoc-members:
:show-inheritance:

geos.pv.geosLogReaderUtils.GeosLogReaderFunctions module
--------------------------------------------------------------------

.. automodule:: geos.pv.geosLogReaderUtils.geosLogReaderFunctions
:members:
:undoc-members:
:show-inheritance:

geos.pv.geosLogReaderUtils.GeosLogReaderWells module
--------------------------------------------------------------------

.. automodule:: geos.pv.geosLogReaderUtils.GeosLogReaderWells
:members:
:undoc-members:
:show-inheritance:
18 changes: 18 additions & 0 deletions docs/geos_pv_docs/home.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Home
====

**geos-pv** is a Python package that gathers `Paraview <https://www.paraview.org/>`_ plugins of GEOS python tools.

It includes:

* Paraview readers allowing to load data;
* generic tools to processes meshes;
* GEOS pre-processing tools to clean and check GEOS input mesh;
* GEOS post-processing tools to clean GEOS output mesh, compute additional properties, or create specific plots such as Mohr's circle plot.

The packages can be loaded into Paraview using the Plugin Manager from `Tools > Plugin Manager`. On success, you will
see the selected plugin in the `Filters`` menu (see `Paraview documentation <https://docs.paraview.org/en/latest/ReferenceManual/pythonProgrammableFilter.html>`.

Alternatively, geos-pv package can be build together with Paraview ([see Paraview compilation guide](https://gitlab.kitware.com/paraview/paraview/-/blob/master/Documentation/dev/build.md)).
It is recommended to use Paraview v5.12+, which is based on python 3.10+. If you need to build geos-pv package with the paraview dependency, use the command:
`pip install Path/To/geosPythonPackages/geos-pv[paraview]`
11 changes: 11 additions & 0 deletions docs/geos_pv_docs/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Processing
==========

.. toctree::
:maxdepth: 5

geosLogReaderUtils

pyplotUtils

utils
13 changes: 13 additions & 0 deletions docs/geos_pv_docs/pyplotUtils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pyplotUtils functions
=====================

This package define options for matplotlib.


geos.pv.pyplotUtils.matplotlibOptions module
---------------------------------------------

.. automodule:: geos.pv.pyplotUtils.matplotlibOptions
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/geos_pv_docs/readers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Paraview readers
================

readers.PVGeosLogReader module
----------------------------------

.. automodule:: readers.PVGeosLogReader
29 changes: 29 additions & 0 deletions docs/geos_pv_docs/utils.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Utilities
=========

This package defines utilities for Paraview plugins.


geos.pv.utils.checkboxFunction module
---------------------------------------------

.. automodule:: geos.pv.utils.checkboxFunction
:members:
:undoc-members:
:show-inheritance:

geos.pv.utils.DisplayOrganizationParaview module
-------------------------------------------------

.. automodule:: geos.pv.utils.DisplayOrganizationParaview
:members:
:undoc-members:
:show-inheritance:

geos.pv.utils.paraviewTreatments module
---------------------------------------------

.. automodule:: geos.pv.utils.paraviewTreatments
:members:
:undoc-members:
:show-inheritance:
6 changes: 4 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,13 @@ Packages

geos-ats

geos-geomechanics

geos-mesh

geos-posp

geos-geomechanics
geos-pv

geos-timehistory

Expand Down
30 changes: 15 additions & 15 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
sphinx >= 7.4.7
sphinx_rtd_theme
sphinx-argparse >= 0.5.2
sphinx-autodoc-typehints
sphinx-design
sphinx >= 8.2
sphinx_rtd_theme >= 3.0
sphinx-argparse >= 0.5
sphinx-autodoc-typehints >= 3.1
sphinx-design >= 0.6
# Running CLI programs and capture outputs
sphinxcontrib-programoutput>=0.17
sphinxcontrib-programoutput >= 0.17
# Installing all package requirements to be able to load all the modules and run the help.
vtk >= 9.1
vtk >= 9.3
networkx >= 2.4
tqdm
numpy
pandas
typing_extensions
tqdm >= 4.67
numpy >= 2.2
pandas >= 2.2
typing_extensions > 4.12
matplotlib>=3.9.4
h5py
lxml>=4.5.0
parameterized
pyvista
h5py >= 3.12
lxml >= 4.5.0
parameterized >= 0.9
pyvista >= 0.44
Loading