-
Notifications
You must be signed in to change notification settings - Fork 649
Add support for pip-install input #1201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
src/setup-python.ts
Outdated
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.` |
There was a problem hiding this comment.
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.
`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
pip-install: | ||
description: "Used to specify the packages to install with pip after setting up Python. Can be a requirements file or package names." |
There was a problem hiding this comment.
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.
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.
Description:
Support for the pip-install input to install dependencies as part of the Python setup step.
Related issue:
#77
Check list: