From 3a8ba88a3b5c78d19ec3b61047e0bb23981dbee5 Mon Sep 17 00:00:00 2001 From: ibrahimmaq14 Date: Fri, 27 Nov 2026 11:38:11 +0530 Subject: [PATCH] GH-55676: [Python][CI] Run type annotation checks independently Run the stub check script after building PyArrow in its own Conda Python job. Keep pandas available for runtime stub tests and preserve the existing documentation checks. Generated-by: OpenAI Codex --- .github/workflows/python.yml | 5 +++++ compose.yaml | 19 +++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index e935bd577252..bbd9e9c446a7 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -66,6 +66,7 @@ jobs: matrix: name: - conda-python-docs + - conda-python-type-annotations - conda-python-3.12-nopandas - conda-python-3.11-pandas-2.2.2-numpy-2.0.2 - conda-python-3.14-pandas-latest @@ -75,6 +76,10 @@ jobs: image: conda-python-docs title: AMD64 Conda Python 3.12 Sphinx & Numpydoc python: "3.12" + - name: conda-python-type-annotations + image: conda-python-type-annotations + title: AMD64 Conda Python 3.12 Type Annotations + python: "3.12" - name: conda-python-3.12-nopandas image: conda-python title: AMD64 Conda Python 3.12 Without Pandas diff --git a/compose.yaml b/compose.yaml index a7831dbd9f93..b9534e6a9a79 100644 --- a/compose.yaml +++ b/compose.yaml @@ -132,6 +132,7 @@ x-hierarchy: - conda-python-hdfs - conda-python-no-numpy - conda-python-spark + - conda-python-type-annotations - conda-verify-rc - cpp-jni - debian-cpp: @@ -963,6 +964,21 @@ services: /arrow/ci/scripts/python_build.sh /arrow /build && /arrow/ci/scripts/python_test.sh /arrow"] + conda-python-type-annotations: + # Usage: + # archery docker run conda-python-type-annotations + # Install pandas for the runtime stub tests that exercise pandas conversion. + image: ${REPO}:${ARCH_SHORT}-conda-python-${PYTHON} + environment: + <<: [*common, *ccache, *sccache] + volumes: *conda-volumes + command: + [" + /arrow/ci/scripts/cpp_build.sh /arrow /build && + /arrow/ci/scripts/python_build.sh /arrow /build && + pip install pandas && + /arrow/ci/scripts/python_test_type_annotations.sh /arrow/python"] + conda-python-emscripten: # Usage: # docker compose build conda-python-emscripten @@ -1557,8 +1573,7 @@ services: /arrow/ci/scripts/python_build.sh /arrow /build && pip install -e /arrow/dev/archery[numpydoc] && archery numpydoc --allow-rule GL10,PR01,PR03,PR04,PR05,PR10,RT03,YD01 && - /arrow/ci/scripts/python_test.sh /arrow && - /arrow/ci/scripts/python_test_type_annotations.sh /arrow/python"] + /arrow/ci/scripts/python_test.sh /arrow"] conda-python-dask: # Possible $DASK parameters: