Skip to content

[pull] main from actions:main#15

Merged
pull[bot] merged 1 commit intoStars1233:mainfrom
actions:main
Jun 20, 2025
Merged

[pull] main from actions:main#15
pull[bot] merged 1 commit intoStars1233:mainfrom
actions:main

Conversation

@pull
Copy link

@pull pull bot commented Jun 20, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

Summary by Sourcery

Introduce a pip-version input to enable installing a specific pip version, implement validation and installation logic, enhance E2E tests to cover pip caching scenarios with the new input, and update docs accordingly.

New Features:

  • Add a pip-version input to setup-python to allow specifying a pip version for installation on standard Python runtimes.

Enhancements:

  • Validate the pip-version format and install or upgrade pip to the specified version after setting up Python.

CI:

  • Extend end-to-end workflows to test pip caching with the pip-version input and cache-dependency-path across various OS and Python versions.

Documentation:

  • Add documentation for the pip-version input in the advanced usage guide and README.

* Add pip-version input

* Update workflow files

* Add documentation

* Update workflow files
@pull pull bot added the ⤵️ pull label Jun 20, 2025
@gitnotebooks
Copy link

gitnotebooks bot commented Jun 20, 2025

Review these changes at https://app.gitnotebooks.com/Stars1233/setup-python/pull/15

@pull pull bot merged commit e9c40fb into Stars1233:main Jun 20, 2025
@sourcery-ai
Copy link

sourcery-ai bot commented Jun 20, 2025

Reviewer's Guide

This PR adds a new pip-version input to the setup-python action, introduces logic to validate and install a specified pip version in both TypeScript and compiled JavaScript, updates the documentation to describe the new input, and extends end-to-end workflows to test pip-caching scenarios with explicit pip versions and dependency paths across multiple OS and Python versions.

Class diagram for updated setup-python action inputs and pip installation logic

classDiagram
    class SetupPythonAction {
      +python-version: string
      +pip-version: string
      +cache: string
      +cache-dependency-path: string
      +freethreaded: boolean
      +useCpythonVersion()
    }
    class installPip {
      +installPip(pythonLocation: string)
    }
    SetupPythonAction --|> installPip : uses
    installPip : +validate pip-version format
    installPip : +install pip==<version> if specified
    installPip : +throw error if invalid format
Loading

File-Level Changes

Change Details Files
Introduce pip-version input in action metadata
  • Add pip-version input description in action.yml
  • Define supported format: major[.minor][.patch]
action.yml
Implement pip-version handling in the action code
  • Create installPip function with version regex validation
  • Invoke installPip after Python setup in useCpythonVersion
  • Mirror TypeScript changes in the compiled dist/index.js
src/find-python.ts
dist/setup/index.js
Update documentation for the new pip-version input
  • Add usage section in docs/advanced-usage.md
  • Add link in README.md TOC
docs/advanced-usage.md
README.md
Augment E2E workflows to cover pip-version scenarios
  • Add jobs testing pip caching with specific pip versions
  • Add variants using cache-dependency-path for requirements files
.github/workflows/e2e-cache-freethreaded.yml
.github/workflows/e2e-cache.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant