Skip to content

Update to flit 4 - #7524

Open
danielhollas wants to merge 5 commits into
aiidateam:mainfrom
danielhollas:flit4
Open

Update to flit 4#7524
danielhollas wants to merge 5 commits into
aiidateam:mainfrom
danielhollas:flit4

Conversation

@danielhollas

@danielhollas danielhollas commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

The main advantage support for PEP-794 (quoting from flit 4 CHANGELOG

The new Import-Name and Import-Namespace metadata fields (metadata 2.5) are now supported (PR #774). In most cases no new input is required, as Flit will create this metadata automatically.

Test plan

I checked the output of uvx flit@4.0.2 build and uvx flit@3.12 build, specifically checking the RECORD and METADATA wheel files

diff -w RECORD ../../dist-flit4/aiida_core-2.9.0.dev0.dist-info/RECORD 
646a647
> aiida_core-2.9.0.dev0.dist-info/licenses/AUTHORS.txt,sha256=a0eikdCV3Hw-90ILnCoPMKjoMOao0AX3cGSW5xClkdQ,1746
648,649c649,650
< aiida_core-2.9.0.dev0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
< aiida_core-2.9.0.dev0.dist-info/METADATA,sha256=11GDgjC9bRuUarX4SXzPRGVM5e5slL_awUbAbKUl5ug,12192
---
> aiida_core-2.9.0.dev0.dist-info/WHEEL,sha256=_yMHPaBV-s6fQMwUoo83NSdTCM3c8xXWFXRhqafN-7Y,81
> aiida_core-2.9.0.dev0.dist-info/METADATA,sha256=Sl0Q1GkgkEsYBMXzANcQXMpV27L_LjvP9SkPvM0NaWs,12237
aiida-core/dist/aiida_core-2.9.0.dev0.dist-info on  flit4 [!?] diff -w METADATA ../../dist-flit4/aiida_core-2.9.0.dev0.dist-info/METADATA 
1c1
< Metadata-Version: 2.4
---
> Metadata-Version: 2.5
20a21
> License-File: AUTHORS.txt
128a130
> Import-Name: aiida

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The project now requires Flit 4.0.2 or later and below version 5. The release workflows install Flit 4.x. The plugin tutorial reflects the updated flit_core requirement.

Changes

Packaging and release configuration

Layer / File(s) Summary
Build requirements and plugin documentation
pyproject.toml, docs/source/howto/plugin_codes.rst
The Flit build requirement now requires versions from 4.0.2 to below 5. The tutorial allows flit_core versions below 5.
PyPI publishing requirements
.github/workflows/release.yml
The PyPI and TestPyPI jobs now install Flit 4.x.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: geigerj2, agoscinski

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: updating the project to Flit 4.
Description check ✅ Passed The description explains the Flit 4 update, its PEP 794 benefits, and the validation performed against generated wheel metadata.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.67%. Comparing base (299e945) to head (bd78088).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7524      +/-   ##
==========================================
- Coverage   80.68%   80.67%   -0.01%     
==========================================
  Files         581      581              
  Lines       47068    47068              
==========================================
- Hits        37972    37966       -6     
- Misses       9096     9102       +6     

☔ 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.

Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pyproject.toml`:
- Line 3: Update the requires build dependency in pyproject.toml to set the Flit
Core lower bound to version 4 while retaining the existing upper bound of 5.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f125a7fe-b06d-4c89-afcd-a0e00abc7a1a

📥 Commits

Reviewing files that changed from the base of the PR and between 8a2747e and 1b6638e.

📒 Files selected for processing (3)
  • .github/workflows/release.yml
  • docs/source/howto/plugin_codes.rst
  • pyproject.toml

Comment thread pyproject.toml Outdated
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@danielhollas

Copy link
Copy Markdown
Collaborator Author

Flit v4 is not available on conda-forge yet se we might want to hold off merging this for now.

@agoscinski

Copy link
Copy Markdown
Collaborator

I opened PR #7529 to include the fixes to our sdist. There were a lot of files that should not be part of sdist

@danielhollas

Copy link
Copy Markdown
Collaborator Author

flit 4.0 is not on conda-forge so this can be merged

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pyproject.toml (1)

3-3: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Align the plugin tutorial with the current Flit build contract.

pyproject.toml requires flit_core >=4.0.2,<5, while docs/source/howto/plugin_codes.rst still publishes flit_core >=3.4,<5. Use the same lower bound in the tutorial, or add explicit compatibility guidance for the separate range.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pyproject.toml` at line 3, Update the Flit dependency declaration in the
plugin tutorial to use the same lower bound as the pyproject.toml requires
entry, changing the documented range to flit_core >=4.0.2,<5 and keeping the
tutorial aligned with the current build contract.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@pyproject.toml`:
- Line 3: Update the Flit dependency declaration in the plugin tutorial to use
the same lower bound as the pyproject.toml requires entry, changing the
documented range to flit_core >=4.0.2,<5 and keeping the tutorial aligned with
the current build contract.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 11a5cde6-442b-4a0e-8a54-b2982cdd3d2e

📥 Commits

Reviewing files that changed from the base of the PR and between 5418a98 and bd78088.

📒 Files selected for processing (1)
  • pyproject.toml

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