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

Migrate Python bindings to Nanobind. #92

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Migrate Python bindings to Nanobind. #92

wants to merge 11 commits into from

Conversation

psobot
Copy link
Member

@psobot psobot commented Oct 8, 2024

Tests still pass.

Still need to ensure that CI/CD works as expected, resulting wheels are smaller, and - most importantly - that docstring generation and type hint generation work without my absolutely awful hack of a script.

  • My code follows the code style of this project.
  • I have added and/or updated appropriate documentation (if applicable).
  • All new and existing tests pass locally with these changes.
  • I have run static code analysis (if available) and resolved any issues.
  • I have considered backward compatibility (if applicable).
  • I have confirmed that this PR does not introduce any security vulnerabilities.

@psobot psobot added the enhancement New feature or request label Oct 8, 2024
Copy link
Contributor

@markkohdev markkohdev left a comment

Choose a reason for hiding this comment

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

👍 Nice! Nice to see a lot of the pybind fluff go away. Ruff also seems like a solid choice as well :)

Copy link
Contributor

@stephen29xie stephen29xie left a comment

Choose a reason for hiding this comment

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

I was able to build locally with this new setup 👍. The migration in the Python bindings contains a breaking change though.

Some places to clean up:

  • Update CONTRIBUTING.md
    • the Building Python section contains a reference to the removed setup.py
    • The Troubleshooting section contains a reference to pybind11
  • python/dev-requirements.txt contains pybind11 and pybind11-stubgen

python/src/bindings.cpp Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants