Skip to content

Technical and Configuration Feedback on pyproject.toml #542

@Animus2710

Description

@Animus2710
  1. Syntax Validation
    No TOML syntax errors detected. The file structure is valid and parsable.
  2. Ruff Configuration Structure
    • The [tool.ruff.lint] section should be merged into [tool.ruff].
    • Ruff does not always recognize sub-tables like [tool.ruff.lint]; keeping all options under [tool.ruff] ensures consistent linting behavior.
    Fix:
    Move all keys from [tool.ruff.lint] to [tool.ruff].
  3. Dummy Variable Regex
    • The dummy-variable-rgx pattern is syntactically correct.
    • Placement should be under [tool.ruff] to ensure it is recognized.
  4. Dependency Management
    • Several dependencies (cv_bridge, hid, py-mjpeg, tf_keras, eclipse-zenoh) are platform-specific and may fail to install via PyPI.
    • Consider grouping them into optional dependency sets for ros, hardware, or jetson platforms.
    Fix Example:
    [project.optional-dependencies]
    ros = ["cv_bridge", "eclipse-zenoh"]
    hardware = ["hid", "py-mjpeg"]
    jetson = ["tensorflow", "torch"]
  5. Deep Learning Library Compatibility
    • torch, torchvision, and tensorflow should have explicit version pinning or environment-specific installation notes to prevent build inconsistencies.
  6. Dependency Groups Compatibility
    • The [dependency-groups] table is a new PEP 735 feature.
    • Ensure that the build system (e.g., uv, pip>=24.3, or Poetry) supports this key.
    • Older tools may ignore this section, causing missing development dependencies.
  7. General Recommendations
    • Add a [build-system] section if it is missing to ensure compatibility with PEP 621.
    • Verify that Git-based dependencies resolve correctly and use commit hashes for reproducibility.
    • Test uv pip install . or pip install . to confirm all dependencies resolve without conflict.
    Summary:
    The file is syntactically correct but contains configuration hierarchy issues with Ruff and several dependency management risks.
    No runtime-breaking errors, but restructuring Ruff sections and organizing optional dependencies will improve portability and maintainability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions