Skip to content

Add Python dependency lockfile - #651

Closed
SeanMeyer wants to merge 1 commit into
mainfrom
add-python-lockfile
Closed

Add Python dependency lockfile#651
SeanMeyer wants to merge 1 commit into
mainfrom
add-python-lockfile

Conversation

@SeanMeyer

Copy link
Copy Markdown

Add Python dependency lockfile

Why

Lockfiles pin all dependencies (direct and transitive) to specific versions, enabling:

Security vulnerability management: Automated tools can quickly identify which repositories are affected by CVEs without needing to run dependency resolution.

Incident response: When issues occur, lockfiles provide an audit trail showing exactly which dependency versions changed and when.

Build reproducibility: Eliminates dependency drift between environments and over time.

Developer workflow

# Update dependencies
make -C Documentation update-deps

Changes

  • Documentation/requirements.in: Unpinned dependencies (renamed from requirements-min/requirements.txt)
  • Documentation/requirements.txt: Generated lockfile with all transitive dependencies pinned
  • Documentation/Makefile: Commands to regenerate and verify lockfile
  • .github/workflows/documentation.yaml: CI job to ensure lockfile stays in sync

Technical notes

  • Uses uv with --python-version 3.11 --python-platform linux for cross-platform compatibility
  • CI validates lockfile matches requirements.in on every PR
  • Removed old pip freeze-based workflow

Generated with Claude Code

@SeanMeyer

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@SeanMeyer
SeanMeyer force-pushed the add-python-lockfile branch from 6e60bb0 to bceee51 Compare January 13, 2026 15:53
Add proper lockfile generation and CI validation for Python dependencies
used in documentation building.

Changes:
- Rename requirements-min/requirements.txt to requirements.in (unpinned deps)
- Replace pip freeze with uv pip compile for lockfile generation
- Add update-deps target for regenerating lockfile
- Add verify-deps target for CI validation
- Add CI job to verify lockfile stays in sync with requirements.in

The lockfile (requirements.txt) is generated using uv with:
  make -C Documentation update-deps

Developer workflow:
1. Edit requirements.in to add/update dependencies
2. Run: make -C Documentation update-deps
3. Commit both requirements.in and requirements.txt

This enables:
- Security vulnerability management via exact version tracking
- Build reproducibility across environments
- Audit trail for dependency changes

Signed-off-by: Sean Meyer <sean.meyer@datadoghq.com>
@SeanMeyer
SeanMeyer force-pushed the add-python-lockfile branch from bceee51 to a7604c5 Compare January 13, 2026 15:58
@SeanMeyer SeanMeyer closed this Jan 13, 2026
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.

1 participant