Skip to content

Commit

Permalink
Merge pull request #163 from nschloe/pyright
Browse files Browse the repository at this point in the history
pyright fixes, lfs cache
  • Loading branch information
nschloe authored Oct 12, 2021
2 parents d1ff1c6 + 930ad4e commit c7605e7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: "3.x"
- uses: actions/checkout@v2
with:
lfs: true

- name: Checkout code
uses: nschloe/action-cached-lfs-checkout@v1

- name: Install CGAL 5
run: |
# Leave that here in case we ever need a PPA again
Expand All @@ -50,9 +51,10 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: "3.x"
- uses: actions/checkout@v2
with:
lfs: true

- name: Checkout code
uses: nschloe/action-cached-lfs-checkout@v1

- name: Install system dependencies
run: |
brew install cgal eigen
Expand Down
9 changes: 5 additions & 4 deletions pygalmesh/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import math
import os
import tempfile
from typing import Callable

import meshio
import numpy
Expand Down Expand Up @@ -38,10 +39,10 @@ def generate_mesh(
exude: bool = True,
max_edge_size_at_feature_edges: float = 0.0,
min_facet_angle: float = 0.0,
max_radius_surface_delaunay_ball: float = 0.0,
max_radius_surface_delaunay_ball: float | Callable[..., float] = 0.0,
max_facet_distance: float = 0.0,
max_circumradius_edge_ratio: float = 0.0,
max_cell_circumradius: float = 0.0,
max_cell_circumradius: float | Callable[..., float] = 0.0,
verbose: bool = True,
seed: int = 0,
):
Expand Down Expand Up @@ -291,7 +292,7 @@ def generate_from_inr(
max_radius_surface_delaunay_ball: float = 0.0,
max_facet_distance: float = 0.0,
max_circumradius_edge_ratio: float = 0.0,
max_cell_circumradius: float = 0.0,
max_cell_circumradius: float | dict[int | str, float] = 0.0,
verbose: bool = True,
seed: int = 0,
):
Expand Down Expand Up @@ -436,7 +437,7 @@ def generate_from_array(
max_edge_size_at_feature_edges: float = 0.0,
min_facet_angle: float = 0.0,
max_radius_surface_delaunay_ball: float = 0.0,
max_cell_circumradius: float = 0.0,
max_cell_circumradius: float | dict[int | str, float] = 0.0,
max_facet_distance: float = 0.0,
max_circumradius_edge_ratio: float = 0.0,
verbose: bool = True,
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pygalmesh
version = 0.10.4
version = 0.10.5
author = Nico Schlömer
author_email = [email protected]
description = Python frontend to CGAL's mesh generation capabilities
Expand Down
4 changes: 2 additions & 2 deletions tests/test_from_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def test_from_array():
n = 200
shape = (n, n, n)
h = [1.0 / s for s in shape]
h = (1.0 / shape[0], 1.0 / shape[1], 1.0 / shape[2])
vol = np.zeros(shape, dtype=np.uint16)
i, j, k = np.arange(shape[0]), np.arange(shape[1]), np.arange(shape[2])
ii, jj, kk = np.meshgrid(i, j, k)
Expand Down Expand Up @@ -41,7 +41,7 @@ def test_from_array():
def test_from_array_with_subdomain_sizing():
n = 200
shape = (n, n, n)
h = [1.0 / s for s in shape]
h = (1.0 / shape[0], 1.0 / shape[1], 1.0 / shape[2])
vol = np.zeros(shape, dtype=np.uint16)
i, j, k = np.arange(shape[0]), np.arange(shape[1]), np.arange(shape[2])
ii, jj, kk = np.meshgrid(i, j, k)
Expand Down

0 comments on commit c7605e7

Please sign in to comment.