Skip to content

Pinned python requirements#2344

Draft
s3inlc wants to merge 2 commits into
masterfrom
2336-pin-python-requirements
Draft

Pinned python requirements#2344
s3inlc wants to merge 2 commits into
masterfrom
2336-pin-python-requirements

Conversation

@s3inlc

@s3inlc s3inlc commented Jul 16, 2026

Copy link
Copy Markdown
Member

closes #2336

@s3inlc
s3inlc marked this pull request as draft July 16, 2026 14:08
@s3inlc
s3inlc requested a review from Copilot July 16, 2026 14:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 Dockerfile to a dedicated venv at /opt/venv.
  • Add ci/apiv2/requirements.in and replace ci/apiv2/requirements.txt with a pip-compile --generate-hashes output.
  • Document the pinning/regen workflow for ci/apiv2 Python dependencies in CONTRIBUTING.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 thread Dockerfile
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 thread Dockerfile
Comment thread ci/apiv2/requirements.in
Comment on lines +1 to +4
click
click_log
pytest
confidence
Comment thread CONTRIBUTING.md
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.
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.

[ENHANCEMENT]: Pin python requirements in github workflows

2 participants