Skip to content

Require Python 3.12 or newer - #100

Merged
gerlero merged 2 commits into
mainfrom
python
Aug 28, 2026
Merged

Require Python 3.12 or newer#100
gerlero merged 2 commits into
mainfrom
python

Conversation

@gerlero

@gerlero gerlero commented Aug 28, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Several newly added @override annotations are applied to members that are eqx.AbstractVar attributes in the base class (and some are ordered incorrectly with @property), which is likely to break static override-checking.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR raises the project’s minimum supported Python version to 3.12+ and updates the codebase to take advantage of newer typing features (PEP 695 type parameters and typing.override), while aligning CI to the new support window.

Changes:

  • Bump packaging metadata to requires-python = ">=3.12" and drop 3.10/3.11 from CI.
  • Adopt typing.override across several implementations to improve static override-checking.
  • Replace TypeVar-based generics with Python 3.12 type-parameter syntax in internal helpers.
File summaries
File Description
src/frontx/neural.py Adds typing.override usage for solution wrapper members.
src/frontx/models.py Marks model overrides with @override for static checking.
src/frontx/_inverse/param.py Migrates generics to PEP 695 type-parameter syntax.
src/frontx/_inverse/interpolated.py Adds @override markers for solution methods.
src/frontx/_inverse/fit.py Adds @override markers to scaled-solution wrappers.
src/frontx/_forward.py Adds @override markers to forward-solver solution API.
src/frontx/_boltzmann.py Migrates boltzmannmethod typing to PEP 695 type parameters.
pyproject.toml Updates Python requirement and related metadata.
.github/workflows/ci.yml Drops Python 3.10/3.11 from the CI matrix.
Review details

Suppressed comments (2)

src/frontx/_forward.py:76

  • Decorator order matters for type-checkers: with @override above @property, @override is applied to the property object rather than the function. Swap the decorators so @override decorates the function and @property wraps it.
    @override
    @property
    def b(self) -> jax.Array:

src/frontx/_forward.py:82

  • Decorator order matters for type-checkers: with @override above @property, @override is applied to the property object rather than the function. Swap the decorators so @override decorates the function and @property wraps it.
    @override
    @property
    def d_dob(self) -> jax.Array:
  • Files reviewed: 10/10 changed files
  • Comments generated: 6
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/frontx/neural.py
Comment thread src/frontx/_inverse/interpolated.py
Comment thread src/frontx/_inverse/fit.py
Comment thread src/frontx/_inverse/fit.py
Comment thread src/frontx/_forward.py
Comment thread src/frontx/_forward.py
@gerlero
gerlero merged commit 606d3d1 into main Aug 28, 2026
6 checks passed
@gerlero
gerlero deleted the python branch August 28, 2026 19:10
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.29730% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.55%. Comparing base (f9e3699) to head (f97b541).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/frontx/_inverse/param.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #100      +/-   ##
==========================================
+ Coverage   85.99%   86.55%   +0.55%     
==========================================
  Files          13       13              
  Lines         557      580      +23     
==========================================
+ Hits          479      502      +23     
  Misses         78       78              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants