Skip to content

Commit 2761e23

Browse files
viraatcclaude
andcommitted
fix: address review council findings
- Dockerfile.dev: add COPY README.md (uv_build needs it for metadata), split uv sync with --no-install-project for proper Docker layer caching - pyproject.toml: remove redundant data key (uv_build includes VCS-tracked files automatically; data key installs to data scheme) - .pre-commit-config.yaml: pin uv==0.7.6 in additional_dependencies - test.yml: add explicit uv sync steps for better CI diagnostics Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4bed238 commit 2761e23

4 files changed

Lines changed: 16 additions & 7 deletions

File tree

.github/workflows/test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ jobs:
1717
with:
1818
python-version-file: .python-version
1919

20+
- name: Install dependencies
21+
run: uv sync --frozen --extra test
22+
2023
- name: Run tests
21-
run: uv run --frozen --extra test pytest -xv -m "not slow and not performance" --cov=src --cov-report=xml --cov-report=html
24+
run: uv run pytest -xv -m "not slow and not performance" --cov=src --cov-report=xml --cov-report=html
2225

2326
- name: Upload coverage report
2427
uses: actions/upload-artifact@v4
@@ -38,5 +41,8 @@ jobs:
3841
with:
3942
python-version-file: .python-version
4043

44+
- name: Install dependencies
45+
run: uv sync --frozen --extra dev --extra test --extra performance
46+
4147
- name: Audit dependencies for known vulnerabilities
42-
run: uv run --frozen --extra dev --extra test --extra performance pip-audit
48+
run: uv run pip-audit

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ repos:
6767
name: Check uv.lock is up-to-date
6868
entry: uv lock --check
6969
language: python
70-
additional_dependencies: [uv]
70+
additional_dependencies: ["uv==0.7.6"]
7171
pass_filenames: false
7272
files: ^pyproject\.toml$

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ environments = [
1313

1414
[tool.uv-build]
1515
module-root = "src"
16-
data = {"inference_endpoint" = ["config/templates/*.yaml"]}
1716
exclude = ["inference_endpoint/evaluation/livecodebench/_server.py"]
1817

1918
[project]

scripts/Dockerfile.dev

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ RUN apt-get update && \
2323
RUN mkdir /mnt/inference-endpoint
2424
WORKDIR /mnt/inference-endpoint
2525

26-
# Copy lockfile + project metadata first for Docker layer caching
27-
COPY pyproject.toml uv.lock .python-version ./
28-
COPY src/ ./src/
26+
# Copy lockfile + project metadata for dependency layer caching
27+
COPY pyproject.toml uv.lock .python-version README.md ./
2928

3029
# Create a non-root user for security
3130
# Accept UID and GID as build arguments to match host user
@@ -40,4 +39,9 @@ RUN if ! getent group ${GROUP_ID}; then \
4039
USER appuser
4140
ENV PATH="/opt/venv/bin:/home/appuser/.local/bin:$PATH"
4241

42+
# Install dependencies first (cached unless pyproject.toml/uv.lock change)
43+
RUN uv sync --frozen --no-install-project --extra dev --extra test
44+
45+
# Copy source and install project
46+
COPY src/ ./src/
4347
RUN uv sync --frozen --extra dev --extra test

0 commit comments

Comments
 (0)