From e59abc30b83ec5f429dfc9ff8f2a6c9eeaa8a626 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Sep 2023 10:30:18 +0000 Subject: [PATCH 1/4] maint: bump numpydoc from 1.5.0 to 1.6.0 Bumps [numpydoc](https://github.com/numpy/numpydoc) from 1.5.0 to 1.6.0. - [Release notes](https://github.com/numpy/numpydoc/releases) - [Changelog](https://github.com/numpy/numpydoc/blob/main/doc/release_notes.rst) - [Commits](https://github.com/numpy/numpydoc/compare/v1.5.0...v1.6.0) --- updated-dependencies: - dependency-name: numpydoc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 580ee95680..7b6b2847f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", From 4e656009e7435118132a44fef06fb01a8c7a5f08 Mon Sep 17 00:00:00 2001 From: Jorge Martinez Date: Thu, 28 Sep 2023 13:14:25 +0200 Subject: [PATCH 2/4] maint: migrate numpydoc config to pyproject.toml and pre-commit --- .pre-commit-config.yaml | 6 ++++++ pyproject.toml | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ec407a8978..ec7abfa5ca 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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/core/internal/" diff --git a/pyproject.toml b/pyproject.toml index 7b6b2847f3..88ab7efcbd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 From c1f3140b5b7e8aa7406252dd878d69637a219094 Mon Sep 17 00:00:00 2001 From: Jorge Martinez Date: Fri, 29 Sep 2023 09:24:07 +0200 Subject: [PATCH 3/4] dbg: use py3.8 for code style --- .github/workflows/ci_cd_pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd_pr.yml b/.github/workflows/ci_cd_pr.yml index 63f7350761..b477130c40 100644 --- a/.github/workflows/ci_cd_pr.yml +++ b/.github/workflows/ci_cd_pr.yml @@ -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" From 1e4ef8708612fdabead7974f933618aeafc2f4ac Mon Sep 17 00:00:00 2001 From: Jorge Martinez Date: Fri, 29 Sep 2023 09:52:02 +0200 Subject: [PATCH 4/4] maint: ignore tests --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ec7abfa5ca..5487072833 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,4 +33,4 @@ repos: rev: v1.6.0 hooks: - id: numpydoc-validation - exclude: "src/ansys/stk/core/internal/" + exclude: "^(src/ansys/stk/internal/|tests/)"