Skip to content

[Code scan] Modernize deprecated pyproject metadata and Ruff settings #93

Description

@njzjz

This issue is a result of a Codex global code scan of deepmodeling/deepmodeling_sphinx at commit 156679f.

Problem

Current build and lint tooling reports deprecation warnings for two pyproject.toml sections:

  • Setuptools warns that project.license as a TOML table is deprecated and should be replaced before the 2027-02-18 removal window.
  • Ruff warns that top-level linter settings are deprecated in favor of the [tool.ruff.lint] section.

Code references:

license = {file = "LICENSE"}

[tool.ruff]
select = [
"I", # isort
]

Observed warnings

uv build reports that project.license as a TOML table is deprecated and recommends using a SPDX license expression and/or project.license-files.

ruff check . reports:

warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section.

Impact

These are not immediate runtime failures, but they create noisy CI output and will eventually require changes as packaging and lint tooling remove deprecated behavior.

Suggested fix

Move Ruff settings under [tool.ruff.lint]. Update license metadata to modern PEP 639-compatible fields supported by the chosen setuptools version, for example a SPDX expression plus license files where appropriate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions