Skip to content
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

Adding numpydoc hook #2381

Merged
merged 12 commits into from
Oct 24, 2023
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ repos:
hooks:
- id: isort

- repo: https://github.com/numpy/numpydoc
rev: v1.6.0
hooks:
- id: numpydoc-validation
germa89 marked this conversation as resolved.
Show resolved Hide resolved

- repo: https://github.com/psf/black
rev: 23.9.1 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
hooks:
Expand Down
30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,33 @@ show_missing = true
skip = '*.pyc,*.txt,*.gif,*.png,*.jpg,*.js,*.html,*.doctree,*.ttf,*.woff,*.woff2,*.eot,*.mp4,*.inv,*.pickle,*.ipynb,flycheck*,./.git/*,./.hypothesis/*,*.yml,./doc/build/*,./doc/images/*,./dist/*,*~,.hypothesis*,./doc/source/examples/*,*cover,*.dat,*.mac,build,./docker/mapdl/v*,./factory/*,./ansys/mapdl/core/mapdl_functions.py,PKG-INFO,*.mypy_cache/*,./docker/mapdl/*,./_unused/*'
ignore-words = "doc/styles/Vocab/ANSYS/accept.txt"
quiet-level = 3

[tool.numpydoc_validation]
checks = [
# "all", # report on all checks, except the below
"GL06", # Found unknown section
"GL07", # Sections are in the wrong order.
"GL08", # The object does not have a docstring
"GL09", # Deprecation warning should precede extended summary
"GL10", # reST directives {directives} must be followed by two colons
"SS01", # No summary found
"SS02", # Summary does not start with a capital letter
# "SS03", # Summary does not end with a period
"SS04", # Summary contains heading whitespaces
# "SS05", # Summary must start with infinitive verb, not third person
"RT02", # The first line of the Returns section should contain only the
# type, unless multiple values are being returned"
]
exclude = [ # don't report on objects that match any of these regex
'\.undocumented_method$', # default
'\.__repr__$', # default
# r"\.*MeshGrpc\.*", # Line commented because it gives error parsing the toml in the precommit
'tests/',
'examples/',
'doc/source/examples/',
]
override_SS05 = [ # override SS05 to allow docstrings starting with these words
# '^Process ',
# '^Assess ',
# '^Access ',
]
2 changes: 1 addition & 1 deletion src/ansys/mapdl/core/_commands/preproc/elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ def eplot(self, **kwargs):
APDL Command: EPLOT

Notes
------
-----
Produces an element display of the selected elements. In full
graphics, only those elements faces with all of their corresponding
nodes selected are plotted. In PowerGraphics, all element faces of the selected
Expand Down