[collab] Source pip dependencies from environment.yml#328
Merged
Conversation
The Colab execution workflow duplicated the full pip dependency list as a literal `pip install` line, which drifted out of sync with environment.yml (e.g. quantecon-book-theme was left at 0.20.2 after #319 bumped it to 0.21.0, since Dependabot only updates environment.yml). Derive the pip dependencies from environment.yml at build time so there is a single source of truth and the two can no longer diverge. See #303. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
✅ Deploy Preview for incomparable-parfait-2417f8 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR updates the Google Colab execution workflow to derive its pip install requirements directly from environment.yml, eliminating drift between the workflow’s pinned dependencies and the repo’s single source of truth.
Changes:
- Generate
colab-requirements.txtat runtime by extracting thepip:dependency list fromenvironment.yml. - Install Colab build dependencies via
pip install -r colab-requirements.txt(and print the generated list to logs).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Don't rely on the Colab runtime image shipping PyYAML — install it explicitly so the dependency-extraction step is self-contained. Addresses Copilot review feedback on #328. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
The Colab execution workflow (
collab.yml) duplicated the full pip dependency list as a literalpip installline. That copy drifted out of sync withenvironment.yml: Dependabot'scondaecosystem only updatesenvironment.yml, so after #319 bumpedquantecon-book-themeto 0.21.0 the workflow was still pinned to 0.20.2. This was surfaced (and is now superseded) by #303.This change derives the pip dependencies from
environment.ymlat build time, giving a single source of truth so the two can no longer diverge:Why this approach
environment.ymlas before, and the Colab workflow automatically picks up those updates.pip:subsection rather than recreating the conda env.cat colab-requirements.txt) for visibility.Verification
Validated locally that the snippet extracts the correct list (now
quantecon-book-theme==0.21.0, matchingenvironment.yml) and thatcollab.ymlis well-formed YAML. Theexecution-checksjob on this PR exercises the new install step end-to-end on GPU.🤖 Generated with Claude Code