rok commented on code in PR #47609:
URL: https://github.com/apache/arrow/pull/47609#discussion_r2511703752
##########
.github/workflows/python.yml:
##########
@@ -138,6 +138,17 @@ jobs:
continue-on-error: true
run: archery docker push ${{ matrix.image }}
+ - name: Type check with mypy and pyright
+ run: |-
+ python -m pip install mypy pyright ty griffe libcst pytest
hypothesis fsspec scipy-stubs pandas-stubs types-python-dateutil types-psutil
types-requests griffe libcst sphinx types-cffi
+ pip install -i
https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pyarrow
+ cd python
+ mypy
+ pyright
+ ty check
+ cd ..
+ python ./dev/update_stub_docstrings.py -f ./python/pyarrow-stubs
Review Comment:
`update_stub_docstrings.py` should run just prior wheel-build-time. See
https://github.com/apache/arrow/pull/47609/commits/03bdf10eb30da3ac3b9fb6e8133aed45c5163201
for how I imagine wheel that would look like. Please note:
* pyarrow must be built before packaging the wheel so docstrings of dynamic
symbols become available and can be inserted into stubfiles
* this also adds a test that checks that packaged wheel includes one of the
stub files (`compute.pyi`) and that at least one of it symbols is annotated
with a doscstring.
I've also added docs to
[development.rst](https://github.com/apache/arrow/blob/00047e4caa4cf080080c32c5e10326ee2afec471/docs/source/developers/python/development.rst#maintaining-type-stubs)
but they may be too sparse. Please check.
--
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]