Skip to content

Commit

Permalink
add type checking; bump to 0.1.dev1 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
akaszynski authored Mar 12, 2024
1 parent bfa123a commit bc9e60d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
22 changes: 11 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ repos:
src/FTetWildWrapper.cpp
)$
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.7.0
# hooks:
# - id: mypy
# exclude: ^(docs/|tests)
# additional_dependencies: [
# "mypy-extensions==1.0.0",
# "toml==0.10.2",
# "types-PyYAML",
# "numpy",
# ]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.0
hooks:
- id: mypy
exclude: ^(docs/|tests)
additional_dependencies: [
"mypy-extensions==1.0.0",
"toml==0.10.2",
"npt_promote",
"numpy",
]

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.3
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"

[project]
name = "pytetwild"
version = "0.1.dev0"
version = "0.1.dev1"
description = "Python wrapper of fTetWild"
readme = { file = "README.rst", content-type = "text/x-rst" }
authors = [{ name = "Alex Kaszynski", email = "[email protected]" }]
Expand Down
10 changes: 7 additions & 3 deletions src/pytetwild/pytetwild.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"""Wrapper for fTetWild."""
import warnings
import numpy as np
from pytetwild import PyfTetWildWrapper
from pytetwild import PyfTetWildWrapper # type: ignore
from typing import Tuple, TYPE_CHECKING
import numpy.typing as npt

if TYPE_CHECKING:
import pyvista as pv
Expand Down Expand Up @@ -99,8 +100,11 @@ def tetrahedralize_pv(


def tetrahedralize(
vertices: np.ndarray, faces: np.ndarray, optimize: bool = True, edge_length_fac: float = 0.05
) -> Tuple[np.ndarray, np.ndarray]:
vertices: npt.NDArray[np.float64],
faces: npt.NDArray[np.int32],
optimize: bool = True,
edge_length_fac: float = 0.05,
) -> Tuple[npt.NDArray[np.float64], npt.NDArray[np.int32]]:
"""
Convert mesh vertices and faces to a tetrahedral mesh.
Expand Down

0 comments on commit bc9e60d

Please sign in to comment.