Skip to content
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
3 changes: 2 additions & 1 deletion .github/workflows/ci_cd_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ jobs:
steps:
- uses: ansys/actions/code-style@v4
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
# DBG
python-version: '3.8'

doc-style:
name: "Doc style checks"
Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ repos:
- id: pydocstyle
additional_dependencies: [toml]
exclude: "tests/"

- repo: https://github.com/numpy/numpydoc
rev: v1.6.0
hooks:
- id: numpydoc-validation
exclude: "^(src/ansys/stk/internal/|tests/)"
22 changes: 21 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ tests = [
doc = [
"ansys-sphinx-theme==0.12.0",
"enum-tools[sphinx]==0.11.0",
"numpydoc==1.5.0",
"numpydoc==1.6.0",
"sphinx==7.2.6",
"sphinx-design==0.5.0",
"sphinx-jinja==2.0.2",
Expand Down Expand Up @@ -66,6 +66,26 @@ src_paths = ["examples", "doc", "src", "tests"]
[tool.codespell]
ignore-words = "doc/styles/Vocab/ANSYS/accept.txt"

[tool.numpydoc_validation]
checks = [
"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$',
'\.__repr__$',
]

[tool.coverage.run]
relative_files = true

Expand Down