raulcd commented on code in PR #48618: URL: https://github.com/apache/arrow/pull/48618#discussion_r2687800226
########## ci/scripts/python_wheel_xlinux_build.sh: ########## @@ -167,6 +167,11 @@ export ARROW_HOME=/tmp/arrow-dist export CMAKE_PREFIX_PATH=/tmp/arrow-dist pushd /arrow/python +# We first populate stub docstrings and then build the wheel +python setup.py build_ext --inplace +python -m pip install griffe libcst +python ../dev/update_stub_docstrings.py pyarrow-stubs Review Comment: this will fail, right? this file isn't present on the current PR so our wheels will start failing to build if we merge as is? I'll run archery just to validate ########## docs/source/developers/python/development.rst: ########## @@ -42,7 +42,7 @@ Unit Testing ============ We are using `pytest <https://docs.pytest.org/en/latest/>`_ to develop our unit -test suite. After `building the project <build_pyarrow>`_ you can run its unit tests +test suite. After `building the project <building.html>`_ you can run its unit tests Review Comment: shouldn't `build_pyarrow` be an alias for the `buildint.rst` file? https://github.com/apache/arrow/blob/d54a2051cf9020a0fdf50836420c38ad14787abb/docs/source/developers/python/building.rst#L20 ########## ci/scripts/python_test_type_annotations.sh: ########## @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -ex +pyarrow_dir=${1} + Review Comment: Can we add the virtualenv activation in case of `ARROW_PYTHON_VENV` present? This is a pattern we use on lots of our sh scripts. ``` if [ -n "${ARROW_PYTHON_VENV:-}" ]; then . "${ARROW_PYTHON_VENV}/bin/activate" fi ``` ########## ci/scripts/python_test_type_annotations.bat: ########## @@ -0,0 +1,38 @@ +@rem Licensed to the Apache Software Foundation (ASF) under one +@rem or more contributor license agreements. See the NOTICE file +@rem distributed with this work for additional information +@rem regarding copyright ownership. The ASF licenses this file +@rem to you under the Apache License, Version 2.0 (the +@rem "License"); you may not use this file except in compliance +@rem with the License. You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, +@rem software distributed under the License is distributed on an +@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@rem KIND, either express or implied. See the License for the +@rem specific language governing permissions and limitations +@rem under the License. + +@echo on + +set PYARROW_DIR=%1 + +echo Annotation testing on Windows ... + +@REM Install library stubs +%PYTHON_CMD% -m pip install pandas-stubs scipy-stubs sphinx types-cffi types-psutil types-requests types-python-dateutil || exit /B 1 + +@REM Install other dependencies for type checking Review Comment: Can we add a note on why `fsspec` is necessary? Is this a requirement for other dependencies? ########## ci/scripts/python_wheel_validate_contents.py: ########## @@ -35,6 +35,11 @@ def validate_wheel(path): assert not outliers, f"Unexpected contents in wheel: {sorted(outliers)}" print(f"The wheel: {wheels[0]} seems valid.") + candidates = [info for info in f.filelist if info.filename.endswith('compute.pyi')] Review Comment: Won't this fail also? I don't think we are able to generate those, see the other comment about the missing `dev/update_stub_docstrings.py` ```suggestion # Validate at least one typing stub has been generated. candidates = [info for info in f.filelist if info.filename.endswith('compute.pyi')] ``` -- 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]
