Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/actions/setup-uv/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Set up uv
description: Install the lowest uv version allowed by the root pyproject.toml.
runs:
using: composite
steps:
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
with:
version-file: pyproject.toml
resolution-strategy: lowest
7 changes: 1 addition & 6 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
pull_request:
branches: [main, develop]

env:
UV_VERSION: "0.6.16"

jobs:
build:
runs-on: ${{ matrix.os }}
Expand All @@ -27,9 +24,7 @@ jobs:
python-version: ${{ matrix.python }}
architecture: x64

- uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}
- uses: ./.github/actions/setup-uv

- name: Install dependencies
run: uv sync --locked --no-default-groups
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ on:
push:
branches: main

env:
UV_VERSION: "0.6.16"

jobs:
docs-deploy:
runs-on: ${{ matrix.os }}
Expand All @@ -22,9 +19,7 @@ jobs:
with:
python-version: ${{ matrix.python }}
architecture: x64
- uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}
- uses: ./.github/actions/setup-uv

- name: Stub version.py for docs
run: |
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:

env:
PYTHON_VERSION: "3.11"
UV_VERSION: "0.6.16"

jobs:
ruff:
Expand All @@ -19,9 +18,7 @@ jobs:
with:
python-version: ${{ env.PYTHON_VERSION }}
architecture: x64
- uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}
- uses: ./.github/actions/setup-uv
- name: Install quality dependencies
run: uv sync --locked --only-group quality
- name: Run ruff
Expand All @@ -38,9 +35,7 @@ jobs:
with:
python-version: ${{ env.PYTHON_VERSION }}
architecture: x64
- uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}
- uses: ./.github/actions/setup-uv
- name: Install quality dependencies
run: uv sync --locked --group quality
- name: Run mypy
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
pull_request:
branches: [main, develop]

env:
UV_VERSION: "0.6.16"

jobs:
pytest:
runs-on: ${{ matrix.os }}
Expand All @@ -27,9 +24,7 @@ jobs:
python-version: ${{ matrix.python }}
architecture: x64

- uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}
- uses: ./.github/actions/setup-uv

- name: Stub version.py
run: echo "__version__ = '0.0.0'" > pyroengine/version.py
Expand Down Expand Up @@ -89,9 +84,7 @@ jobs:
with:
python-version: ${{ matrix.python }}
architecture: x64
- uses: astral-sh/setup-uv@v5
with:
version: ${{ env.UV_VERSION }}
- uses: ./.github/actions/setup-uv

- name: Stub version.py
run: echo "__version__ = '0.0.0'" > pyroengine/version.py
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN apt-get update && \
&& apt-get clean && \
rm -rf /var/lib/apt/lists/*

COPY --from=ghcr.io/astral-sh/uv:0.6.16 /uv /bin/uv
COPY --from=ghcr.io/astral-sh/uv:0.13.4 /uv /bin/uv
COPY ./requirements-git.txt /tmp/requirements-git.txt
RUN uv pip install --no-cache --target=/tmp/git-packages -r /tmp/requirements-git.txt

Expand All @@ -32,7 +32,7 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*

# Layer 2: Stable deps (~400MB, changes only on version bumps)
COPY --from=ghcr.io/astral-sh/uv:0.6.16 /uv /bin/uv
COPY --from=ghcr.io/astral-sh/uv:0.13.4 /uv /bin/uv
COPY ./requirements.txt /tmp/requirements.txt
RUN uv pip install --no-cache --system -r /tmp/requirements.txt && \
rm -f /tmp/requirements.txt
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ tracker = "https://github.com/pyronear/pyro-engine/issues"
[tool.setuptools.packages.find]
include = ["pyroengine*"]

[tool.uv]
required-version = ">=0.13.4,<1.0.0"

[tool.uv.sources]
pyro_camera_api_client = { path = "pyro_camera_api/client", editable = true }
pyro_predictor = { path = "pyro-predictor", editable = true }
Expand Down
2 changes: 1 addition & 1 deletion pyro_camera_api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*

# Layer 2: Pip deps (~400MB, changes only on version bumps)
COPY --from=ghcr.io/astral-sh/uv:0.6.16 /uv /bin/uv
COPY --from=ghcr.io/astral-sh/uv:0.13.4 /uv /bin/uv
COPY requirements.txt /tmp/requirements.txt
RUN uv pip install --no-cache --system -r /tmp/requirements.txt && \
rm /bin/uv /tmp/requirements.txt
Expand Down
1 change: 1 addition & 0 deletions pyro_camera_api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ quality = [

[tool.uv]
package = false
required-version = ">=0.13.4,<1.0.0"
1,256 changes: 628 additions & 628 deletions pyro_camera_api/uv.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions setup_presets/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ dependencies = [

[tool.uv]
package = false
required-version = ">=0.13.4,<1.0.0"
188 changes: 94 additions & 94 deletions setup_presets/uv.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tools/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies = [

[tool.uv]
package = false
required-version = ">=0.13.4,<1.0.0"

[tool.uv.sources]
pyro-camera-api-client = { path = "../pyro_camera_api/client", editable = true }
Loading
Loading