Skip to content

Commit de93b23

Browse files
committed
chore(uv): Prefer --locked for dependency sync
Adopt uv best practice for dependency synchronization. [Note] - (uv sync --frozen) proceeds with an out-dated lockfile. This could lead to inconsistencies. [Docs] See: https://docs.astral.sh/uv/concepts/projects/sync/#locking-and-syncing
1 parent dd025e3 commit de93b23

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

.github/workflows/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343

4444
- name: Install dependencies
4545
working-directory: src/${{ matrix.package }}
46-
run: uv sync --frozen --all-extras --dev
46+
run: uv sync --locked --all-extras --dev
4747

4848
- name: Run pyright
4949
working-directory: src/${{ matrix.package }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ jobs:
128128

129129
- name: Install dependencies
130130
working-directory: src/${{ matrix.package }}
131-
run: uv sync --frozen --all-extras --dev
131+
run: uv sync --locked --all-extras --dev
132132

133133
- name: Run pyright
134134
working-directory: src/${{ matrix.package }}

src/fetch/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ ENV UV_LINK_MODE=copy
1414
RUN --mount=type=cache,target=/root/.cache/uv \
1515
--mount=type=bind,source=uv.lock,target=uv.lock \
1616
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
17-
uv sync --frozen --no-install-project --no-dev --no-editable
17+
uv sync --locked --no-install-project --no-dev --no-editable
1818

1919
# Then, add the rest of the project source code and install it
2020
# Installing separately from its dependencies allows optimal layer caching
2121
ADD . /app
2222
RUN --mount=type=cache,target=/root/.cache/uv \
23-
uv sync --frozen --no-dev --no-editable
23+
uv sync --locked --no-dev --no-editable
2424

2525
FROM python:3.12-slim-bookworm
2626

src/git/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ ENV UV_LINK_MODE=copy
1414
RUN --mount=type=cache,target=/root/.cache/uv \
1515
--mount=type=bind,source=uv.lock,target=uv.lock \
1616
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
17-
uv sync --frozen --no-install-project --no-dev --no-editable
17+
uv sync --locked --no-install-project --no-dev --no-editable
1818

1919
# Then, add the rest of the project source code and install it
2020
# Installing separately from its dependencies allows optimal layer caching
2121
ADD . /app
2222
RUN --mount=type=cache,target=/root/.cache/uv \
23-
uv sync --frozen --no-dev --no-editable
23+
uv sync --locked --no-dev --no-editable
2424

2525
FROM python:3.12-slim-bookworm
2626

src/time/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ ENV UV_LINK_MODE=copy
1414
RUN --mount=type=cache,target=/root/.cache/uv \
1515
--mount=type=bind,source=uv.lock,target=uv.lock \
1616
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
17-
uv sync --frozen --no-install-project --no-dev --no-editable
17+
uv sync --locked --no-install-project --no-dev --no-editable
1818

1919
# Then, add the rest of the project source code and install it
2020
# Installing separately from its dependencies allows optimal layer caching
2121
ADD . /app
2222
RUN --mount=type=cache,target=/root/.cache/uv \
23-
uv sync --frozen --no-dev --no-editable
23+
uv sync --locked --no-dev --no-editable
2424

2525
FROM python:3.12-slim-bookworm
2626

0 commit comments

Comments
 (0)