Closed
Description
#750 added python
wrappers instead of directly exposing pyo3
generated code.
We should leverage that to clean up and improve the rust codebase by:
- Letting
python
wrappers handle any aliases. - Letting
python
wrappers handle any argument defaults, removing#[pyo3(signature(...))]
annotations from the Rust codebase
Additionally, we should provide guidance so that contributors understand the separation.
@timsaucer recommends the following guidelines (and I agree):
I think it's worth adding some guidance about what to put in python vs what to put in rust for this repo. In my mind the things that should go into the python side are
* Trivial aliases (this is a good example) * Simple type conversion, like path -> string of the path or number to lit(number) * More complex type conversion if it makes sense to do in python. For example, in the named_struct where sending in a dictionary on the python side makes a lot more sense and isn't as simple to do via pyo3.
And then I'd lean towards everything else sitting on the rust side.
Metadata
Metadata
Assignees
Labels
No labels