Skip to content

Commit de62e29

Browse files
mlemayTTEMartin LEMAYalexbenedicto
authored
refactor: create geos-pv package (#71)
* Create geos-pv package with geosLogReader * Move PV tools and delete PVPythonViewConfigurator * set local dependency path management * update doc * fix doc * update project config * Manage PV plugins dependency * typing and linting fix * add .vscode to .gitignore * linting and formatting * bug fix and settup geos-pv tests * fix doc issues * fix ci geos-geomecanics and linting * update geos-pv doc * Add contribution explanations for geos-pv * Fix doc ci * Update pyproject and requirements * Revert "Update pyproject and requirements" This reverts commit 2c39455. * Harmonize dependency versions * Update installation instructions --------- Co-authored-by: Martin LEMAY <[email protected]> Co-authored-by: alexbenedicto <[email protected]>
1 parent 069e113 commit de62e29

File tree

82 files changed

+1293
-2826
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1293
-2826
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,7 @@ cython_debug/
162162
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
163163
# and can be added to the global gitignore or merged into this file. For a more nuclear
164164
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
165-
#.idea/
165+
#.idea/
166+
167+
# VSCode
168+
.vscode

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ Installation
128128
python -m pytest ./<PACKAGE_NAME>
129129
```
130130
131-
**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)).**
131+
[!WARNING]
132+
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.
133+
134+
[!NOTE]
135+
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)).
132136
133137
134138
Contributions
@@ -141,8 +145,8 @@ If you would like to report a bug, please submit an [issue](https://github.com/G
141145
If you would like to contribute to GEOS Python packages, please respect the following guidelines:
142146
143147
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.
144-
1. Add your code trying to integrate into the current code architecture.
145-
1. Push the branch, open a new PR, and add reviewers
148+
2. Add your code trying to integrate into the current code architecture.
149+
3. Push the branch, open a new PR respecting naming [semantics](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716), and add reviewers
146150
147151
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.
148152
@@ -170,6 +174,9 @@ dependencies = [
170174
]
171175
```
172176
177+
[!IMPORTANT]
178+
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.
179+
173180
Release
174181
-------
175182

docs/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717

1818
# Add python modules to be documented
1919
python_root = '..'
20-
python_modules = ( 'geos-ats', 'geos-geomechanics', 'geos-mesh', 'geos-posp', 'geos-timehistory', 'geos-utils', 'geos-xml-tools', 'geos-xml-viewer', 'hdf5-wrapper', 'pygeos-tools' )
20+
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' )
21+
2122

2223
for m in python_modules:
2324
sys.path.insert( 0, os.path.abspath( os.path.join( python_root, m, 'src' ) ) )
@@ -48,7 +49,7 @@
4849
]
4950

5051
autoclass_content = 'both'
51-
autodoc_mock_imports = [ "ats", "colorcet", "h5py", "lxml", "meshio", "mpi4py", "scipy", "paraview", "pygeosx", "pylvarray", "vtk", "xmlschema", "xsdata" ]
52+
autodoc_mock_imports = [ "ats", "colorcet", "h5py", "lxml", "matplotlib", "meshio", "mpi4py", "scipy", "pandas", "paraview", "pygeosx", "pylvarray", "vtk", "xmlschema", "xsdata", ]
5253
autodoc_typehints = 'none'
5354
autodoc_typehints_format = 'short'
5455
suppress_warnings = [ "autodoc.mocked_object" ]

docs/geos-pv.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
GEOS Paraview plugins
2+
=====================
3+
4+
.. toctree::
5+
:maxdepth: 5
6+
:caption: Contents:
7+
8+
./geos_pv_docs/home.rst
9+
10+
./geos_pv_docs/modules.rst
11+
12+
./geos_pv_docs/readers.rst

docs/geos_posp_docs/PVplugins.rst

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,7 @@ PVGeomechanicsWorkflowVolumeWell plugin
7575

7676
.. automodule:: PVplugins.PVGeomechanicsWorkflowVolumeWell
7777

78-
79-
PVGeosLogReader plugin
80-
--------------------------------
81-
82-
.. automodule:: PVplugins.PVGeosLogReader
83-
84-
85-
PVMergeBlocksEnhanced plugin
78+
PVplugins.PVMergeBlocksEnhanced module
8679
--------------------------------------
8780

8881
.. automodule:: PVplugins.PVMergeBlocksEnhanced
@@ -93,14 +86,7 @@ PVMohrCirclePlot plugin
9386

9487
.. automodule:: PVplugins.PVMohrCirclePlot
9588

96-
97-
PVPythonViewConfigurator plugin
98-
-----------------------------------------
99-
100-
.. automodule:: PVplugins.PVPythonViewConfigurator
101-
102-
103-
PVSurfaceGeomechanics plugin
89+
PVplugins.PVSurfaceGeomechanics module
10490
--------------------------------------
10591

10692
.. automodule:: PVplugins.PVSurfaceGeomechanics

docs/geos_posp_docs/modules.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ Processing
66

77
filters
88

9-
readers
10-
119
processing
1210

1311
pyvistaTools

docs/geos_posp_docs/processing.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@ Processing functions
33

44
This package define functions to process data.
55

6-
geos_posp.processing.geosLogReaderFunctions module
7-
------------------------------------------------------
8-
9-
.. automodule:: geos_posp.processing.geosLogReaderFunctions
10-
:members:
11-
:undoc-members:
12-
:show-inheritance:
13-
146
geos_posp.processing.multiblockInpectorTreeFunctions module
157
---------------------------------------------------------------
168

docs/geos_posp_docs/readers.rst

Lines changed: 0 additions & 36 deletions
This file was deleted.

docs/geos_posp_docs/visu.pythonViewUtils.rst

Lines changed: 0 additions & 23 deletions
This file was deleted.

docs/geos_posp_docs/visu.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,4 @@ This package includes visualization tools dedicated to Paraview software.
99

1010
visu.PVUtils
1111

12-
visu.mohrCircles
13-
14-
visu.pythonViewUtils
12+
visu.mohrCircles

0 commit comments

Comments
 (0)