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

use nanobind builtin stubgen #949

Merged
merged 12 commits into from
Sep 27, 2024
Merged

Conversation

pca006132
Copy link
Collaborator

Closes #855.

The stub is not perfect because it is python, but I think we are pretty good now.

@pca006132
Copy link
Collaborator Author

@t-fi @wrongbad cannot request your review, so I will ping you instead.

Copy link
Owner

@elalish elalish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean we can remove the python auto-gen docs now?

@@ -17,7 +17,8 @@ project(python)
execute_process(
COMMAND "${Python_EXECUTABLE}" -m nanobind --version
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE NB_VERSION)
if(NB_VERSION VERSION_GREATER_EQUAL 1.8.0)
# we are fine with 2.0.0
if(NB_VERSION VERSION_GREATER_EQUAL 2.0.0)
Copy link
Owner

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?

Copy link
Collaborator Author

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.

Copy link
Owner

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.

@@ -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)))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the extra parens for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tuple

@@ -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),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

codecov bot commented Sep 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.25%. Comparing base (d437097) to head (a8837e5).
Report is 105 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #949      +/-   ##
==========================================
- Coverage   91.84%   88.25%   -3.59%     
==========================================
  Files          37       62      +25     
  Lines        4976     8666    +3690     
  Branches        0     1049    +1049     
==========================================
+ Hits         4570     7648    +3078     
- Misses        406     1018     +612     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pca006132
Copy link
Collaborator Author

and no, we still need to autogen docs for getting the doc strings.

@pca006132
Copy link
Collaborator Author

will figure out the wasm issue tmr, probably some library version issue.

@pca006132
Copy link
Collaborator Author

Maybe we can just disable build_nix with js for now until I figure out what is going on, seems to be related to emscripten version.

@pca006132
Copy link
Collaborator Author

@elalish should we merge this?

Copy link
Owner

@elalish elalish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@elalish elalish merged commit 31d6da0 into elalish:master Sep 27, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto generated python stubs inconsistent with cpp API
2 participants