Python cache refactor & docs update#15
Merged
Merged
Conversation
Co-authored-by: kenorb <kenorb@users.noreply.github.com>
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRefactors the Copilot setup workflow to use the native pip cache in actions/setup-python instead of a separate actions/cache step, simplifying dependency installation logic and updating the AGENTS documentation to match. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The change from caching
~/.localto usingcache: pipalters behavior from restoring installed site-packages to only restoring the pip download cache; if startup time was important, consider noting or measuring the impact of reinstalling dependencies on every run. - Given that
pip install --useris now always executed, confirm that this is intentional for reproducibility; if not, you may want to reintroduce a lightweight guard (e.g., checking a marker file) to skip redundant installs while still leveraging the pip cache.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The change from caching `~/.local` to using `cache: pip` alters behavior from restoring installed site-packages to only restoring the pip download cache; if startup time was important, consider noting or measuring the impact of reinstalling dependencies on every run.
- Given that `pip install --user` is now always executed, confirm that this is intentional for reproducibility; if not, you may want to reintroduce a lightweight guard (e.g., checking a marker file) to skip redundant installs while still leveraging the pip cache.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have improved the
copilot-setup-steps.ymlworkflow by replacing the manualactions/cachestep with the built-in caching feature ofactions/setup-python. This simplifies the workflow while maintaining efficient dependency management. I also updated the correspondingAGENTS.mdfile to reflect these changes and verified the modifications usingpre-commit(includingactionlintandyamllint).Key Changes:
actions/setup-pythonto usecache: pipwith the dependency path set to.devcontainer/requirements.txt.Restore Python user sitecache step and the conditional logic for dependency installation, aspip installwill now leverage the cached downloads automatically..github/workflows/AGENTS.mdto reflect that Python dependencies are now cached via the nativesetup-pythonmechanism.pre-commit.Triggered by workflow_dispatch
opencode session | github run