-
Notifications
You must be signed in to change notification settings - Fork 10
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
Separate Pybind modules for inner namespaces #49
Comments
It's just time consuming 🤷 I feel it's more like a cosmetic issue (and I feel that it may be possible to solve with a trick) [spoiler] add a |
I do agree with @varunagrawal there is an issue here. @ProfFan cosmetics matters for our users. |
@dellaert It's because we are currently having this one massive header and it's not trivial to escape this design pattern, as the wrap script is designed for this. Maybe in the future we can split the headers so this won't be an issue, but for now, I don't see an easy way to get this working. |
So I actually did quite a bit of research on this today. I'd be glad to put in a PR for this once I'm done with my summer commitments. |
Could you write up the solution in an issue? Maybe with links? |
Or, this issue, of course :-) |
Feature
Currently, all namespaces under the top level
gtsam
(e.g.symbol_shorthand
) are added as pybind submodules. This requires the python import to look likeaka a gtsam module inside a gtsam module.
We can get rid of the inner gtsam module by configuring the pybind wrapper to create separate modules for all the inner namespaces, allowing us to do
which is more intuitive and neater, especially since
import gtsam.symbol_shorthand
works.Motivation
Outlined above.
Pitch
Update the Pybind wrapper to have separate modules for each inner namespace.
Currently there are 5:
Alternatives
N/A
Additional context
@ProfFan should be able to provide details on whether this is doable without breaking other stuff since he's the lead on the Pybind wrapper. :-)
The text was updated successfully, but these errors were encountered: