raulcd commented on code in PR #47609:
URL: https://github.com/apache/arrow/pull/47609#discussion_r2480791916


##########
.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

Review Comment:
   This is currently installing pyarrow from the nightlies, as part of CI we 
should test the pyarrow version on the PR / commit / branch.
   On this job pyarrow is built via archery on a docker container, it won't be 
available outside the container. We might want to add a new job only for 
running type checking where the docker container also runs the type checking or 
add it to this jobs `archery docker run`, we can probably drive the check with 
an environment variable and run this directly on `ci/scripts/python_test.sh`.



##########
.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:
   Is the `update_stub_docstrings.py` something:
   - devs should run before pushing or via commit hook
   - CI should run on every PR
   - something we should run when building sdist/wheels
   - part of the release process
   
   It's not clear to me.



-- 
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