Skip to content

SNOW-3243341: Python e2e tests for pyarrow and pandas support#625

Open
sfc-gh-asolarski wants to merge 2 commits intomainfrom
03-19-snow-3243341_python_e2e_tests_for_pyarrow_and_pandas_support
Open

SNOW-3243341: Python e2e tests for pyarrow and pandas support#625
sfc-gh-asolarski wants to merge 2 commits intomainfrom
03-19-snow-3243341_python_e2e_tests_for_pyarrow_and_pandas_support

Conversation

@sfc-gh-asolarski
Copy link
Collaborator

@sfc-gh-asolarski sfc-gh-asolarski commented Mar 19, 2026

TL;DR

Refactored Python CI workflow to support separate testing of pandas and non-pandas functionality, added pandas/pyarrow optional dependencies, and created dedicated pandas test modules.

What changed?

  • CI Workflow Changes: Replaced YAML anchors with explicit matrix configurations that include extras dimension (no-extras, pandas) to run tests with and without pandas dependencies
  • Dependency Management: Added pandas and pyarrow optional dependencies to pyproject.toml with version constraints based on Python version
  • Test Environment Setup: Created separate Hatch environments (test and test-pandas) with different dependency sets and test scopes
  • Test Organization: Added new tests/e2e/pandas/ directory with pandas-specific tests for Arrow and pandas fetch methods
  • Cache Strategy: Updated UV cache keys to include the extras dimension for proper dependency isolation
  • Reference Testing: Extended reference testing to support both pandas and non-pandas configurations

How to test?

  1. Run the standard test suite: hatch run test.py3.12:cov
  2. Run pandas-specific tests: hatch run test-pandas.py3.12:cov
  3. Verify CI matrix runs both configurations by checking GitHub Actions workflow
  4. Test optional dependency installation: pip install -e .[pandas] or pip install -e .[pyarrow]

Why make this change?

This change enables proper testing of pandas/pyarrow functionality while maintaining compatibility for users who don't need these heavy dependencies. It separates concerns by isolating pandas-specific tests and ensures the CI pipeline validates both usage patterns, preventing regressions in either scenario.

Copy link
Collaborator Author

sfc-gh-asolarski commented Mar 19, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge_queue - adds this PR to the back of the merge queue
  • priority_merge_queue - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@sfc-gh-asolarski sfc-gh-asolarski marked this pull request as ready for review March 19, 2026 12:23
@sfc-gh-asolarski sfc-gh-asolarski requested a review from a team as a code owner March 19, 2026 12:23
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_python_e2e_tests_for_pyarrow_and_pandas_support branch 4 times, most recently from d9f0a20 to f1cda44 Compare March 19, 2026 13:58
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_python_e2e_tests_for_pyarrow_and_pandas_support branch from aaa3c37 to 3a201f9 Compare March 20, 2026 09:16
@sfc-gh-pczajka sfc-gh-pczajka changed the base branch from pczajka/gcs-cicd to graphite-base/625 March 20, 2026 09:58
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_python_e2e_tests_for_pyarrow_and_pandas_support branch from 3a201f9 to 6b7f846 Compare March 20, 2026 10:09
@sfc-gh-asolarski sfc-gh-asolarski changed the base branch from graphite-base/625 to pczajka/gcs-cicd March 20, 2026 10:09
@sfc-gh-asolarski sfc-gh-asolarski changed the base branch from pczajka/gcs-cicd to graphite-base/625 March 20, 2026 13:10
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_python_e2e_tests_for_pyarrow_and_pandas_support branch from 6b7f846 to 8ecee48 Compare March 20, 2026 13:10
@sfc-gh-asolarski sfc-gh-asolarski changed the base branch from graphite-base/625 to main March 20, 2026 13:10
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_python_e2e_tests_for_pyarrow_and_pandas_support branch from 8ecee48 to a514d83 Compare March 20, 2026 13:21
fail-fast: false
matrix:
include:
- os: ubuntu-latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need as many jobs? I'd keep "pandas/no-extras" for 3.9 and 3.13, then juto do alternating "pandas/no-extras" for the rest

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thing is "test-pandas" is a very small suit just for testing integration with pandas (other e2e test are not executed when using this env, and not unit tests are executed).

So, we run whole test suite on different envs and additionally for 3 envs (py3.9 - smallest, py3.13 - reference, py3.14 - highest) we verify just pandas integration (rest of the tests is not re-executed, so those 3 jobs are rather tiny).

extras: "no-extras"
hatch_env: "test"
# Reference combination — keep in sync with REFERENCE_* env vars above
- os: ubuntu-latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the value of no-pandas reference test? How about just doing the pandas one?

Copy link
Collaborator Author

@sfc-gh-asolarski sfc-gh-asolarski Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As explained above, pandas test is just about this single feature, the rest goes through the usual flow.

So, here we also need two flows for separate coverage reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants