Skip to content

PLAT-9463: Fix the Python CI (Python 3.9 runner and schema command) - #57

Open
FelipeG2000 wants to merge 1 commit into
veryfi:masterfrom
andresgarcia-veryfi:feature/PLAT-9463_fix-ci
Open

FelipeG2000 wants to merge 1 commit into
veryfi:masterfrom
andresgarcia-veryfi:feature/PLAT-9463_fix-ci

Conversation

@FelipeG2000

Copy link
Copy Markdown

What

The Test workflow is red on every PR, for two reasons that have nothing to do with the code under review:

  • ubuntu-latest is now Ubuntu 26.04, which has no Python 3.9. The failed 3.9 job cancels the rest of the matrix, so tests never run. The workflow now runs on ubuntu-24.04, which still has 3.9 to 3.13.
  • Typer 0.29 ships its own copy of click and no longer installs it. veryfi schema used import click and param.type, so it crashed and test_cli failed, which also left coverage under the 75% gate. It now reads Typer's command and parameter objects by duck typing, so it works with both old and new Typer.

Tests

  • Same steps as the workflow (coverage run -m pytest tests, coverage report) on Python 3.11: 62 tests pass and coverage is 75.71%. Before, test_cli failed and coverage was 73.65%.
  • The same 62 tests also pass with typer==0.12.5 and click installed, so the change is backward compatible.
  • black --check is clean. I could not run the 3.9 job here, so it is only confirmed once this PR's checks run.

🤖 Generated with Claude Code

- Run the Test workflow on ubuntu-24.04: ubuntu-latest is now 26.04, which
  has no Python 3.9, and the failed job cancels the rest of the matrix.
- Make `veryfi schema` read Typer's command and parameter objects by duck
  typing. Newer Typer ships its own copy of click, so `import click` and
  `param.type` no longer work, which broke test_cli and left coverage under
  the 75% gate.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

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.

2 participants