Skip to content

fix: improve code quality and numpydoc documentation #4125

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

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions doc/changelog.d/4125.miscellaneous.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix: improve code quality and numpydoc documentation
3 changes: 1 addition & 2 deletions doc/post_process_tex.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Validate the PNG images in the build/latex/ directory

Removes invalid PNGs (probably GIF)

Removes invalid PNGs (probably GIF).
"""

from glob import glob
Expand Down
1 change: 0 additions & 1 deletion src/ansys/mapdl/core/_commands/apdl/array_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,6 @@ def starvput(
* - ETAB
- Lab
- Any user-defined element table label ( :ref:`etable` ).

"""
command = (
f"*VPUT,{parr},{entity},{entnum},{item1},{it1num},{item2},{it2num},{kloop}"
Expand Down
4 changes: 0 additions & 4 deletions src/ansys/mapdl/core/_commands/apdl/matrix_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1265,8 +1265,6 @@ def lsdump(self, enginename: str = "", filename: str = "", **kwargs):
:ref:`lsrestore` command.

A BCS Sparse Solver can be dumped only if uses the ``INCORE`` memory option (see :ref:`bcsoption` ).


"""
command = f"*LSDUMP,{enginename},{filename}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -1427,8 +1425,6 @@ def lsrestore(self, enginename: str = "", filename: str = "", **kwargs):

Restores a previously dumped Linear Solver (see the :ref:`lsdump` command). This Linear Solver can
be used to solve a linear system using the :ref:`lsbac` command.


"""
command = f"*LSRESTORE,{enginename},{filename}"
return self.run(command, **kwargs)
Expand Down
2 changes: 0 additions & 2 deletions src/ansys/mapdl/core/_commands/apdl/parameter_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -2944,7 +2944,6 @@ def get(
* - STAT
- ``Element Number``
- Status of the element: 0 = uncracked, 1 = cracked

"""
command = f"*GET,{par},{entity},{entnum},{item1},{it1num},{item2},{it2num}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -4766,7 +4765,6 @@ def starvget(
* - EMF
-
- Electromotive force drop

"""
command = (
f"*VGET,{parr},{entity},{entnum},{item1},{it1num},{item2},{it2num},{kloop}"
Expand Down
1 change: 0 additions & 1 deletion src/ansys/mapdl/core/_commands/database/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@ def cmwrite(self, fname: str = "", ext: str = "", fmat: str = "", **kwargs):
* ``BLOCKED`` - Blocked format. This format allows faster reading of the file.

* ``UNBLOCKED`` - Unblocked format.

"""
command = f"CMWRITE,{fname},{ext},,,{fmat}"
return self.run(command, **kwargs)
5 changes: 0 additions & 5 deletions src/ansys/mapdl/core/_commands/database/selecting.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ def asel(
* - ACCA
-
- Concatenated areas (selects only areas that were created by area concatenation ( :ref:`accat` )).

"""
command = f"ASEL,{type_},{item},{comp},{vmin},{vmax},{vinc},{kswp}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -652,7 +651,6 @@ def esel(
* - ETAB
- ``Lab``
- Any user-defined element table label ( :ref:`etable` ).

"""
command = f"ESEL,{type_},{item},{comp},{vmin},{vmax},{vinc},{kabs}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -935,7 +933,6 @@ def ksel(
* - ESYS
-
- Element coordinate system associated with the keypoint.

"""
command = f"KSEL,{type_},{item},{comp},{vmin},{vmax},{vinc},{kabs}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -1166,7 +1163,6 @@ def lsel(
* - LCCA
-
- Concatenated lines (selects only lines that were created by concatenation ( :ref:`lccat` )).

"""
command = f"LSEL,{type_},{item},{comp},{vmin},{vmax},{vinc},{kswp}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -2056,7 +2052,6 @@ def vsel(
* - ESYS
-
- Element coordinate system associated with the volume.

"""
command = f"VSEL,{type_},{item},{comp},{vmin},{vmax},{vinc},{kswp}"
return self.run(command, **kwargs)
Expand Down
3 changes: 0 additions & 3 deletions src/ansys/mapdl/core/_commands/graphics/set_up.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,6 @@ def jpeg(self, kywrd: str = "", opt: str = "", **kwargs):

* ``1,0`` - If ``Kywrd`` = TMOD, the values 1 and 0 determine whether bitmap (1) or stroke text (0)
fonts will be used

"""
command = f"JPEG,{kywrd},{opt}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -1192,7 +1191,6 @@ def pngr(self, kywrd: str = "", opt: str = "", val: int | str = "", **kwargs):

* ``1-9`` - Use this value to specify a specific compression level. 1 is the lowest compression
level (fastest) and 9 is the highest compression level (slowest).

"""
command = f"PNGR,{kywrd},{opt},{val}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -1494,7 +1492,6 @@ def tiff(self, kywrd: str = "", opt: str = "", **kwargs):

* ``1, 0`` - If ``Kywrd`` = TMOD, the values 1 and 0 determine whether bitmap (1) or stroke text (0)
fonts will be used

"""
command = f"TIFF,{kywrd},{opt}"
return self.run(command, **kwargs)
Expand Down
1 change: 0 additions & 1 deletion src/ansys/mapdl/core/_commands/hidden.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

"""These commands may be run by PyMAPDL, but are not supported from a
user-context.

"""


Expand Down
7 changes: 0 additions & 7 deletions src/ansys/mapdl/core/_commands/inq_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

"""Inquire undocumented functions"""


Expand Down Expand Up @@ -374,7 +373,6 @@ def lsinqr(self, line, key, pname="__tmpvar__", **kwargs):

For key not equal to 1 returned data is based
on setting of key.

"""
return self.run(f"{pname} = lsinqr({line}, {key})", **kwargs)

Expand Down Expand Up @@ -580,7 +578,6 @@ def rlinqr(self, nreal, key, pname="__tmpvar__", **kwargs):
-------
int or str
The returned value of ``rlinqr`` is based on setting of key.

"""
return self.run(f"{pname} = rlinqr({nreal}, {key})", **kwargs)

Expand Down Expand Up @@ -762,7 +759,6 @@ def cpinqr(self, ncp, key, pname="__tmpvar__", **kwargs):
-------
int or str
The returned value of ``cpinqr`` is based on setting of key.

"""
return self.run(f"{pname} = cpinqr({ncp}, {key})", **kwargs)

Expand Down Expand Up @@ -1053,7 +1049,6 @@ def mpinqr(self, mat, iprop, key, pname="__tmpvar__", **kwargs):
+----------+-----+----------+-----+----------+-----+----------+-----+----------+-----+----------+-----+

see :meth:`TB <ansys.mapdl.core.Mapdl.tb>` command for more information.

"""
return self.run(f"{pname} = mpinqr({mat}, {iprop}, {key})", **kwargs)

Expand Down Expand Up @@ -1350,7 +1345,6 @@ def erinqr(self, key, pname="__tmpvar__", **kwargs):
-------
int or str
Value corresponding to key.

"""
return self.run(f"{pname} = erinqr({key})", **kwargs)

Expand Down Expand Up @@ -1423,6 +1417,5 @@ def wrinqr(self, key, pname="__tmpvar__", **kwargs):
-------
int or str
The value corresponding to key.

"""
return self.run(f"{pname} = wrinqr({key})", **kwargs)
1 change: 0 additions & 1 deletion src/ansys/mapdl/core/_commands/misc/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,5 @@ def verify(self, case="", level="", **kwargs):
>>> mapdl.finish()
>>> mapdl.verify('VM1')
'*** VERIFICATION RUN - CASE VM1 *** OPTION= 4'

"""
return self.run(f"/VERIFY,{case},{level}", **kwargs)
14 changes: 0 additions & 14 deletions src/ansys/mapdl/core/_commands/post1/_fatigue.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def fe(
.. warning::

This command is archived in the latest version of the software.

"""
command = f"FE,{nev},{cycle},{fact},{title}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -96,7 +95,6 @@ def felist(self, nev1: str = "", nev2: str = "", ninc: str = "", **kwargs):
.. warning::

This command is archived in the latest version of the software.

"""
command = f"FELIST,{nev1},{nev2},{ninc}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -165,7 +163,6 @@ def fl(
.. warning::

This command is archived in the latest version of the software.

"""
command = f"FL,{nloc},{node},{scfx},{scfy},{scfz},{title}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -202,7 +199,6 @@ def fllist(self, nloc1: str = "", nloc2: str = "", ninc: str = "", **kwargs):
.. warning::

This command is archived in the latest version of the software.

"""
command = f"FLLIST,{nloc1},{nloc2},{ninc}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -279,7 +275,6 @@ def fp(
.. warning::

This command is archived in the latest version of the software.

"""
command = f"FP,{stitm},{c1},{c2},{c3},{c4},{c5},{c6}"
return self.run(command, **kwargs)
Expand All @@ -296,7 +291,6 @@ def fplist(self, **kwargs):
.. warning::

This command is archived in the latest version of the software.

"""
command = "FPLIST"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -387,7 +381,6 @@ def fs(
.. warning::

This command is archived in the latest version of the software.

"""
command = f"FS,{node},{nev},{nlod},{stitm},{c1},{c2},{c3},{c4},{c5},{c6}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -420,7 +413,6 @@ def fsdele(self, nloc: str = "", nev: str = "", nlod: str = "", **kwargs):
.. warning::

This command is archived in the latest version of the software.

"""
command = f"FSDELE,{nloc},{nev},{nlod}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -472,7 +464,6 @@ def fslist(
.. warning::

This command is archived in the latest version of the software.

"""
command = f"FSLIST,{nloc1},{nloc2},{ninc},{nev},{nlod}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -511,7 +502,6 @@ def fsnode(self, node: str = "", nev: str = "", nlod: str = "", **kwargs):
.. warning::

This command is archived in the latest version of the software.

"""
command = f"FSNODE,{node},{nev},{nlod}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -551,7 +541,6 @@ def fsplot(self, nloc: str = "", nev: str = "", item: int | str = "", **kwargs):
.. warning::

This command is archived in the latest version of the software.

"""
command = f"FSPLOT,{nloc},{nev},{item}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -579,7 +568,6 @@ def ftcalc(self, nloc: str = "", node: str = "", **kwargs):
.. warning::

This command is archived in the latest version of the software.

"""
command = f"FTCALC,{nloc},{node}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -614,7 +602,6 @@ def ftsize(self, mxloc: str = "", mxev: str = "", mxlod: str = "", **kwargs):
.. warning::

This command is archived in the latest version of the software.

"""
command = f"FTSIZE,{mxloc},{mxev},{mxlod}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -646,7 +633,6 @@ def ftwrite(self, fname: str = "", ext: str = "", **kwargs):
.. warning::

This command is archived in the latest version of the software.

"""
command = f"FTWRITE,{fname},{ext}"
return self.run(command, **kwargs)
2 changes: 0 additions & 2 deletions src/ansys/mapdl/core/_commands/post1/_special_purpose.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ def kcalc(
.. warning::

This command is archived in the latest version of the software.

"""
command = f"KCALC,{kplan},{mat},{kcsym},{klocpr}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -148,7 +147,6 @@ def plcrack(self, loc: int | str = "", num: int | str = "", **kwargs):
.. warning::

This command is archived in the latest version of the software.

"""
command = f"PLCRACK,{loc},{num}"
return self.run(command, **kwargs)
1 change: 0 additions & 1 deletion src/ansys/mapdl/core/_commands/post1/element_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,6 @@ def etable(
- The ``n`` th state variable.
* - FLDUF0 ``n``
- The ``n`` th user-defined field variable.

"""
command = f"ETABLE,{lab},{item},{comp},{option}"
return self.run(command, **kwargs)
Expand Down
1 change: 0 additions & 1 deletion src/ansys/mapdl/core/_commands/post1/listing.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ def prerr(self, **kwargs):
consist of one material).

* Anisotropic materials ( :ref:`tb`,ANEL) are not considered.

"""
command = "PRERR"
return self.run(command, **kwargs)
Expand Down
2 changes: 0 additions & 2 deletions src/ansys/mapdl/core/_commands/post1/path_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,6 @@ def pcalc(
``LabR`` = FACT2 x ``cos`` -1(FACT1 x Lab1) + CONST

``LabR`` = FACT2 x ``log(FACT1 x Lab1) + CONST``

"""
command = f"PCALC,{oper},{labr},{lab1},{lab2},{fact1},{fact2},{const}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -995,7 +994,6 @@ def plsect(
* - "
- INT, EQV
- Stress intensity or equivalent stress.

"""
command = f"PLSECT,{item},{comp},{rho},{kbr},{kbr3d}"
return self.run(command, **kwargs)
Expand Down
5 changes: 0 additions & 5 deletions src/ansys/mapdl/core/_commands/post1/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,6 @@ def plesol(
- The ``n`` th state variable.
* - FLDUF0 ``n``
- The ``n`` th user-defined field variable.

"""
command = f"PLESOL,{item},{comp},{kund},{fact},{avg}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -1758,7 +1757,6 @@ def plnsol(
- The ``n`` th state variable.
* - FLDUF0 ``n``
- The ``n`` th user-defined field variable.

"""
command = f"PLNSOL,{item},{comp},{kund},{fact},{fileid},{avg},{datakey}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -2734,7 +2732,6 @@ def presol(self, item: str = "", comp: str = "", **kwargs):
- The ``n`` th state variable.
* - FLDUF0 ``n``
- The ``n`` th user-defined field variable.

"""
command = f"PRESOL,{item},{comp}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -3394,7 +3391,6 @@ def prnsol(
- The ``n`` th state variable.
* - FLDUF0 ``n``
- The ``n`` th user-defined field variable.

"""
command = f"PRNSOL,{item},{comp},,,,{avg},{datakey}"
return self.run(command, **kwargs)
Expand Down Expand Up @@ -3703,7 +3699,6 @@ def prvect(
* - SNDI
-
- Sound intensity vector sum and direction cosines.

"""
command = f"PRVECT,{item},{lab2},{lab3},{labp}"
return self.run(command, **kwargs)
Expand Down
Loading
Loading