From 466f233d5a9ecd4581f6f749772085b5e1a9bd01 Mon Sep 17 00:00:00 2001 From: Julian Paquerot <111422357+Kajiih@users.noreply.github.com> Date: Sat, 7 Dec 2024 18:16:47 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Test=20uv=20in?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/code-embedder_uv.yaml | 59 +++++++++++++++++++++++++ pyproject.toml | 6 --- 2 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/code-embedder_uv.yaml diff --git a/.github/workflows/code-embedder_uv.yaml b/.github/workflows/code-embedder_uv.yaml new file mode 100644 index 0000000..98710ec --- /dev/null +++ b/.github/workflows/code-embedder_uv.yaml @@ -0,0 +1,59 @@ +name: 🪄 Code Embedder uv + +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: + contents: write + +jobs: + code_embedder: + runs-on: ubuntu-latest + env: + PYTHON_VERSION: "3.12" + UV_SYSTEM_PYTHON: 1 + steps: + - name: 🛎️ Checkout + uses: actions/checkout@v4 + # with: + # ref: ${{ github.event.pull_request.head.ref }} + + - name: 🐍 Install uv with caching + uses: astral-sh/setup-uv@v3 + with: + enable-cache: true + version: "0.5.4" + + - name: 🐍 Set up Python ${{ env.PYTHON_VERSION }} + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: 💾 Setup pip cache + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('uv.lock') }} + + - name: 📥 Install the project + run: | + uv sync --all-extras --dev + uv pip install . + + - name: 🪄 Format raw code snippets with ruff + run: | + pipx install ruff + ruff format dev/readme_snippets/ + + - name: 🪄 Format print comments in code snippets + run: python dev/scripts/format_snippet_prints.py + + - name: 📝 Run code embedder + uses: kvankova/code-embedder@v1.1.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index 9229fce..7106daf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -221,9 +221,3 @@ docstring-code-format = true # Don't complain about abstract methods, they aren't run: "@(abc\\.)?abstractmethod", ] - -[tool.poetry] -name = "" -version = "0.0.1" # Looks like to be necessary -description = "" -authors = [" <>"]