timsaucer commented on PR #750: URL: https://github.com/apache/datafusion-python/pull/750#issuecomment-2220507454
It's a well made point @datapythonista and maintainability is definitely a concern. I would argue that going with a `.pyi` file approach is **worse** for maintainability than what I am proposing here. My reasoning is that if there is a change made to an underlying function or parameters on the rust side, then there is no validation that the associated `.pyi` files get updated. With the wrapper functions, the python unit tests _may_ catch those changes. What I'm really trying to address is a concern from users that the `datafusion-python` project doesn't feel "pythonic". I was hoping this approach would give 3 things 1. Documentation flushed out for all exposed classes and functions. As you correctly point out that could be done on the rust side with pyo3. 2. Type hinting. This cannot be done with pyo3 due to a hard limit on the C api for python. The existing work around is the `.pyi` files. This is important to a lot of users, especially those just starting out. 3. User friendly location for investigating the available functions and classes. A user _can_ find the available functions and classes within python by calling `help(datafusion)` or `dir`. They can also look at the online documentation. However, there are still many who prefer to have the python code laid out for their viewing. This is my reasoning. If the community prefers to go the route of not adding type hinting (or go with pyi approach) I'm willing to move things over to a different location. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org