Skip to content

Commit

Permalink
Argparse module not able to access packages when creating the documen…
Browse files Browse the repository at this point in the history
…tation. Argparse filename used instead.
  • Loading branch information
alexbenedicto committed Jul 23, 2024
1 parent 8b28199 commit 6713bb3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/geos-ats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ run_geos_ats
Primary entry point for running integrated tests.

.. argparse::
:module: geos.ats.command_line_parsers
:filename: ..\geos-ats\src\geos\ats\command_line_parsers.py
:func: build_command_line_parser
:prog: run_geos_ats

Expand Down
24 changes: 12 additions & 12 deletions docs/geos-mesh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ Modules
To list all the modules available through ``mesh-doctor``, you can simply use the ``--help`` option, which will list all available modules as well as a quick summary.

.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py --help
:cwd: ../geos-mesh
:cwd: ..\geos-mesh

Then, if you are interested in a specific module, you can ask for its documentation using the ``mesh-doctor module_name --help`` pattern.
For example

.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py collocated_nodes --help
:cwd: ../geos-mesh
:cwd: ..\geos-mesh

``mesh-doctor`` loads its module dynamically.
If a module can't be loaded, ``mesh-doctor`` will proceed and try to load other modules.
Expand All @@ -45,7 +45,7 @@ Displays the neighboring nodes that are closer to each other than a prescribed t
It is not uncommon to define multiple nodes for the exact same position, which will typically be an issue for ``geos`` and should be fixed.

.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py collocated_nodes --help
:cwd: ../geos-mesh
:cwd: ..\geos-mesh

``element_volumes``
"""""""""""""""""""
Expand All @@ -54,7 +54,7 @@ Computes the volumes of all the cells and displays the ones that are below a pre
Cells with negative volumes will typically be an issue for ``geos`` and should be fixed.

.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py element_volumes --help
:cwd: ../geos-mesh
:cwd: ..\geos-mesh

``fix_elements_orderings``
""""""""""""""""""""""""""
Expand All @@ -64,7 +64,7 @@ The ``fix_elements_orderings`` module can rearrange the nodes of given types of
This can be convenient if you cannot regenerate the mesh.

.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py fix_elements_orderings --help
:cwd: ../geos-mesh
:cwd: ..\geos-mesh

``generate_cube``
"""""""""""""""""
Expand All @@ -74,7 +74,7 @@ It can also generate fields with simple values.
This tool can also be useful to generate a trial mesh that will later be refined or customized.

.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py generate_cube --help
:cwd: ../geos-mesh
:cwd: ..\geos-mesh

``generate_fractures``
""""""""""""""""""""""
Expand All @@ -83,7 +83,7 @@ For a conformal fracture to be defined in a mesh, ``geos`` requires the mesh to
The ``generate_fractures`` module will split the mesh and generate the multi-block ``vtk`` files.

.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py generate_fractures --help
:cwd: ../geos-mesh
:cwd: ..\geos-mesh

``generate_global_ids``
"""""""""""""""""""""""
Expand All @@ -92,7 +92,7 @@ When running ``geos`` in parallel, `global ids` can be used to refer to data acr
The ``generate_global_ids`` can generate `global ids` for the imported ``vtk`` mesh.

.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py generate_global_ids --help
:cwd: ../geos-mesh
:cwd: ..\geos-mesh

``non_conformal``
"""""""""""""""""
Expand All @@ -103,7 +103,7 @@ The angle between two faces can also be precribed.
This module can be a bit time consuming.

.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py non_conformal --help
:cwd: ../geos-mesh
:cwd: ..\geos-mesh

``self_intersecting_elements``
""""""""""""""""""""""""""""""
Expand All @@ -112,7 +112,7 @@ Some meshes can have cells that auto-intersect.
This module will display the elements that have faces intersecting.

.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py self_intersecting_elements --help
:cwd: ../geos-mesh
:cwd: ..\geos-mesh

``supported_elements``
""""""""""""""""""""""
Expand All @@ -126,7 +126,7 @@ The ``supported_elements`` check will validate that no unsupported element is in
It will also verify that the ``VTK_POLYHEDRON`` cells can effectively get converted into a supported type of element.

.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py supported_elements --help
:cwd: ../geos-mesh
:cwd: ..\geos-mesh



Expand All @@ -144,7 +144,7 @@ convert_abaqus
Compile an xml file with advanced features into a single file that can be read by GEOS.

.. argparse::
:module: geos.mesh.conversion.main
:filename: ..\geos-mesh\src\geos\mesh\conversion\main.py
:func: build_abaqus_converter_input_parser
:prog: convert_abaqus

Expand Down
8 changes: 4 additions & 4 deletions docs/geos-xml-tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ convert_abaqus
Convert an abaqus format mesh file to gmsh or vtk format.

.. argparse::
:module: geos.xml_tools.command_line_parsers
:filename: ..\geos-xml-tools\src\geos\xml_tools\command_line_parsers.py
:func: build_preprocessor_input_parser
:prog: preprocess_xml

Expand All @@ -26,7 +26,7 @@ format_xml
Formats an xml file.

.. argparse::
:module: geos.xml_tools.command_line_parsers
:filename: ..\geos-xml-tools\src\geos\xml_tools\command_line_parsers.py
:func: build_xml_formatter_input_parser
:prog: format_xml

Expand All @@ -37,7 +37,7 @@ check_xml_attribute_coverage
Checks xml attribute coverage for files in the GEOS repository.

.. argparse::
:module: geos.xml_tools.command_line_parsers
:filename: ..\geos-xml-tools\src\geos\xml_tools\command_line_parsers.py
:func: build_attribute_coverage_input_parser
:prog: check_xml_attribute_coverage

Expand All @@ -48,7 +48,7 @@ check_xml_redundancy
Checks for redundant attribute definitions in an xml file, such as those that duplicate the default value.

.. argparse::
:module: geos.xml_tools.command_line_parsers
:filename: ..\geos-xml-tools\src\geos\xml_tools\command_line_parsers.py
:func: build_xml_redundancy_input_parser
:prog: check_xml_redundancy

Expand Down
3 changes: 0 additions & 3 deletions geos-mesh/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,3 @@ warn_unused_configs = true
ignore_missing_imports = true
allow_redefinition = true
plugins = "numpy.typing.mypy_plugin"

[tool.setuptools.packages.find]
where = ["src"]

0 comments on commit 6713bb3

Please sign in to comment.