Skip to content

fix(build): migrate to stable dynamic metadata API#5769

Merged
wanghan-iapcm merged 1 commit into
deepmodeling:masterfrom
njzjz-bot:fix/stable-dynamic-metadata
Jul 12, 2026
Merged

fix(build): migrate to stable dynamic metadata API#5769
wanghan-iapcm merged 1 commit into
deepmodeling:masterfrom
njzjz-bot:fix/stable-dynamic-metadata

Conversation

@njzjz-bot

@njzjz-bot njzjz-bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary:

  • migrate project metadata configuration to the standard [[tool.dynamic-metadata]] interface introduced in scikit-build-core 1.0
  • update the in-tree metadata provider to return project fragments using the v1 protocol
  • require scikit-build-core>=1, opt into minimum-version = "1.0", and remove the obsolete experimental flag
  • migrate the renamed CMake version environment setting to a valid version specifier

Supersedes #5759, which only widens the upper bound while retaining the deprecated metadata interface.

Fixes #3558

Validation:

  • ruff check .
  • ruff format .
  • resolved the complete project metadata table with scikit-build-core 1.0.0, including version, optional dependencies, scripts, and readme
  • built the source distribution successfully in an isolated environment with scikit-build-core 1.0.2

Coding agent: Codex
Codex version: codex-cli 0.144.1
Model: gpt-5.6-sol
Reasoning effort: xhigh

Summary by CodeRabbit

  • Build & Packaging
    • Updated package metadata handling to support the standard provider configuration.
    • Improved compatibility with newer scikit-build-core releases.
    • Updated CMake version requirements used during builds.
    • Refined generation of optional dependencies and executable scripts from project configuration.
    • Removed support for the legacy entry-points metadata option.

Migrate project metadata providers to the scikit-build-core v1 protocol and update the custom provider signature. Require scikit-build-core 1+, opt into v1 behavior, and use the renamed CMake version setting.

Fixes: deepmodeling#3558

Coding-Agent: Codex
Codex-Version: codex-cli 0.144.1
Model: gpt-5.6-sol
Reasoning-Effort: xhigh
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The build backend now uses the standard v1 dynamic metadata provider protocol, returns namespaced metadata fragments, upgrades scikit-build-core configuration, and emits the new CMake version environment variable.

Changes

Dynamic metadata migration

Layer / File(s) Summary
Dynamic metadata provider protocol
backend/dynamic_metadata.py
The provider now accepts standard settings and project arguments, validates optional-dependencies and scripts, preserves fragment construction, and returns {field: result}.
Scikit-build-core v1 configuration
pyproject.toml, backend/read_env.py
Build requirements and metadata providers use scikit-build-core v1 configuration, while CMake configuration emits SKBUILD_CMAKE_VERSION with a >= specifier.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: migrating build metadata handling to the stable dynamic metadata API.
Linked Issues check ✅ Passed The PR addresses #3558 by moving to the stable API and unpinning scikit-build-core to version 1+.
Out of Scope Changes check ✅ Passed The changes stay focused on metadata API migration, build config updates, and the related environment variable rename.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot 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.

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`:
- Around line 227-233: Update both tool.dynamic-metadata entries in the
pyproject configuration to use provider = "backend.dynamic_metadata" and add
provider-path = "."; preserve their existing field values, optional-dependencies
and scripts, respectively.
🪄 Autofix (Beta)

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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3bfbc160-92db-46c3-af43-b5c45dde3613

📥 Commits

Reviewing files that changed from the base of the PR and between 7c362d7 and 187ba8b.

📒 Files selected for processing (3)
  • backend/dynamic_metadata.py
  • backend/read_env.py
  • pyproject.toml

Comment thread pyproject.toml
@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.52%. Comparing base (7c362d7) to head (187ba8b).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5769      +/-   ##
==========================================
- Coverage   79.65%   79.52%   -0.13%     
==========================================
  Files        1015     1015              
  Lines      115781   115780       -1     
  Branches     4272     4275       +3     
==========================================
- Hits        92229    92079     -150     
- Misses      22008    22157     +149     
  Partials     1544     1544              

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@njzjz
njzjz requested a review from wanghan-iapcm July 11, 2026 17:50
@wanghan-iapcm
wanghan-iapcm added this pull request to the merge queue Jul 12, 2026
Merged via the queue into deepmodeling:master with commit a152b3b Jul 12, 2026
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unpin the upper bound when scikit-build dynamic metadata API is stable

3 participants