krcrouse opened a new pull request, #13126:
URL: https://github.com/apache/arrow/pull/13126

   This PR addresses both the JIRA issue cited (pre-generate pyarrow.compute) 
and also a dev thread that suggests creating the ability to add in python docs 
for functions that inherit from the Arrow C++ would greatly improve the 
readability for python users.
   
   There are still a few things to work out, such as where in the build process 
to generate the code and whether a version of the generated code should be 
checked into version control or not, but @pitrou suggested opening the PR to 
field comments from developers.  
   
   Major points:
   
   - creates `python/docs/additions` tree where the reStructrued text docs that 
include the sections to overwrite. Using raw reSt so that code block examples 
can be tested using doctest - see the README for more verbose details
   - `pyarrow.docutils` (or maybe should be _docutils) provides functions to 
processes `python/docs/additions` and return a data structure of the components 
per function.
   - `python/scripts/generate_sources.py` uses `pyarrow.docutils` and writes 
out the code for the compute functions in `pyarrow/generated/compute.py`. All 
of the logic from the release-branch `pyarrow.compute` module that dynamically 
generated the compute functions has been moved to this script.
   - I didn't check the generated file into the repo because I generally do not 
include generated files that would be generated by the build process should be 
in source control, but I realize there are other perspectives on this
   - `pyarrow.compute` now imports from `pyarrow.generated.compute` for all of 
the autogenerated compute bindings. Override and custom functions are still 
defined here.
   - The old `pyarrow._compute_docstrings` is gone because its purpose is 
subsumed in the above.
   - I've updated the tests so that they work with the above changes.  
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to