diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 571db15..e896173 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ -FROM mcr.microsoft.com/devcontainers/python:3.13-bullseye +FROM mcr.microsoft.com/devcontainers/python:3.13-bookworm RUN apt-get update && apt-get upgrade -y -RUN pip install pip-tools invoke -COPY requirements.in requirements.txt requirements-dev.in requirements-dev.txt constraints.txt tasks.py ./ -RUN invoke sync-dependencies +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ +COPY pyproject.toml uv.lock tasks.py ./ +RUN uv sync --frozen diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c6e02fb --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.venv +node_modules diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 29c3727..165e1f2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -14,22 +14,21 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v5 - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.13' - cache: pip - - name: Install dependencies - run: | - pip install pip-tools - pip-sync requirements.txt requirements-dev.txt + python-version-file: "pyproject.toml" + - name: Install the project + run: uv sync --all-extras --dev --frozen --no-install-project - name: Setup pre-commit cache uses: actions/cache@v4 with: path: ~/.cache/pre-commit key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} - name: Check pre-commit - run: pre-commit run --show-diff-on-failure --color=always --all-files + run: uv run pre-commit run --show-diff-on-failure --color=always --all-files - name: Test - run: pytest --cov=. --cov-branch --cov-report term-missing:skip-covered + run: uv run pytest --cov=. --cov-branch --cov-report term-missing:skip-covered working-directory: ./src/ diff --git a/.github/workflows/update-dependencies.yaml b/.github/workflows/update-dependencies.yaml index 91b944f..1697e71 100644 --- a/.github/workflows/update-dependencies.yaml +++ b/.github/workflows/update-dependencies.yaml @@ -17,15 +17,15 @@ jobs: uses: actions/checkout@v4 with: ref: master + - name: Install uv + uses: astral-sh/setup-uv@v5 - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.13' - cache: pip + python-version-file: "pyproject.toml" - name: Update dependencies run: | - pip install pip-tools invoke - invoke update-dependencies --no-sync + uv lock --upgrade - name: Generate token uses: tibdex/github-app-token@v2 id: generate-token diff --git a/.idea/watcherTasks.xml b/.idea/watcherTasks.xml index e78ac61..939da94 100644 --- a/.idea/watcherTasks.xml +++ b/.idea/watcherTasks.xml @@ -14,7 +14,7 @@