Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Nanobind support in the python doc generator #262

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

mosra
Copy link
Owner

@mosra mosra commented Dec 10, 2024

Just a rough initial sketch for #261. Quite some things can be reused from pybind11, especially the signature parsing. Other things such as detecting what's an enum or or what's a function have to be redone for nanobind.

Things to do:

  • Make the nanobind tests opt-in so we can still test pybind11 w/ older cmake
  • Nothing should rely on PYBIND11_COMPATIBILITY being enabled
  • Aim for as much test reuse with pybind11 as possible, if the output can be 1:1 it'd be great
    • Unnamed arguments seem to be named differently (arg vs arg0?), that may also affect static/class/method distinction
      • I think I had a stash fixing this for pybind in a better way? Adding real support for classmethods and such. Fix that first
  • Port all tests, not just a subset of one
  • Anything else to do for pybind first, and then just port to nanobind? Enum value docs etc.

Right now I don't think I can find time to finish this, wanted mainly to see how hard it would be -- it seems a manageable scope.

TODO: make it opt-in so we can still test pybind11 w/ older cmake?
TODO: it shouldn't rely on PYBIND11_COMPATIBILITY enabled
TODO: everything else
@mosra mosra mentioned this pull request Dec 10, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant