Skip to content

Conversation

@KRRT7
Copy link
Contributor

@KRRT7 KRRT7 commented Jun 19, 2025

PR Type

Enhancement


Description

  • Migrate build backend from Poetry to Hatchling

  • Enable uv-dynamic-versioning for dynamic versions

  • Restructure pyproject.toml to PEP 621 format

  • Update version placeholder comment in version.py


Changes walkthrough 📝

Relevant files
Documentation
version.py
Update dynamic versioning comment                                               

codeflash/version.py

  • Updated placeholder comment for dynamic versioning
  • Changed reference to uv-dynamic-versioning tool
  • +1/-1     
    Configuration changes
    pyproject.toml
    Migrate pyproject.toml to Hatch and uv-dynamic-versioning

    pyproject.toml

  • Converted Poetry config to [project] PEP 621 tables
  • Added [project.dependencies] and dev dependency groups
  • Configured Hatch build targets and uv-dynamic-versioning settings
  • Removed Poetry build backend and dynamic-versioning entries
  • +124/-78

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @github-actions
    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Version Constraints

    The build-system requires entry does not specify version bounds for hatchling and uv-dynamic-versioning. Consider adding version constraints to ensure reproducible builds.

    requires = ["hatchling", "uv-dynamic-versioning"]
    build-backend = "hatchling.build"
    TOML Indentation

    The initial-content multi-line string under tool.uv-dynamic-versioning.files."codeflash/version.py" has leading spaces that may be injected verbatim. Verify that the indentation matches the intended content of version.py.

    initial-content = """
      # These version placeholders will be replaced by uv-dynamic-versioning during build.
      __version__ = "0.0.0"

    @github-actions
    Copy link

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    General
    Fix indentation in version placeholder

    The leading spaces inside the triple-quoted initial-content will be written
    verbatim, causing unintended indentation. Remove the extra indentation to produce
    clean placeholders.

    pyproject.toml [274-278]

     initial-content = """
    -  # These version placeholders will be replaced by uv-dynamic-versioning during build.
    -   __version__ = "0.0.0"
    -   __version_tuple__ = (0, 0, 0)
    +# These version placeholders will be replaced by uv-dynamic-versioning during build.
    +__version__ = "0.0.0"
    +__version_tuple__ = (0, 0, 0)
     """
    Suggestion importance[1-10]: 9

    __

    Why: Removing extra spaces prevents invalid indentation in codeflash/version.py, which could otherwise cause a syntax error.

    High
    Pin build backend versions

    Pin minimal versions for the build backend requirements to ensure reproducible
    builds and avoid breaking changes. Add version constraints to both hatchling and
    uv-dynamic-versioning.

    pyproject.toml [291-292]

    -requires = ["hatchling", "uv-dynamic-versioning"]
    +requires = ["hatchling>=1.0.0", "uv-dynamic-versioning>=0.6.2"]
     build-backend = "hatchling.build"
    Suggestion importance[1-10]: 6

    __

    Why: Pinning hatchling and uv-dynamic-versioning ensures reproducible builds and prevents breakage, but it’s not critical to the main PR changes.

    Low
    Normalize URL key casing

    PEP 621 recommends lowercase keys for metadata tables. Change Homepage to homepage
    to maintain consistency and avoid tool compatibility issues.

    pyproject.toml [46-47]

     [project.urls]
    -Homepage = "https://codeflash.ai"
    +homepage = "https://codeflash.ai"
    Suggestion importance[1-10]: 5

    __

    Why: Changing Homepage to homepage aligns with PEP 621 and improves consistency, though it’s a minor style change.

    Low

    @github-actions github-actions bot added the workflow-modified This PR modifies GitHub Actions workflows label Jun 19, 2025
    @KRRT7
    Copy link
    Contributor Author

    KRRT7 commented Jun 20, 2025

    the GHA' fail since it's using the main branch workflows, not current

    @misrasaurabh1 misrasaurabh1 merged commit 8b2b37a into main Jun 21, 2025
    17 of 25 checks passed
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    Review effort 3/5 workflow-modified This PR modifies GitHub Actions workflows

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    3 participants