Skip to content

Build: Move type checking and test suites to tox - #4494

Open
oresttokovenko wants to merge 2 commits into
apache:mainfrom
oresttokovenko:tox-typecheck-and-tests
Open

oresttokovenko wants to merge 2 commits into
apache:mainfrom
oresttokovenko:tox-typecheck-and-tests

Conversation

@oresttokovenko

@oresttokovenko oresttokovenko commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What

This PR moves mypy type checking and the test suites out of Makefile and .pre-commit-config.yaml into a dedicated tox.toml, backed by tox-uv-bare (uv-venv-lock-runner) and PEP 735 [dependency-groups] in pyproject.toml. Makefile stays for setup, linting, docs, interactive notebooks, and clean; prek stays for formatting and fast linters.

  • Adds tox.toml with default env_list (typecheck and test-3.11–test-3.14) plus unit, integration, s3, adls, gcs, notebook, and coverage
  • Adds PEP 735 [dependency-groups] (lint, tox, types, coverage) in pyproject.toml and updates uv.lock, so every tox environment installs strictly from uv.lock
  • Removes mirrors-mypy from .pre-commit-config.yaml
  • Removes test/coverage targets from Makefile (retaining install*, lint, check-license, docs-*, notebook*, clean)
  • Updates .github/workflows/python-ci.yml, .github/workflows/python-integration.yml, dev/release/verify_rc.sh, MANIFEST.in, dev/.rat-excludes, AGENTS.md, mkdocs/docs/contributing.md, and mkdocs/docs/verify-release.md

Why

Following the Nov 24 community sync, this scopes the tooling cleanup down from #4208 to just testing and type checking using tox (rather than replacing Makefile and prek wholesale with nox and just).

Previously, test and type-checking logic was split across Makefile, .pre-commit-config.yaml, and the CI workflows:

  • mirrors-mypy pinned mypy and its types-* stubs outside pyproject.toml/uv.lock, so Dependabot's uv ecosystem did not bump them and local uv run could not reproduce the isolated CI mypy environment
  • CI duplicated platform workarounds (such as --no-extra hive-kerberos on Windows) and uv sync/pytest/coverage invocations across workflows and Makefile
  • With tox.toml + uv-venv-lock-runner, CI and local runs invoke the same environments with the same locked dependencies from uv.lock, and typecheck runs as its own fast job instead of hiding behind matrix.python == '3.11'

Where the old recipes and checks live now

Old command / hook Command now
mirrors-mypy (prek) uv run tox -e typecheck
make test uv run tox -e unit (or uv run tox -p for 3.11–3.14)
make test PYTEST_ARGS="..." uv run tox -e unit -- ...
make test-integration uv run tox -e integration (KEEP_COMPOSE=1 to keep containers up)
make test-s3 / test-adls / test-gcs uv run tox -e s3 / adls / gcs
make test-notebook uv run tox -e notebook
make coverage-report uv run tox -e coverage
make test-coverage COVERAGE=1 uv run tox -e unit,integration,s3,adls,gcs,coverage

make install, make lint, make check-license, make docs-serve, make docs-build, make notebook, make notebook-infra, and make clean remain in Makefile

Tests

  • uv lock --check passed
  • COVERAGE=1 COVERAGE_FAIL_UNDER=0 uv run --locked --only-group tox tox run -r -e typecheck,test-3.13,coverage -- tests/avro/test_decoder.py passed (typecheck: 0 issues across 222 files; test-3.13: 68 passed; coverage: combined and reported)
  • uv run --locked --only-group tox tox run --notest -e unit synced cleanly from uv.lock
  • uv run --locked --only-group lint prek run -a passed all 10 remaining hooks
  • zizmor reported 0 findings on .github/workflows/python-ci.yml and .github/workflows/python-integration.yml

This branch has not been deployed

No deployments
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.

1 participant