Skip to content

Commit 069e113

Browse files
authored
ci: Modify doc CI to return error if warnings and update doc (#79)
* Modify doc ci to return error if warnings are present Update docs to pass the new ci Add geos-xml-viewer to the doc * Add vtk to mock imports * Add vtk install to remove libGL error * Try add install libgl1 * Try add install libgl1 with sudo * change libGL package name * add doc ci config * Modify vtk import for doc ci and linting * Simplify ci config * Update doc geos-xml-viewer
1 parent 477b99c commit 069e113

File tree

26 files changed

+207
-121
lines changed

26 files changed

+207
-121
lines changed

.github/workflows/doc-test.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: "Pull Request Docs Check"
22
on:
33
- pull_request
44

5+
# Cancels in-progress workflows for a PR when updated
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
510
jobs:
611
docs:
712
runs-on: ubuntu-latest
@@ -10,4 +15,4 @@ jobs:
1015
- uses: ammaraskar/sphinx-action@dev
1116
with:
1217
docs-folder: "docs/"
13-
build-command: "sphinx-build -b html . _build"
18+
build-command: "sphinx-build -b html . _build -W"

docs/conf.py

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

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

2222
for m in python_modules:
2323
sys.path.insert( 0, os.path.abspath( os.path.join( python_root, m, 'src' ) ) )
@@ -43,15 +43,15 @@
4343
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4444
# ones.
4545
extensions = [
46-
'sphinx_design', 'sphinx_rtd_theme', 'sphinxarg.ext', 'sphinxcontrib.programoutput', 'sphinx.ext.autodoc',
47-
'sphinx.ext.doctest', 'sphinx.ext.mathjax', 'sphinx.ext.napoleon', 'sphinx.ext.todo', 'sphinx.ext.viewcode'
46+
'sphinx.ext.napoleon', 'sphinx_design', 'sphinx_rtd_theme', 'sphinxarg.ext', 'sphinxcontrib.programoutput',
47+
'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.mathjax', 'sphinx.ext.todo', 'sphinx.ext.viewcode'
4848
]
4949

5050
autoclass_content = 'both'
51-
autodoc_mock_imports = [ "ats", "h5py", "lxml", "paraview", "pygeosx", "pylvarray", "meshio", "mpi4py", "scipy" ]
51+
autodoc_mock_imports = [ "ats", "colorcet", "h5py", "lxml", "meshio", "mpi4py", "scipy", "paraview", "pygeosx", "pylvarray", "vtk", "xmlschema", "xsdata" ]
5252
autodoc_typehints = 'none'
5353
autodoc_typehints_format = 'short'
54-
suppress_warnings = [ "" ]
54+
suppress_warnings = [ "autodoc.mocked_object" ]
5555
typehints_defaults = 'braces'
5656

5757
# The suffix(es) of source filenames.

docs/geos-geomechanics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GEOS Post-Processing tools
1+
GEOS Geomechanics tools
22
=============================
33

44
.. toctree::

docs/geos-xml-viewer.rst

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
GEOS XML VIEWER
2+
===============
3+
4+
The `geos-xml-viewer` python package defines tools to read, process, and visualize objects from GEOS input xml file.
5+
See `Advanced XML Features <https://geosx-geosx.readthedocs-hosted.com/en/latest/coreComponents/fileIO/doc/InputXMLFiles.html#advanced-xml-features>`_ for a detailed description of the input format.
6+
7+
This package defines multiple console scripts and a vtk ilter associated with a Paraview reader.
8+
9+
Consol scripts
10+
--------------
11+
12+
geos-exporter
13+
^^^^^^^^^^^^^
14+
15+
Reads the xml file and writes a PartionedDataSetCollection file containing all the mesh objects (mesh, wells, boxes) defind in the xml.
16+
17+
.. argparse::
18+
:module: geos_xml_viewer.bin.exporter
19+
:func: parsing
20+
:prog: geos-exporter
21+
22+
geos-modifier
23+
^^^^^^^^^^^^^
24+
25+
Rewrite wells into VTK file and modify the xml file accordingly.
26+
27+
.. argparse::
28+
:module: geos_xml_viewer.bin.modifier
29+
:func: parsing
30+
:prog: geos-modifier
31+
32+
geos-splitter
33+
^^^^^^^^^^^^^
34+
35+
Extract Internal wells into VTK files.
36+
37+
.. argparse::
38+
:module: geos_xml_viewer.bin.splitter
39+
:func: parsing
40+
:prog: geos-splitter
41+
42+
geos-viewer
43+
^^^^^^^^^^^^^
44+
45+
Viewer dedicated to xml mesh objects (mesh, wells, boxes).
46+
47+
.. argparse::
48+
:module: geos_xml_viewer.bin.viewer
49+
:func: parsing
50+
:prog: geos-viewer
51+
52+
53+
WIP consol scripts
54+
------------------
55+
56+
geos-validate
57+
^^^^^^^^^^^^^
58+
59+
Validate xml file according to GEOS scheme.
60+
61+
.. argparse::
62+
:module: geos_xml_viewer.bin.validate
63+
:func: parsing
64+
:prog: geos-validate
65+
66+
67+
vtk filter
68+
----------
69+
70+
Geos deck reader
71+
^^^^^^^^^^^^^^^^
72+
73+
Vtk reader of GEOS xml file to load or build vtk objects (mesh, wells, boxes).
74+
75+
.. automodule:: geos_xml_viewer.filters.geosDeckReader
76+
:members:
77+
:undoc-members:
78+
:show-inheritance:
79+
80+
81+
Paraview plugin
82+
----------------
83+
84+
Geos Deck Reader
85+
^^^^^^^^^^^^^^^^
86+
87+
Paraview plugin of Geos Deck Reader.
88+
89+
.. automodule:: PVPlugins.deckReader
90+
:no-members:
91+
:no-undoc-members:
92+
93+
Utilities
94+
---------
95+
96+
geos_xml_viewer.algorithms.deck
97+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
98+
99+
.. automodule:: geos_xml_viewer.algorithms.deck
100+
:members:
101+
:undoc-members:
102+
103+
geos_xml_viewer.algorithms.write_wells
104+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
105+
.. automodule:: geos_xml_viewer.algorithms.write_wells
106+
:members:
107+
:undoc-members:

docs/geos_geomechanics_docs/home.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
GEOS Geomechanics Tools
2-
=========================
2+
-----------------------
33

44
This package contains geomechanics functions and data models.

docs/geos_geomechanics_docs/model.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Geomechanics models
22
======================
3-
This
3+
4+
This module defines data structures for geomechanics calculations.
45

56
geos.geomechanics.model.MohrCircle module
67
------------------------------------------

docs/geos_geomechanics_docs/processing.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Processing
22
============
3-
The processing part of `geos-geomechanics` package contains functions tools to compute geomechanical properties.
3+
4+
The processing part of `geos-geomechanics` package contains the basis functions to compute geomechanical properties.
45

56
geos.geomechanics.processing.geomechanicsCalculatorFunctions module
67
---------------------------------------------------------------------

docs/geos_posp_docs/PVplugins.rst

Lines changed: 34 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -10,122 +10,105 @@ The plugins include:
1010
* Processing plugins to compute additional geomechanical properties;
1111
* Visualization plugins to plot Mohr's circles and cross plots using Paraview Python View.
1212

13-
PVplugins.PVAttributeMapping module
13+
PVAttributeMapping plugin
1414
-----------------------------------
1515

1616
.. automodule:: PVplugins.PVAttributeMapping
17-
:members:
18-
:undoc-members:
1917

20-
PVplugins.PVCreateConstantAttributePerRegion module
18+
19+
PVCreateConstantAttributePerRegion plugin
2120
---------------------------------------------------
2221

2322
.. automodule:: PVplugins.PVCreateConstantAttributePerRegion
24-
:members:
25-
:undoc-members:
2623

27-
PVplugins.PVExtractMergeBlocksVolume module
24+
25+
PVExtractMergeBlocksVolume plugin
2826
-------------------------------------------
2927

3028
.. automodule:: PVplugins.PVExtractMergeBlocksVolume
31-
:members:
32-
:undoc-members:
3329

34-
PVplugins.PVExtractMergeBlocksVolumeSurface module
30+
31+
PVExtractMergeBlocksVolumeSurface plugin
3532
--------------------------------------------------
3633

3734
.. automodule:: PVplugins.PVExtractMergeBlocksVolumeSurface
38-
:members:
39-
:undoc-members:
4035

41-
PVplugins.PVExtractMergeBlocksVolumeSurfaceWell module
36+
37+
PVExtractMergeBlocksVolumeSurfaceWell plugin
4238
------------------------------------------------------
4339

4440
.. automodule:: PVplugins.PVExtractMergeBlocksVolumeSurfaceWell
45-
:members:
46-
:undoc-members:
4741

48-
PVplugins.PVExtractMergeBlocksVolumeWell module
42+
43+
PVExtractMergeBlocksVolumeWell plugin
4944
-----------------------------------------------
5045

5146
.. automodule:: PVplugins.PVExtractMergeBlocksVolumeWell
52-
:members:
53-
:undoc-members:
5447

55-
PVplugins.PVGeomechanicsAnalysis module
48+
49+
PVGeomechanicsAnalysis plugin
5650
---------------------------------------
5751

5852
.. automodule:: PVplugins.PVGeomechanicsAnalysis
59-
:members:
60-
:undoc-members:
6153

62-
PVplugins.PVGeomechanicsWorkflowVolume module
54+
55+
PVGeomechanicsWorkflowVolume plugin
6356
---------------------------------------------
6457

6558
.. automodule:: PVplugins.PVGeomechanicsWorkflowVolume
66-
:members:
67-
:undoc-members:
6859

69-
PVplugins.PVGeomechanicsWorkflowVolumeSurface module
60+
61+
PVGeomechanicsWorkflowVolumeSurface plugin
7062
----------------------------------------------------
7163

7264
.. automodule:: PVplugins.PVGeomechanicsWorkflowVolumeSurface
73-
:members:
74-
:undoc-members:
7565

76-
PVplugins.PVGeomechanicsWorkflowVolumeSurfaceWell module
66+
67+
PVGeomechanicsWorkflowVolumeSurfaceWell plugin
7768
--------------------------------------------------------
7869

7970
.. automodule:: PVplugins.PVGeomechanicsWorkflowVolumeSurfaceWell
80-
:members:
81-
:undoc-members:
8271

83-
PVplugins.PVGeomechanicsWorkflowVolumeWell module
72+
73+
PVGeomechanicsWorkflowVolumeWell plugin
8474
-------------------------------------------------
8575

8676
.. automodule:: PVplugins.PVGeomechanicsWorkflowVolumeWell
87-
:members:
88-
:undoc-members:
8977

90-
PVplugins.PVGeosLogReader module
78+
79+
PVGeosLogReader plugin
9180
--------------------------------
9281

9382
.. automodule:: PVplugins.PVGeosLogReader
94-
:members:
95-
:undoc-members:
9683

97-
PVplugins.PVMergeBlocksEnhanced module
84+
85+
PVMergeBlocksEnhanced plugin
9886
--------------------------------------
9987

10088
.. automodule:: PVplugins.PVMergeBlocksEnhanced
101-
:members:
102-
:undoc-members:
10389

104-
PVplugins.PVMohrCirclePlot module
90+
91+
PVMohrCirclePlot plugin
10592
---------------------------------
10693

10794
.. automodule:: PVplugins.PVMohrCirclePlot
108-
:members:
109-
:undoc-members:
11095

111-
PVplugins.PVPythonViewConfigurator module
96+
97+
PVPythonViewConfigurator plugin
11298
-----------------------------------------
11399

114100
.. automodule:: PVplugins.PVPythonViewConfigurator
115-
:members:
116-
:undoc-members:
117101

118-
PVplugins.PVSurfaceGeomechanics module
102+
103+
PVSurfaceGeomechanics plugin
119104
--------------------------------------
120105

121106
.. automodule:: PVplugins.PVSurfaceGeomechanics
122-
:members:
123-
:undoc-members:
124107

125-
PVplugins.PVTransferAttributesVolumeSurface module
108+
109+
PVTransferAttributesVolumeSurface plugin
126110
--------------------------------------------------
127111

128112
.. automodule:: PVplugins.PVTransferAttributesVolumeSurface
129-
:members:
130-
:undoc-members:
113+
131114

docs/geos_posp_docs/home.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Home
2-
====
2+
-----
33

44
**Geos-posp** is a Python library to read, process and visualize GEOS simulation software outputs.
55

docs/geos_posp_docs/processing.rst

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

44
This package define functions to process data.
55

6-
7-
geos_posp.processing.geomechanicsCalculatorFunctions module
8-
---------------------------------------------------------------
9-
10-
.. automodule:: geos_posp.processing.geomechanicsCalculatorFunctions
11-
:members:
12-
:undoc-members:
13-
:show-inheritance:
14-
156
geos_posp.processing.geosLogReaderFunctions module
167
------------------------------------------------------
178

@@ -20,22 +11,6 @@ geos_posp.processing.geosLogReaderFunctions module
2011
:undoc-members:
2112
:show-inheritance:
2213

23-
geos_posp.processing.MohrCircle module
24-
------------------------------------------
25-
26-
.. automodule:: geos_posp.processing.MohrCircle
27-
:members:
28-
:undoc-members:
29-
:show-inheritance:
30-
31-
geos_posp.processing.MohrCoulomb module
32-
-------------------------------------------
33-
34-
.. automodule:: geos_posp.processing.MohrCoulomb
35-
:members:
36-
:undoc-members:
37-
:show-inheritance:
38-
3914
geos_posp.processing.multiblockInpectorTreeFunctions module
4015
---------------------------------------------------------------
4116

0 commit comments

Comments
 (0)