Skip to content

Conversation

gowridurgad
Copy link
Contributor

Description:
Support for the pip-install input to install dependencies as part of the Python setup step.

Related issue:
#77

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@gowridurgad gowridurgad marked this pull request as ready for review September 10, 2025 06:44
@Copilot Copilot AI review requested due to automatic review settings September 10, 2025 06:44
@gowridurgad gowridurgad requested a review from a team as a code owner September 10, 2025 06:44
@gowridurgad gowridurgad self-assigned this Sep 10, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for a new pip-install input parameter that allows users to install Python dependencies directly as part of the Python setup step, eliminating the need for a separate pip install step in workflows.

  • Implements installPipPackages() function to handle pip package installation
  • Adds comprehensive documentation for the new feature
  • Includes end-to-end tests for the pip-install functionality

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/setup-python.ts Implements the core pip-install functionality with error handling
action.yml Adds the pip-install input parameter definition
docs/advanced-usage.md Documents usage examples and best practices for pip-install
README.md Updates table of contents to include pip-install documentation
.github/workflows/e2e-cache.yml Adds end-to-end tests for pip-install with caching scenarios
.github/workflows/e2e-cache-freethreaded.yml Adds end-to-end tests for pip-install with free-threaded Python

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

core.info('Successfully installed pip packages');
} catch (error) {
core.setFailed(
`Failed to install pip packages from "${pipInstall}". Please verify that the package names and versions in the requirements file are correct, that the specified packages and versions can be resolved from PyPI or the configured package index, and that your network connection is stable and allows access to the package index.`
Copy link
Preview

Copilot AI Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message assumes the input is a requirements file, but the pip-install input can also accept package names directly. The message should be more generic to cover both use cases.

Suggested change
`Failed to install pip packages from "${pipInstall}". Please verify that the package names and versions in the requirements file are correct, that the specified packages and versions can be resolved from PyPI or the configured package index, and that your network connection is stable and allows access to the package index.`
`Failed to install pip packages from "${pipInstall}". Please verify that the package names, versions, or requirements files you provided are correct, that the specified packages and versions can be resolved from PyPI or the configured package index, and that your network connection is stable and allows access to the package index.`

Copilot uses AI. Check for mistakes.

action.yml Outdated
Comment on lines 34 to 35
pip-install:
description: "Used to specify the packages to install with pip after setting up Python. Can be a requirements file or package names."
Copy link
Preview

Copilot AI Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are trailing spaces after the colon on line 34 and after the description on line 35. These should be removed for consistency.

Suggested change
pip-install:
description: "Used to specify the packages to install with pip after setting up Python. Can be a requirements file or package names."
pip-install:
description: "Used to specify the packages to install with pip after setting up Python. Can be a requirements file or package names."

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant