Skip to content

CI: test the supported Python range, and run ruff + mypy #42

Description

@rohan-hotdata

CI currently runs a single job — pytest on Python 3.12 only. Two gaps worth closing.

1. Test the supported Python range

pyproject.toml declares requires-python = ">=3.10", but .github/workflows/ci.yml pins one version with no matrix:

- name: Set up Python
  run: uv python install 3.12

So neither end of the supported range is exercised: 3.10 and 3.11 are untested, and local development is currently on 3.14.6 (what uv resolves by default), which CI never sees either. Worth a matrix over 3.10–3.12 at minimum, and probably 3.13/3.14 too since that is what the code is actually being written against.

Low but non-zero risk today — the package uses from __future__ import annotations throughout and X | None syntax, so 3.10 compatibility is plausible but unverified.

2. Run ruff and mypy in CI

Both are dev dependencies and both are configured ([tool.ruff.lint] with a decent rule selection, [tool.mypy] with strict = true), but neither runs in CI. Lint and type regressions can land on main freely.

Blocker to be aware of for mypy: there are currently 18 pre-existing errors, all no-untyped-def (missing return annotations) in test files:

tests/test_update_changelog.py
tests/test_tools.py
tests/test_package.py
tests/conftest.py

Package source (hotdata_langchain/) is clean. So adding mypy to CI needs those test annotations added first, or a baseline — it cannot just be switched on. Ruff passes clean today and can be added immediately.

Context

Worth doing, not urgent — filed after a deliberate decision to prioritise capability work while the package has no external consumers. The gap became visible while validating the hotdata-framework 0.9.0 bump (#35): its green check covered 24 tests on one Python version and none of them touched upload_parquet, the one function whose internals actually changed. The 0.4.1 breakage it fixed was found by running against the live engine, not by CI — so this is about catching regressions cheaply, not about replacing live verification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    toolingCI, lint, types, release plumbing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions