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

There should be a Python component to the oxmol wrapper #2

Open
thesketh opened this issue May 22, 2020 · 2 comments
Open

There should be a Python component to the oxmol wrapper #2

thesketh opened this issue May 22, 2020 · 2 comments

Comments

@thesketh
Copy link
Owner

At present, oxmol is a bare wrapper over molecule.rs. There should be a Python component to the wrapper, for three primary reasons:

  • it will be much neater to handle errors on the Python side than on the Rust side, where to declare new error types we need to handle the GIL.
  • The .so file generated with PyO3 doesn't provide us with a real package - we have a module which contains modules. This generates strange errors when trying to run e.g. import oxmol.spec.
  • oxmol should eventually be listed on PyPI, and this is easier where we have the directory structure of a Python project
@thesketh thesketh changed the title We need a Python component to the oxmol wrapper There should be a Python component to the oxmol wrapper May 22, 2020
@thesketh
Copy link
Owner Author

RE: the three points:

  • This is complicated by the fact that it's not possible to properly subclass the PyO3 classes, I'm unable to catch the errors from within Python. The error handling will have to be improved on the Rust side.
  • This has been fixed by introducing the Python wrapper (and using Maturin for the build process)
  • Done.

@thesketh
Copy link
Owner Author

I think PyO3/pyo3#947 needs to be resolved before I can make further progress on error and iterator handling.

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

No branches or pull requests

1 participant