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

Add numpydoc to .pre-commit-config.yaml #17

Merged
merged 3 commits into from
Dec 24, 2023
Merged
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
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,19 @@ repos:
hooks:
- id: blackdoc
files: '\.py$'

- repo: https://github.com/DanielNoord/pydocstringformatter
rev: v0.7.3
hooks:
- id: pydocstringformatter
args: [
"--style {numpydoc,pep257}",
"--no-strip-whitespace",
"--no-capitalize-first-letter",
]

- repo: https://github.com/numpy/numpydoc
rev: v1.6.0
hooks:
- id: numpydoc-validation
files: ^src/pvgmsh/
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,18 @@ dependencies = [

[tool.setuptools.dynamic]
version = {attr = 'pvgmsh.__version__'}

[tool.numpydoc_validation]
checks = [
"all", # all but the following:
"GL01", # Contradicts numpydoc examples
"GL02", # Permit a blank line after the end of our docstring
"GL03", # Considering enforcing
"GL09", # Deprecation warning should precede extended summary (check broken)
"SA01", # Not all docstrings need a see also
"SA04", # See also section does not need descriptions
"SS05", # Appears to be broken.
"ES01", # Not all docstrings need an extend summary.
"EX01", # Examples: Will eventually enforce
"YD01", # Yields: No plan to enforce
]
5 changes: 4 additions & 1 deletion src/pvgmsh/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
"""PvGmsh package for 3D mesh generation."""

import gmsh
import pyvista as pv
import tempfile
from pvgmsh._version import __version__ # noqa: F401


def frontal_delaunay_2d(edge_source, mesh_size=1e-2):
"""
"""The Frontal-Delaunay 2D mesh algorithm.

Parameters
----------
edge_source : pyvista.PolyData
Expand Down
9 changes: 7 additions & 2 deletions src/pvgmsh/_version.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
"""Version info for fe2pv.
"""Version info for pvgmsh.

On the ``main`` branch, use 'dev0' to denote a development version.
For example:

version_info = 0, 1, 'dev0'
---

When generating pre-release wheels, use '0rcN', for example:

version_info = 0, 2, '0rc1'

Denotes the first release candidate.

"""
# major, minor, patch
version_info = 0, 0, "dev0"
Expand Down