Pinned python requirements#2344
Draft
s3inlc wants to merge 2 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a pip-tools–style pinned (and hashed) dependency lock for the ci/apiv2 pytest suite and updates the dev container to install those dependencies into an isolated virtualenv.
Changes:
- Switch Python test dependency installation in the
Dockerfileto a dedicated venv at/opt/venv. - Add
ci/apiv2/requirements.inand replaceci/apiv2/requirements.txtwith apip-compile --generate-hashesoutput. - Document the pinning/regen workflow for
ci/apiv2Python dependencies inCONTRIBUTING.md.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| Dockerfile | Creates a Python venv and installs ci/apiv2 requirements into it; separately installs python-hashtopolis from GitHub. |
| CONTRIBUTING.md | Adds guidance on how ci/apiv2 Python dependencies are pinned and regenerated. |
| ci/apiv2/requirements.txt | Replaces floating requirements with pinned+hashed lock output from pip-compile. |
| ci/apiv2/requirements.in | Introduces the direct dependency input list for pip-compile. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
141
to
+143
| # install dependencies from ./ci/apiv2/requirements.txt | ||
| COPY ./ci/apiv2/requirements.txt /tmp/requirements.txt | ||
| RUN pip3 install -r /tmp/requirements.txt --break-system-packages | ||
| RUN /opt/venv/bin/pip install -r /tmp/requirements.txt |
Comment on lines
+1
to
+4
| click | ||
| click_log | ||
| pytest | ||
| confidence |
Comment on lines
+25
to
+27
| ## Dependency pinning (Python API tests) | ||
|
|
||
| The pytest suite in `ci/apiv2/` uses pinned dependencies installed into a virtualenv at `/opt/venv` inside the dev container (see `Dockerfile`). The venv's `bin/` is prepended to `PATH`, so `pytest` and `python3` resolve to the venv automatically — no manual activation needed. |
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.
closes #2336