-
Notifications
You must be signed in to change notification settings - Fork 98
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
use nanobind builtin stubgen #949
Changes from 9 commits
d9c9ea4
78b9bc8
ef22850
e15c57c
34b026b
604dc74
e8dbc40
e461cab
8fe6054
2f0bcc1
2ec4177
a8837e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,6 @@ jobs: | |
git config --global submodule.fetchJobs 8 | ||
git config --global core.longpaths true | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
- uses: actions/upload-artifact@v4 | ||
|
@@ -31,8 +29,6 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Build SDist | ||
run: pipx run build --sdist | ||
- name: Confirm SDist can be built | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,7 +84,7 @@ def floor(length, width): | |
) | ||
) | ||
if length == 1 and width > 1: | ||
results.append(row(width - 1).rotate(0, 0, 90)) | ||
results.append(row(width - 1).rotate((0, 0, 90))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What are the extra parens for? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tuple |
||
if width == 1 and length > 1: | ||
results.append( | ||
row(length - 1).translate( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -327,7 +327,8 @@ NB_MODULE(manifold3d, m) { | |
.def("refine", &Manifold::Refine, nb::arg("n"), manifold__refine__n) | ||
.def("refine_to_length", &Manifold::RefineToLength, nb::arg("length"), | ||
manifold__refine_to_length__length) | ||
.def("to_mesh", &Manifold::GetMeshGL, nb::arg("normal_idx") = ivec3(0), | ||
.def("to_mesh", &Manifold::GetMeshGL, | ||
nb::arg("normal_idx") = std::make_tuple(0, 0, 0), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
manifold__get_mesh_gl__normal_idx) | ||
.def("num_vert", &Manifold::NumVert, manifold__num_vert) | ||
.def("num_edge", &Manifold::NumEdge, manifold__num_edge) | ||
|
@@ -406,7 +407,8 @@ NB_MODULE(manifold3d, m) { | |
.def_static("compose", &Manifold::Compose, nb::arg("manifolds"), | ||
manifold__compose__manifolds) | ||
.def_static("tetrahedron", &Manifold::Tetrahedron, manifold__tetrahedron) | ||
.def_static("cube", &Manifold::Cube, nb::arg("size") = vec3{1, 1, 1}, | ||
.def_static("cube", &Manifold::Cube, | ||
nb::arg("size") = std::make_tuple(1.0, 1.0, 1.0), | ||
nb::arg("center") = false, manifold__cube__size__center) | ||
.def_static( | ||
"extrude", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
manifold3d.__prefix__: | ||
import numpy as np | ||
from typing import Literal, TypeVar, Union | ||
|
||
N = TypeVar('N', bound=np.generic) | ||
DoubleNx2 = np.ndarray[tuple[N, Literal[2]], np.dtype[np.double]] | ||
Doublex2 = Union[np.ndarray[tuple[Literal[2]], np.dtype[np.double]], tuple[float, float], list[float]] | ||
Doublex3 = Union[np.ndarray[tuple[Literal[3]], np.dtype[np.double]], tuple[float, float, float], list[float]] | ||
Double2x3 = np.ndarray[tuple[Literal[2], Literal[3]], np.dtype[np.double]] | ||
Double3x4 = np.ndarray[tuple[Literal[3], Literal[4]], np.dtype[np.double]] | ||
DoubleNx3 = np.ndarray[tuple[N, Literal[3]], np.dtype[np.double]] | ||
Intx3 = Union[np.ndarray[tuple[Literal[3]], np.dtype[np.integer]], tuple[int, int, int], list[int]] | ||
IntNx3 = np.ndarray[tuple[N, Literal[3]], np.dtype[np.integer]] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just go with 2.1.0 across the board?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some distros may have 2.1.0? Not sure about if we should support that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, so 2.0 is significantly more widely available than 2.1? This is fine if so - I was just thinking we could reduce CMake complexity a bit.