Skip to content

Conversation

@leoll2
Copy link
Contributor

@leoll2 leoll2 commented Jan 13, 2026

Summary

This PR enables Pyrefly as a static type checker for the Python code in Geti Tune (application), replacing mypy.
CI workflows and pre-commit checks are updated accordingly.

Resolves #5169

How to test

Checklist

  • The PR title and description are clear and descriptive
  • I have manually tested the changes
  • All changes are covered by automated tests
  • All related issues are linked to this PR (if applicable)
  • Documentation has been updated (if applicable)

@leoll2 leoll2 self-assigned this Jan 13, 2026
@leoll2 leoll2 requested a review from a team as a code owner January 13, 2026 13:45
Copilot AI review requested due to automatic review settings January 13, 2026 13:45
@leoll2 leoll2 requested a review from a team as a code owner January 13, 2026 13:45
@github-actions github-actions bot added DEPENDENCY Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM TEST Any changes in tests BUILD Geti Tune Backend Issues related to Geti Tune backend labels Jan 13, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces mypy with Pyrefly as the static type checker for the Geti Tune application backend. The change updates CI workflows and pre-commit configurations, while adding Pyrefly-specific type ignore comments throughout the codebase to address type checking issues identified by the new tool.

Changes:

  • Replaced mypy with Pyrefly (~0.46.3) in project dependencies and configurations
  • Added Pyrefly ignore comments to address type checking issues across multiple files
  • Removed redundant null-checking tests and simplified type annotations
  • Updated model definitions to support better type inference with generics

Reviewed changes

Copilot reviewed 36 out of 37 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
application/backend/pyproject.toml Replaced mypy dependency with Pyrefly and updated configuration
.github/workflows/backend-lint-and-test.yaml Updated CI workflow to use Pyrefly instead of mypy
application/backend/.pre-commit-config.yaml Updated pre-commit hooks to use Pyrefly
application/backend/app/utils/visualization.py Added type generics and Pyrefly ignore comments
application/backend/app/core/jobs/models/job.py Introduced JobParamsT TypeVar for better type safety
application/backend/app/models/dataset_item.py Changed subset field default from nullable to UNASSIGNED
application/backend/tests/unit/test_visualization.py Removed redundant null-checking tests
Multiple service and API files Added Pyrefly ignore comments for type checking issues

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link

github-actions bot commented Jan 13, 2026

📊 Test coverage report

Metric Coverage
Lines 37.4%
Functions 33.5%
Branches 85.9%
Statements 37.4%

@github-actions
Copy link

github-actions bot commented Jan 13, 2026

Docker Image Sizes

CPU

Image Size
geti-tune-cpu:pr-5178 2.94G
geti-tune-cpu:sha-ac94bfb 2.94G

GPU

Image Size
geti-tune-gpu:pr-5178 10.72G
geti-tune-gpu:sha-ac94bfb 10.72G

XPU

Image Size
geti-tune-xpu:pr-5178 8.79G
geti-tune-xpu:sha-ac94bfb 8.79G

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BUILD DEPENDENCY Any changes in any dependencies (new dep or its version) should be produced via Change Request on PM Geti Tune Backend Issues related to Geti Tune backend TEST Any changes in tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch from mypy to pyrefly in Geti Tune backend

4 participants