From c802e5a39f7a33fd25453ea6fcee1aff1e9ac999 Mon Sep 17 00:00:00 2001 From: Dwight Gunning Date: Mon, 23 Nov 2026 10:50:03 -0500 Subject: [PATCH 1/2] ci(fast): install the cloud and data extras on the 3.13 leg 4 of the 9 fast-lane skips on main (run for 0cb92a15, the first with -rs) were tests that importorskip an optional extra CI never installed: fsspec (2, tests/storage/test_filesystem.py), zstandard (tests/storage/test_datamule_adapter.py) and duckdb (tests/reference/test_reference_company_dataset.py). They checked nothing on any run. The 3.13 leg, the one pull requests run, now installs `.[ai,cloud,data]`. The 3.11 floor leg keeps `.[ai]` so the library stays tested without the extras, and so does 3.15: zstandard 0.25.0 has no 3.15 wheel and would build from source there. Locally with the extras installed, the full fast suite gives 52,419 passed and 5 skipped (the 4 deliberate libxml2-recovery skips and an empty parameter set); the 4 extra-gated tests run and pass. The slow lane's duckdb test is left alone: with duckdb present it skips anyway, for want of SEC's bulk submissions download. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/python-hatch-workflow.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-hatch-workflow.yml b/.github/workflows/python-hatch-workflow.yml index 4bfec73dc..b6f4367f9 100644 --- a/.github/workflows/python-hatch-workflow.yml +++ b/.github/workflows/python-hatch-workflow.yml @@ -156,10 +156,20 @@ jobs: - name: Check the interpreter has the C decimal module run: python -c "import sys, _decimal; print(sys.version)" + # The 3.13 leg (the one pull requests run) also installs the `cloud` and + # `data` extras, so the tests that importorskip fsspec, duckdb and zstandard + # run instead of skipping: 4 of the 9 skips on 2026-11-22. The 3.11 floor + # leg keeps the bare `.[ai]` install, so the library is still tested + # without them. 3.15 does too: zstandard has no 3.15 wheel yet (0.25.0), and + # building it from source there is not what that leg is for. - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install -e ".[ai]" + if [ "${{ matrix.python-version }}" = "3.13" ]; then + python -m pip install -e ".[ai,cloud,data]" + else + python -m pip install -e ".[ai]" + fi python -m pip install pytest pytest-cov pytest-env pytest-xdist pytest-asyncio pytest-retry pytest-mock pytest-vcr "vcrpy>=8.3.0,<9" freezegun==1.5.1 filelock tqdm responses # The floor leg installs the declared pandas floor itself, so both majors From 0d1df19ac5c47758b6a63d30c90e25024128ed7b Mon Sep 17 00:00:00 2001 From: Dwight Gunning Date: Mon, 23 Nov 2026 12:57:40 -0500 Subject: [PATCH 2/2] ci(fast): pass the matrix version to the install step through env CodeFactor flagged `${{ matrix.python-version }}` expanded inside the install script as possible code injection. The value comes from the fixed matrix, so it was not exploitable, but reading it from an env variable keeps expressions out of shell source, as GitHub's hardening guide recommends. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/python-hatch-workflow.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-hatch-workflow.yml b/.github/workflows/python-hatch-workflow.yml index b6f4367f9..7f3441f8c 100644 --- a/.github/workflows/python-hatch-workflow.yml +++ b/.github/workflows/python-hatch-workflow.yml @@ -163,9 +163,11 @@ jobs: # without them. 3.15 does too: zstandard has no 3.15 wheel yet (0.25.0), and # building it from source there is not what that leg is for. - name: Install dependencies + env: + PYTHON_VERSION: ${{ matrix.python-version }} run: | python -m pip install --upgrade pip - if [ "${{ matrix.python-version }}" = "3.13" ]; then + if [ "$PYTHON_VERSION" = "3.13" ]; then python -m pip install -e ".[ai,cloud,data]" else python -m pip install -e ".[ai]"