Skip to content

ci: harden CI across supported Python versions - #88

Merged
adaumsilva merged 2 commits into
adaumsilva:mainfrom
sanjana658:fix/ci-hardening-49
Oct 5, 2026
Merged

adaumsilva merged 2 commits into
adaumsilva:mainfrom
sanjana658:fix/ci-hardening-49

Conversation

@sanjana658

Copy link
Copy Markdown

Summary

Closes #49

Harden the CI pipeline across all supported Python versions and enforce
linting, formatting, type checking, coverage, and PDF dependency coverage.

Changes

  • Expand the test matrix from Python 3.10–3.12 to 3.10–3.14
  • Add CI concurrency cancellation for superseded runs
  • Add a dedicated lint and formatting job
  • Run Ruff, Black, and isort across the repository
  • Run mypy on Python 3.10 and 3.14
  • Install the PDF extra in CI
  • Add a real pypdf-based PDF loader test
  • Enforce a 93% coverage floor
  • Update Python classifiers and Black/Ruff targets
  • Fix existing Black formatting issues surfaced by the wider CI checks

Validation

  • 307 tests passed
  • Coverage: 94.45%
  • Ruff: passed
  • Black: passed
  • isort: passed
  • git diff --check: passed

@sanjana658

Copy link
Copy Markdown
Author

Hi @adaumsilva, the CI hardening changes for #49 are ready for review. All local validation passes, including 307 tests and 94.45% coverage. Thanks!

@adaumsilva adaumsilva left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for expanding the CI coverage @sanjana658 ! The matrix, formatting checks, coverage floor, and real-PDF test are useful additions. Two compatibility issues need fixing:

  1. Keep Ruff’s target at py310. The package still supports Python 3.10, so Ruff should target the minimum supported version. With py314, it suggests incompatible changes such as replacing datetime.timezone.utc with datetime.UTC. It also breaks the existing pre-commit hooks: the pinned Ruff v0.4.10 fails to parse py314, so neither Ruff hook can run.

  2. Skip the real-PDF test when the optional dependency is absent. test_pdf_loader_loads_real_pdf imports pypdf unconditionally, causing failure with the documented .[dev] setup. Use pytest.importorskip("pypdf") in this test. CI explicitly installs [pdf], so it will still exercise the real integration.

All eight CI checks pass, and all 22 loader tests pass with pypdf installed. I reproduced the configuration error using the pinned Ruff version and the test failure with pypdf unavailable.

Please address these two points before merging.

@sanjana658

Copy link
Copy Markdown
Author

Addressed both requested compatibility fixes:

  • Restored Ruff target to py310 for compatibility with the minimum supported Python version and pinned pre-commit Ruff.
  • Added pytest.importorskip("pypdf") to the real PDF integration test so it is skipped when the optional dependency is unavailable.

Validation:

  • Ruff: passed
  • Black: passed
  • Loader tests: 22 passed
  • Full test suite: 307 passed
  • Coverage: 94.45%
  • git diff --check: passed

Ready for re-review. Thanks!

@adaumsilva adaumsilva left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for addressing both requested changes! I verified that the pinned Ruff version works with the restored Python 3.10 target, and the real-PDF test now skips correctly when pypdf is unavailable while passing when installed.

All 22 loader tests pass locally, and no blocking issues remain. Approved—please wait for the remaining Python 3.10 CI job to pass before merging.

@adaumsilva
adaumsilva merged commit eb8c22b into adaumsilva:main Oct 5, 2026
8 checks passed
@adaumsilva

Copy link
Copy Markdown
Owner

Thanks for the contribution @sanjana658 Good job! PR Merged. Remember to star the repo if you didn't yet.

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.

CI hardening: Python 3.13/3.14, format checks, lint tests/, mypy on all versions, coverage floor

2 participants