From f5d5fb7e22185e430cba45aaca232417b9b80678 Mon Sep 17 00:00:00 2001 From: a5chin Date: Mon, 26 Aug 2024 10:44:59 +0000 Subject: [PATCH 01/17] fix: from rye to uv in devcontainer --- .devcontainer/Dockerfile | 31 +++++++++++++++---------------- .devcontainer/devcontainer.json | 8 ++++---- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ec88441..54b9e05 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -2,9 +2,7 @@ FROM debian:bookworm-slim AS builder WORKDIR /opt -ENV RYE_HOME="/opt/rye" -ENV PATH="$RYE_HOME/shims:$PATH" - +# The installer requires curl (and certificates) to download the release archive # hadolint ignore=DL3008 RUN apt-get update && \ apt-get install -y --no-install-recommends \ @@ -12,23 +10,24 @@ RUN apt-get update && \ curl SHELL [ "/bin/bash", "-o", "pipefail", "-c" ] -RUN curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash && \ - rye config --set-bool behavior.global-python=true && \ - rye config --set-bool behavior.use-uv=true -COPY ./.python-version ./pyproject.toml ./requirements* ./ -RUN rye pin "$(cat .python-version)" && \ - rye sync +# Download the latest installer +ADD https://astral.sh/uv/install.sh /uv-installer.sh + +# Run the installer then remove it +RUN sh /uv-installer.sh FROM mcr.microsoft.com/vscode/devcontainers/base:bookworm -COPY --from=builder /opt/rye /opt/rye +ENV CARGO_HOME="/opt/.cargo/bin" +ENV PATH="$CARGO_HOME/:$PATH" +COPY --from=builder /root/.cargo/bin/uv $CARGO_HOME/uv -ENV RYE_HOME="/opt/rye" -ENV PATH="$RYE_HOME/shims:$PATH" -ENV PYTHONUNBUFFERED=True +WORKDIR /opt + +COPY ./.python-version ./ +RUN uv python pin "$(cat .python-version)" -RUN rye config --set-bool behavior.global-python=true && \ - rye config --set-bool behavior.use-uv=true +ENV PYTHONUNBUFFERED=True -RUN chown -R vscode $RYE_HOME +RUN chown -R vscode $CARGO_HOME diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 520c0e8..51fa773 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "name": "Rye", + "name": "uv", "build": { "context": "..", "dockerfile": "Dockerfile" @@ -26,7 +26,7 @@ "yzhang.markdown-all-in-one" ], "settings": { - "python.defaultInterpreterPath": "/opt/rye/shims/python", + "python.defaultInterpreterPath": "/root/.local/share/uv/python", "[python]": { "editor.defaultFormatter": "charliermarsh.ruff", "editor.codeActionsOnSave": { @@ -46,7 +46,7 @@ } } }, - "postCreateCommand": "rye sync", - "postStartCommand": "rye run pre-commit install", + "postCreateCommand": "uv sync", + "postStartCommand": "uv run pre-commit install", "remoteUser": "vscode" } From c902f7d0de3a94c379cff495119082962f4d42d5 Mon Sep 17 00:00:00 2001 From: a5chin Date: Mon, 26 Aug 2024 10:45:24 +0000 Subject: [PATCH 02/17] fix: from rye to uv in workflows --- .../actions/setup-python-with-rye/action.yml | 41 ++++++++----------- .github/workflows/ruff.yml | 6 +-- .github/workflows/test.yml | 20 ++------- 3 files changed, 24 insertions(+), 43 deletions(-) diff --git a/.github/actions/setup-python-with-rye/action.yml b/.github/actions/setup-python-with-rye/action.yml index 840d338..43f11d8 100644 --- a/.github/actions/setup-python-with-rye/action.yml +++ b/.github/actions/setup-python-with-rye/action.yml @@ -1,35 +1,28 @@ -name: Install Python with Rye +name: Install Python with uv inputs: python-version: description: Python version required: true - rye-version: - description: Rye version - required: false - default: "latest" runs: using: composite steps: - - name: Install Rye - uses: eifinger/setup-rye@v3 - with: - enable-cache: true - version: ${{ inputs.rye-version }} - - - name: Set Rye Config - run: | - rye config --set-bool behavior.global-python=true - rye config --set-bool behavior.use-uv=true - shell: bash + - name: Install uv + # Install latest uv version using the installer + run: curl -LsSf https://astral.sh/uv/install.sh | sh - - name: Set up Python ${{ inputs.python-version }} - run: | - export PYTHONUNBUFFERED=True - rye pin ${{ inputs.python-version }} - shell: bash + - name: Set up Python ${{ inputs.python-version }} + - uses: actions/cache@v4 + id: cache-uv + with: + path: ~/.cache/uv + key: ${{ runner.os }}-python-${{ inputs.python-version }}-uv + run: | + export PYTHONUNBUFFERED=True + uv python pin ${{ inputs.python-version }} + shell: bash - - name: Install Dependencies - run: rye sync - shell: bash + - name: Install Dependencies + run: uv sync + shell: bash diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 316e66e..2bbfa5d 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -37,10 +37,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup Python ${{ matrix.python-version }} with Rye - uses: ./.github/actions/setup-python-with-rye + - name: Setup Python ${{ matrix.python-version }} with uv + uses: ./.github/actions/setup-python-with-uv with: python-version: ${{ matrix.python-version }} - name: Format - run: rye run ruff format . --check --diff + run: uv run ruff format . --check --diff diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 668997a..5e53b56 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,28 +14,16 @@ jobs: matrix: python-version: ['3.9', '3.10', '3.11', '3.12'] - steps: - name: Checkout uses: actions/checkout@v4 - - name: Install Rye - uses: eifinger/setup-rye@v4 + - name: Setup Python ${{ matrix.python-version }} with uv + uses: ./.github/actions/setup-python-with-uv with: - enable-cache: true - - - name: Set Rye Config - run: | - rye config --set-bool behavior.global-python=true - rye config --set-bool behavior.use-uv=true - - - name: Set up Python ${{ matrix.python-version }} - run: | - export PYTHONUNBUFFERED=1 - rye pin ${{ matrix.python-version }} - rye sync + python-version: ${{ matrix.python-version }} - name: Run Pytest if directory exists run: | if [ -d "./tests/" ]; then - rye run pytest -s + uv run pytest -s fi From ad21e669a3987b7a8ccb4341c1bfd50a9f97104c Mon Sep 17 00:00:00 2001 From: a5chin Date: Mon, 26 Aug 2024 10:46:08 +0000 Subject: [PATCH 03/17] fix: from rye to uv --- Dockerfile | 8 +++++--- pyproject.toml | 7 +++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index a548c22..2a6f8ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,13 @@ FROM python:${VARIANT} AS builder ENV PYTHONDONTWRITEBYTECODE=True WORKDIR /opt -COPY pyproject.toml requirements.lock ./ +COPY pyproject.toml ./ # hadolint ignore=DL3013,DL3042 RUN pip install --upgrade pip && \ - pip install --no-cache-dir -r requirements.lock + pip install uv && \ + uv pip compile pyproject.toml -o requirements.txt && \ + pip install --no-cache-dir -r requirements.txt FROM python:${VARIANT}-slim @@ -16,4 +18,4 @@ COPY --from=builder /usr/local/lib/python*/site-packages /usr/local/lib/python*/ ENV PYTHONUNBUFFERED=True -WORKDIR / +WORKDIR $HOME diff --git a/pyproject.toml b/pyproject.toml index 6c4b4ea..2a2137f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,12 +7,11 @@ authors = [ ] dependencies = [] readme = "README.md" -requires-python = ">= 3.12" +requires-python = ">=3.9" -[tool.rye] -managed = true +[tool.uv] dev-dependencies = [ "pytest>=8.3.2", "pre-commit>=3.8.0", - "ruff>=0.5.5", + "ruff>=0.6.2", ] From 1d3507ded585c1dc3eecc9291937ce7ae8e27209 Mon Sep 17 00:00:00 2001 From: a5chin Date: Mon, 26 Aug 2024 10:49:10 +0000 Subject: [PATCH 04/17] fix: from rye to uv in lint --- .github/workflows/ruff.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 2bbfa5d..99987b1 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -18,13 +18,13 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup Python ${{ matrix.python-version }} with Rye - uses: ./.github/actions/setup-python-with-rye + - name: Setup Python ${{ matrix.python-version }} with uv + uses: ./.github/actions/setup-python-with-uv with: python-version: ${{ matrix.python-version }} - name: Lint - run: rye run ruff check --output-format=github . + run: uv run ruff check --output-format=github . format: runs-on: ubuntu-latest From 8d03c5d06cd921da643a9fc6f57071743bcabef8 Mon Sep 17 00:00:00 2001 From: a5chin Date: Mon, 26 Aug 2024 10:52:07 +0000 Subject: [PATCH 05/17] fix: from rye to uv in action --- .../{setup-python-with-rye => setup-python-with-uv}/action.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/actions/{setup-python-with-rye => setup-python-with-uv}/action.yml (100%) diff --git a/.github/actions/setup-python-with-rye/action.yml b/.github/actions/setup-python-with-uv/action.yml similarity index 100% rename from .github/actions/setup-python-with-rye/action.yml rename to .github/actions/setup-python-with-uv/action.yml From 25c259e3e92d4980c8eb454848676bdf5556396d Mon Sep 17 00:00:00 2001 From: a5chin Date: Mon, 26 Aug 2024 10:57:56 +0000 Subject: [PATCH 06/17] delete: - --- .github/actions/setup-python-with-uv/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-python-with-uv/action.yml b/.github/actions/setup-python-with-uv/action.yml index 43f11d8..970af2f 100644 --- a/.github/actions/setup-python-with-uv/action.yml +++ b/.github/actions/setup-python-with-uv/action.yml @@ -13,7 +13,7 @@ runs: run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Set up Python ${{ inputs.python-version }} - - uses: actions/cache@v4 + uses: actions/cache@v4 id: cache-uv with: path: ~/.cache/uv From 03f8d1b9fc57293b8a01fa67837f696eac2e9d7a Mon Sep 17 00:00:00 2001 From: a5chin Date: Mon, 26 Aug 2024 11:09:50 +0000 Subject: [PATCH 07/17] fix: cache --- .github/actions/setup-python-with-uv/action.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-python-with-uv/action.yml b/.github/actions/setup-python-with-uv/action.yml index 970af2f..8897143 100644 --- a/.github/actions/setup-python-with-uv/action.yml +++ b/.github/actions/setup-python-with-uv/action.yml @@ -12,15 +12,18 @@ runs: # Install latest uv version using the installer run: curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Pin Python Version + run: | + export PYTHONUNBUFFERED=True + uv python pin ${{ inputs.python-version }} + shell: bash + - name: Set up Python ${{ inputs.python-version }} uses: actions/cache@v4 id: cache-uv with: path: ~/.cache/uv key: ${{ runner.os }}-python-${{ inputs.python-version }}-uv - run: | - export PYTHONUNBUFFERED=True - uv python pin ${{ inputs.python-version }} shell: bash - name: Install Dependencies From 2f86039b71834796c2abc38ac0e330795b4592c5 Mon Sep 17 00:00:00 2001 From: a5chin Date: Mon, 26 Aug 2024 11:16:03 +0000 Subject: [PATCH 08/17] fix: cache --- .github/actions/setup-python-with-uv/action.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/actions/setup-python-with-uv/action.yml b/.github/actions/setup-python-with-uv/action.yml index 8897143..99215cf 100644 --- a/.github/actions/setup-python-with-uv/action.yml +++ b/.github/actions/setup-python-with-uv/action.yml @@ -9,7 +9,6 @@ runs: using: composite steps: - name: Install uv - # Install latest uv version using the installer run: curl -LsSf https://astral.sh/uv/install.sh | sh - name: Pin Python Version @@ -18,8 +17,7 @@ runs: uv python pin ${{ inputs.python-version }} shell: bash - - name: Set up Python ${{ inputs.python-version }} - uses: actions/cache@v4 + - uses: actions/cache@v4 id: cache-uv with: path: ~/.cache/uv From 25e83cc26f1d0ea714794028d646ae75907afe1b Mon Sep 17 00:00:00 2001 From: a5chin Date: Mon, 26 Aug 2024 11:21:02 +0000 Subject: [PATCH 09/17] fix: cache --- .github/actions/setup-python-with-uv/action.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-python-with-uv/action.yml b/.github/actions/setup-python-with-uv/action.yml index 99215cf..8adca33 100644 --- a/.github/actions/setup-python-with-uv/action.yml +++ b/.github/actions/setup-python-with-uv/action.yml @@ -10,6 +10,7 @@ runs: steps: - name: Install uv run: curl -LsSf https://astral.sh/uv/install.sh | sh + shell: bash - name: Pin Python Version run: | @@ -18,10 +19,10 @@ runs: shell: bash - uses: actions/cache@v4 - id: cache-uv - with: - path: ~/.cache/uv - key: ${{ runner.os }}-python-${{ inputs.python-version }}-uv + id: cache-uv + with: + path: ~/.cache/uv + key: ${{ runner.os }}-python-${{ inputs.python-version }}-uv shell: bash - name: Install Dependencies From 97124809c34f3d3f07552ff2727a3a0f574e5140 Mon Sep 17 00:00:00 2001 From: a5chin Date: Mon, 26 Aug 2024 11:23:15 +0000 Subject: [PATCH 10/17] delete: shell in cache --- .github/actions/setup-python-with-uv/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/setup-python-with-uv/action.yml b/.github/actions/setup-python-with-uv/action.yml index 8adca33..ebaf909 100644 --- a/.github/actions/setup-python-with-uv/action.yml +++ b/.github/actions/setup-python-with-uv/action.yml @@ -23,7 +23,6 @@ runs: with: path: ~/.cache/uv key: ${{ runner.os }}-python-${{ inputs.python-version }}-uv - shell: bash - name: Install Dependencies run: uv sync From 633c76ad655829d46fccf58c84c5e06bc483adca Mon Sep 17 00:00:00 2001 From: a5chin Date: Mon, 26 Aug 2024 11:51:59 +0000 Subject: [PATCH 11/17] add: uv.lock --- uv.lock | 256 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 256 insertions(+) create mode 100644 uv.lock diff --git a/uv.lock b/uv.lock new file mode 100644 index 0000000..5116760 --- /dev/null +++ b/uv.lock @@ -0,0 +1,256 @@ +version = 1 +requires-python = ">=3.9" + +[[package]] +name = "cfgv" +version = "3.4.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/11/74/539e56497d9bd1d484fd863dd69cbbfa653cd2aa27abfe35653494d85e94/cfgv-3.4.0.tar.gz", hash = "sha256:e52591d4c5f5dead8e0f673fb16db7949d2cfb3f7da4582893288f0ded8fe560", size = 7114 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c5/55/51844dd50c4fc7a33b653bfaba4c2456f06955289ca770a5dbd5fd267374/cfgv-3.4.0-py2.py3-none-any.whl", hash = "sha256:b7265b1f29fd3316bfcd2b330d63d024f2bfd8bcb8b0272f8e19a504856c48f9", size = 7249 }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 }, +] + +[[package]] +name = "default" +version = "0.1.0" +source = { editable = "." } + +[package.dev-dependencies] +dev = [ + { name = "pre-commit" }, + { name = "pytest" }, + { name = "ruff" }, +] + +[package.metadata] + +[package.metadata.requires-dev] +dev = [ + { name = "pre-commit", specifier = ">=3.8.0" }, + { name = "pytest", specifier = ">=8.3.2" }, + { name = "ruff", specifier = ">=0.6.2" }, +] + +[[package]] +name = "distlib" +version = "0.3.8" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c4/91/e2df406fb4efacdf46871c25cde65d3c6ee5e173b7e5a4547a47bae91920/distlib-0.3.8.tar.gz", hash = "sha256:1530ea13e350031b6312d8580ddb6b27a104275a31106523b8f123787f494f64", size = 609931 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8e/41/9307e4f5f9976bc8b7fea0b66367734e8faf3ec84bc0d412d8cfabbb66cd/distlib-0.3.8-py2.py3-none-any.whl", hash = "sha256:034db59a0b96f8ca18035f36290806a9a6e6bd9d1ff91e45a7f172eb17e51784", size = 468850 }, +] + +[[package]] +name = "exceptiongroup" +version = "1.2.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/09/35/2495c4ac46b980e4ca1f6ad6db102322ef3ad2410b79fdde159a4b0f3b92/exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc", size = 28883 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/02/cc/b7e31358aac6ed1ef2bb790a9746ac2c69bcb3c8588b41616914eb106eaf/exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b", size = 16453 }, +] + +[[package]] +name = "filelock" +version = "3.15.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/08/dd/49e06f09b6645156550fb9aee9cc1e59aba7efbc972d665a1bd6ae0435d4/filelock-3.15.4.tar.gz", hash = "sha256:2207938cbc1844345cb01a5a95524dae30f0ce089eba5b00378295a17e3e90cb", size = 18007 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ae/f0/48285f0262fe47103a4a45972ed2f9b93e4c80b8fd609fa98da78b2a5706/filelock-3.15.4-py3-none-any.whl", hash = "sha256:6ca1fffae96225dab4c6eaf1c4f4f28cd2568d3ec2a44e15a08520504de468e7", size = 16159 }, +] + +[[package]] +name = "identify" +version = "2.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/32/f4/8e8f7db397a7ce20fbdeac5f25adaf567fc362472432938d25556008e03a/identify-2.6.0.tar.gz", hash = "sha256:cb171c685bdc31bcc4c1734698736a7d5b6c8bf2e0c15117f4d469c8640ae5cf", size = 99116 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/24/6c/a4f39abe7f19600b74528d0c717b52fff0b300bb0161081510d39c53cb00/identify-2.6.0-py2.py3-none-any.whl", hash = "sha256:e79ae4406387a9d300332b5fd366d8994f1525e8414984e1a59e058b2eda2dd0", size = 98962 }, +] + +[[package]] +name = "iniconfig" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d7/4b/cbd8e699e64a6f16ca3a8220661b5f83792b3017d0f79807cb8708d33913/iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3", size = 4646 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374", size = 5892 }, +] + +[[package]] +name = "nodeenv" +version = "1.9.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/43/16/fc88b08840de0e0a72a2f9d8c6bae36be573e475a6326ae854bcc549fc45/nodeenv-1.9.1.tar.gz", hash = "sha256:6ec12890a2dab7946721edbfbcd91f3319c6ccc9aec47be7c7e6b7011ee6645f", size = 47437 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d2/1d/1b658dbd2b9fa9c4c9f32accbfc0205d532c8c6194dc0f2a4c0428e7128a/nodeenv-1.9.1-py2.py3-none-any.whl", hash = "sha256:ba11c9782d29c27c70ffbdda2d7415098754709be8a7056d79a737cd901155c9", size = 22314 }, +] + +[[package]] +name = "packaging" +version = "24.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002", size = 148788 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/08/aa/cc0199a5f0ad350994d660967a8efb233fe0416e4639146c089643407ce6/packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124", size = 53985 }, +] + +[[package]] +name = "platformdirs" +version = "4.2.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f5/52/0763d1d976d5c262df53ddda8d8d4719eedf9594d046f117c25a27261a19/platformdirs-4.2.2.tar.gz", hash = "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3", size = 20916 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/68/13/2aa1f0e1364feb2c9ef45302f387ac0bd81484e9c9a4c5688a322fbdfd08/platformdirs-4.2.2-py3-none-any.whl", hash = "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee", size = 18146 }, +] + +[[package]] +name = "pluggy" +version = "1.5.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1", size = 67955 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/5f/e351af9a41f866ac3f1fac4ca0613908d9a41741cfcf2228f4ad853b697d/pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669", size = 20556 }, +] + +[[package]] +name = "pre-commit" +version = "3.8.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cfgv" }, + { name = "identify" }, + { name = "nodeenv" }, + { name = "pyyaml" }, + { name = "virtualenv" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/64/10/97ee2fa54dff1e9da9badbc5e35d0bbaef0776271ea5907eccf64140f72f/pre_commit-3.8.0.tar.gz", hash = "sha256:8bb6494d4a20423842e198980c9ecf9f96607a07ea29549e180eef9ae80fe7af", size = 177815 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/07/92/caae8c86e94681b42c246f0bca35c059a2f0529e5b92619f6aba4cf7e7b6/pre_commit-3.8.0-py2.py3-none-any.whl", hash = "sha256:9a90a53bf82fdd8778d58085faf8d83df56e40dfe18f45b19446e26bf1b3a63f", size = 204643 }, +] + +[[package]] +name = "pytest" +version = "8.3.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b4/8c/9862305bdcd6020bc7b45b1b5e7397a6caf1a33d3025b9a003b39075ffb2/pytest-8.3.2.tar.gz", hash = "sha256:c132345d12ce551242c87269de812483f5bcc87cdbb4722e48487ba194f9fdce", size = 1439314 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0f/f9/cf155cf32ca7d6fa3601bc4c5dd19086af4b320b706919d48a4c79081cf9/pytest-8.3.2-py3-none-any.whl", hash = "sha256:4ba08f9ae7dcf84ded419494d229b48d0903ea6407b030eaec46df5e6a73bba5", size = 341802 }, +] + +[[package]] +name = "pyyaml" +version = "6.0.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz", hash = "sha256:d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e", size = 130631 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9b/95/a3fac87cb7158e231b5a6012e438c647e1a87f09f8e0d123acec8ab8bf71/PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086", size = 184199 }, + { url = "https://files.pythonhosted.org/packages/c7/7a/68bd47624dab8fd4afbfd3c48e3b79efe09098ae941de5b58abcbadff5cb/PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf", size = 171758 }, + { url = "https://files.pythonhosted.org/packages/49/ee/14c54df452143b9ee9f0f29074d7ca5516a36edb0b4cc40c3f280131656f/PyYAML-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8824b5a04a04a047e72eea5cec3bc266db09e35de6bdfe34c9436ac5ee27d237", size = 718463 }, + { url = "https://files.pythonhosted.org/packages/4d/61/de363a97476e766574650d742205be468921a7b532aa2499fcd886b62530/PyYAML-6.0.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7c36280e6fb8385e520936c3cb3b8042851904eba0e58d277dca80a5cfed590b", size = 719280 }, + { url = "https://files.pythonhosted.org/packages/6b/4e/1523cb902fd98355e2e9ea5e5eb237cbc5f3ad5f3075fa65087aa0ecb669/PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec031d5d2feb36d1d1a24380e4db6d43695f3748343d99434e6f5f9156aaa2ed", size = 751239 }, + { url = "https://files.pythonhosted.org/packages/b7/33/5504b3a9a4464893c32f118a9cc045190a91637b119a9c881da1cf6b7a72/PyYAML-6.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:936d68689298c36b53b29f23c6dbb74de12b4ac12ca6cfe0e047bedceea56180", size = 695802 }, + { url = "https://files.pythonhosted.org/packages/5c/20/8347dcabd41ef3a3cdc4f7b7a2aff3d06598c8779faa189cdbf878b626a4/PyYAML-6.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:23502f431948090f597378482b4812b0caae32c22213aecf3b55325e049a6c68", size = 720527 }, + { url = "https://files.pythonhosted.org/packages/be/aa/5afe99233fb360d0ff37377145a949ae258aaab831bde4792b32650a4378/PyYAML-6.0.2-cp310-cp310-win32.whl", hash = "sha256:2e99c6826ffa974fe6e27cdb5ed0021786b03fc98e5ee3c5bfe1fd5015f42b99", size = 144052 }, + { url = "https://files.pythonhosted.org/packages/b5/84/0fa4b06f6d6c958d207620fc60005e241ecedceee58931bb20138e1e5776/PyYAML-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:a4d3091415f010369ae4ed1fc6b79def9416358877534caf6a0fdd2146c87a3e", size = 161774 }, + { url = "https://files.pythonhosted.org/packages/f8/aa/7af4e81f7acba21a4c6be026da38fd2b872ca46226673c89a758ebdc4fd2/PyYAML-6.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cc1c1159b3d456576af7a3e4d1ba7e6924cb39de8f67111c735f6fc832082774", size = 184612 }, + { url = "https://files.pythonhosted.org/packages/8b/62/b9faa998fd185f65c1371643678e4d58254add437edb764a08c5a98fb986/PyYAML-6.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1e2120ef853f59c7419231f3bf4e7021f1b936f6ebd222406c3b60212205d2ee", size = 172040 }, + { url = "https://files.pythonhosted.org/packages/ad/0c/c804f5f922a9a6563bab712d8dcc70251e8af811fce4524d57c2c0fd49a4/PyYAML-6.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5d225db5a45f21e78dd9358e58a98702a0302f2659a3c6cd320564b75b86f47c", size = 736829 }, + { url = "https://files.pythonhosted.org/packages/51/16/6af8d6a6b210c8e54f1406a6b9481febf9c64a3109c541567e35a49aa2e7/PyYAML-6.0.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ac9328ec4831237bec75defaf839f7d4564be1e6b25ac710bd1a96321cc8317", size = 764167 }, + { url = "https://files.pythonhosted.org/packages/75/e4/2c27590dfc9992f73aabbeb9241ae20220bd9452df27483b6e56d3975cc5/PyYAML-6.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ad2a3decf9aaba3d29c8f537ac4b243e36bef957511b4766cb0057d32b0be85", size = 762952 }, + { url = "https://files.pythonhosted.org/packages/9b/97/ecc1abf4a823f5ac61941a9c00fe501b02ac3ab0e373c3857f7d4b83e2b6/PyYAML-6.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ff3824dc5261f50c9b0dfb3be22b4567a6f938ccce4587b38952d85fd9e9afe4", size = 735301 }, + { url = "https://files.pythonhosted.org/packages/45/73/0f49dacd6e82c9430e46f4a027baa4ca205e8b0a9dce1397f44edc23559d/PyYAML-6.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:797b4f722ffa07cc8d62053e4cff1486fa6dc094105d13fea7b1de7d8bf71c9e", size = 756638 }, + { url = "https://files.pythonhosted.org/packages/22/5f/956f0f9fc65223a58fbc14459bf34b4cc48dec52e00535c79b8db361aabd/PyYAML-6.0.2-cp311-cp311-win32.whl", hash = "sha256:11d8f3dd2b9c1207dcaf2ee0bbbfd5991f571186ec9cc78427ba5bd32afae4b5", size = 143850 }, + { url = "https://files.pythonhosted.org/packages/ed/23/8da0bbe2ab9dcdd11f4f4557ccaf95c10b9811b13ecced089d43ce59c3c8/PyYAML-6.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:e10ce637b18caea04431ce14fabcf5c64a1c61ec9c56b071a4b7ca131ca52d44", size = 161980 }, + { url = "https://files.pythonhosted.org/packages/86/0c/c581167fc46d6d6d7ddcfb8c843a4de25bdd27e4466938109ca68492292c/PyYAML-6.0.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:c70c95198c015b85feafc136515252a261a84561b7b1d51e3384e0655ddf25ab", size = 183873 }, + { url = "https://files.pythonhosted.org/packages/a8/0c/38374f5bb272c051e2a69281d71cba6fdb983413e6758b84482905e29a5d/PyYAML-6.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ce826d6ef20b1bc864f0a68340c8b3287705cae2f8b4b1d932177dcc76721725", size = 173302 }, + { url = "https://files.pythonhosted.org/packages/c3/93/9916574aa8c00aa06bbac729972eb1071d002b8e158bd0e83a3b9a20a1f7/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5", size = 739154 }, + { url = "https://files.pythonhosted.org/packages/95/0f/b8938f1cbd09739c6da569d172531567dbcc9789e0029aa070856f123984/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b22676e8097e9e22e36d6b7bda33190d0d400f345f23d4065d48f4ca7ae0425", size = 766223 }, + { url = "https://files.pythonhosted.org/packages/b9/2b/614b4752f2e127db5cc206abc23a8c19678e92b23c3db30fc86ab731d3bd/PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476", size = 767542 }, + { url = "https://files.pythonhosted.org/packages/d4/00/dd137d5bcc7efea1836d6264f049359861cf548469d18da90cd8216cf05f/PyYAML-6.0.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:0833f8694549e586547b576dcfaba4a6b55b9e96098b36cdc7ebefe667dfed48", size = 731164 }, + { url = "https://files.pythonhosted.org/packages/c9/1f/4f998c900485e5c0ef43838363ba4a9723ac0ad73a9dc42068b12aaba4e4/PyYAML-6.0.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8b9c7197f7cb2738065c481a0461e50ad02f18c78cd75775628afb4d7137fb3b", size = 756611 }, + { url = "https://files.pythonhosted.org/packages/df/d1/f5a275fdb252768b7a11ec63585bc38d0e87c9e05668a139fea92b80634c/PyYAML-6.0.2-cp312-cp312-win32.whl", hash = "sha256:ef6107725bd54b262d6dedcc2af448a266975032bc85ef0172c5f059da6325b4", size = 140591 }, + { url = "https://files.pythonhosted.org/packages/0c/e8/4f648c598b17c3d06e8753d7d13d57542b30d56e6c2dedf9c331ae56312e/PyYAML-6.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:7e7401d0de89a9a855c839bc697c079a4af81cf878373abd7dc625847d25cbd8", size = 156338 }, + { url = "https://files.pythonhosted.org/packages/ef/e3/3af305b830494fa85d95f6d95ef7fa73f2ee1cc8ef5b495c7c3269fb835f/PyYAML-6.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:efdca5630322a10774e8e98e1af481aad470dd62c3170801852d752aa7a783ba", size = 181309 }, + { url = "https://files.pythonhosted.org/packages/45/9f/3b1c20a0b7a3200524eb0076cc027a970d320bd3a6592873c85c92a08731/PyYAML-6.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:50187695423ffe49e2deacb8cd10510bc361faac997de9efef88badc3bb9e2d1", size = 171679 }, + { url = "https://files.pythonhosted.org/packages/7c/9a/337322f27005c33bcb656c655fa78325b730324c78620e8328ae28b64d0c/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0ffe8360bab4910ef1b9e87fb812d8bc0a308b0d0eef8c8f44e0254ab3b07133", size = 733428 }, + { url = "https://files.pythonhosted.org/packages/a3/69/864fbe19e6c18ea3cc196cbe5d392175b4cf3d5d0ac1403ec3f2d237ebb5/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:17e311b6c678207928d649faa7cb0d7b4c26a0ba73d41e99c4fff6b6c3276484", size = 763361 }, + { url = "https://files.pythonhosted.org/packages/04/24/b7721e4845c2f162d26f50521b825fb061bc0a5afcf9a386840f23ea19fa/PyYAML-6.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70b189594dbe54f75ab3a1acec5f1e3faa7e8cf2f1e08d9b561cb41b845f69d5", size = 759523 }, + { url = "https://files.pythonhosted.org/packages/2b/b2/e3234f59ba06559c6ff63c4e10baea10e5e7df868092bf9ab40e5b9c56b6/PyYAML-6.0.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:41e4e3953a79407c794916fa277a82531dd93aad34e29c2a514c2c0c5fe971cc", size = 726660 }, + { url = "https://files.pythonhosted.org/packages/fe/0f/25911a9f080464c59fab9027482f822b86bf0608957a5fcc6eaac85aa515/PyYAML-6.0.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:68ccc6023a3400877818152ad9a1033e3db8625d899c72eacb5a668902e4d652", size = 751597 }, + { url = "https://files.pythonhosted.org/packages/14/0d/e2c3b43bbce3cf6bd97c840b46088a3031085179e596d4929729d8d68270/PyYAML-6.0.2-cp313-cp313-win32.whl", hash = "sha256:bc2fa7c6b47d6bc618dd7fb02ef6fdedb1090ec036abab80d4681424b84c1183", size = 140527 }, + { url = "https://files.pythonhosted.org/packages/fa/de/02b54f42487e3d3c6efb3f89428677074ca7bf43aae402517bc7cca949f3/PyYAML-6.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:8388ee1976c416731879ac16da0aff3f63b286ffdd57cdeb95f3f2e085687563", size = 156446 }, + { url = "https://files.pythonhosted.org/packages/65/d8/b7a1db13636d7fb7d4ff431593c510c8b8fca920ade06ca8ef20015493c5/PyYAML-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:688ba32a1cffef67fd2e9398a2efebaea461578b0923624778664cc1c914db5d", size = 184777 }, + { url = "https://files.pythonhosted.org/packages/0a/02/6ec546cd45143fdf9840b2c6be8d875116a64076218b61d68e12548e5839/PyYAML-6.0.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a8786accb172bd8afb8be14490a16625cbc387036876ab6ba70912730faf8e1f", size = 172318 }, + { url = "https://files.pythonhosted.org/packages/0e/9a/8cc68be846c972bda34f6c2a93abb644fb2476f4dcc924d52175786932c9/PyYAML-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8e03406cac8513435335dbab54c0d385e4a49e4945d2909a581c83647ca0290", size = 720891 }, + { url = "https://files.pythonhosted.org/packages/e9/6c/6e1b7f40181bc4805e2e07f4abc10a88ce4648e7e95ff1abe4ae4014a9b2/PyYAML-6.0.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f753120cb8181e736c57ef7636e83f31b9c0d1722c516f7e86cf15b7aa57ff12", size = 722614 }, + { url = "https://files.pythonhosted.org/packages/3d/32/e7bd8535d22ea2874cef6a81021ba019474ace0d13a4819c2a4bce79bd6a/PyYAML-6.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b1fdb9dc17f5a7677423d508ab4f243a726dea51fa5e70992e59a7411c89d19", size = 737360 }, + { url = "https://files.pythonhosted.org/packages/d7/12/7322c1e30b9be969670b672573d45479edef72c9a0deac3bb2868f5d7469/PyYAML-6.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0b69e4ce7a131fe56b7e4d770c67429700908fc0752af059838b1cfb41960e4e", size = 699006 }, + { url = "https://files.pythonhosted.org/packages/82/72/04fcad41ca56491995076630c3ec1e834be241664c0c09a64c9a2589b507/PyYAML-6.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a9f8c2e67970f13b16084e04f134610fd1d374bf477b17ec1599185cf611d725", size = 723577 }, + { url = "https://files.pythonhosted.org/packages/ed/5e/46168b1f2757f1fcd442bc3029cd8767d88a98c9c05770d8b420948743bb/PyYAML-6.0.2-cp39-cp39-win32.whl", hash = "sha256:6395c297d42274772abc367baaa79683958044e5d3835486c16da75d2a694631", size = 144593 }, + { url = "https://files.pythonhosted.org/packages/19/87/5124b1c1f2412bb95c59ec481eaf936cd32f0fe2a7b16b97b81c4c017a6a/PyYAML-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:39693e1f8320ae4f43943590b49779ffb98acb81f788220ea932a6b6c51004d8", size = 162312 }, +] + +[[package]] +name = "ruff" +version = "0.6.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/23/f4/279d044f66b79261fd37df76bf72b64471afab5d3b7906a01499c4451910/ruff-0.6.2.tar.gz", hash = "sha256:239ee6beb9e91feb8e0ec384204a763f36cb53fb895a1a364618c6abb076b3be", size = 2460281 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/72/4b/47dd7a69287afb4069fa42c198e899463605460a58120196711bfcf0446b/ruff-0.6.2-py3-none-linux_armv6l.whl", hash = "sha256:5c8cbc6252deb3ea840ad6a20b0f8583caab0c5ef4f9cca21adc5a92b8f79f3c", size = 9695871 }, + { url = "https://files.pythonhosted.org/packages/ae/c3/8aac62ac4638c14a740ee76a755a925f2d0d04580ab790a9887accb729f6/ruff-0.6.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:17002fe241e76544448a8e1e6118abecbe8cd10cf68fde635dad480dba594570", size = 9459354 }, + { url = "https://files.pythonhosted.org/packages/2f/cf/77fbd8d4617b9b9c503f9bffb8552c4e3ea1a58dc36975e7a9104ffb0f85/ruff-0.6.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:3dbeac76ed13456f8158b8f4fe087bf87882e645c8e8b606dd17b0b66c2c1158", size = 9163871 }, + { url = "https://files.pythonhosted.org/packages/05/1c/765192bab32b79efbb498b06f0b9dcb3629112b53b8777ae1d19b8209e09/ruff-0.6.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:094600ee88cda325988d3f54e3588c46de5c18dae09d683ace278b11f9d4d534", size = 10096250 }, + { url = "https://files.pythonhosted.org/packages/08/d0/86f3cb0f6934c99f759c232984a5204d67a26745cad2d9edff6248adf7d2/ruff-0.6.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:316d418fe258c036ba05fbf7dfc1f7d3d4096db63431546163b472285668132b", size = 9475376 }, + { url = "https://files.pythonhosted.org/packages/cd/cc/4c8d0e225b559a3fae6092ec310d7150d3b02b4669e9223f783ef64d82c0/ruff-0.6.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d72b8b3abf8a2d51b7b9944a41307d2f442558ccb3859bbd87e6ae9be1694a5d", size = 10295634 }, + { url = "https://files.pythonhosted.org/packages/db/96/d2699cfb1bb5a01c68122af43454c76c31331e1c8a9bd97d653d7c82524b/ruff-0.6.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:2aed7e243be68487aa8982e91c6e260982d00da3f38955873aecd5a9204b1d66", size = 11024941 }, + { url = "https://files.pythonhosted.org/packages/8b/a9/6ecd66af8929e0f2a1ed308a4137f3521789f28f0eb97d32c2ca3aa7000c/ruff-0.6.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d371f7fc9cec83497fe7cf5eaf5b76e22a8efce463de5f775a1826197feb9df8", size = 10606894 }, + { url = "https://files.pythonhosted.org/packages/e4/73/2ee4cd19f44992fedac1cc6db9e3d825966072f6dcbd4032f21cbd063170/ruff-0.6.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8f310d63af08f583363dfb844ba8f9417b558199c58a5999215082036d795a1", size = 11552886 }, + { url = "https://files.pythonhosted.org/packages/60/4c/c0f1cd35ce4a93c54a6bb1ee6934a3a205fa02198dd076678193853ceea1/ruff-0.6.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7db6880c53c56addb8638fe444818183385ec85eeada1d48fc5abe045301b2f1", size = 10264945 }, + { url = "https://files.pythonhosted.org/packages/c4/89/e45c9359b9cdd4245512ea2b9f2bb128a997feaa5f726fc9e8c7a66afadf/ruff-0.6.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:1175d39faadd9a50718f478d23bfc1d4da5743f1ab56af81a2b6caf0a2394f23", size = 10100007 }, + { url = "https://files.pythonhosted.org/packages/06/74/0bd4e0a7ed5f6908df87892f9bf60a2356c0fd74102d8097298bd9b4f346/ruff-0.6.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:5b939f9c86d51635fe486585389f54582f0d65b8238e08c327c1534844b3bb9a", size = 9559267 }, + { url = "https://files.pythonhosted.org/packages/54/03/3dc6dc9419f276f05805bf888c279e3e0b631284abd548d9e87cebb93aec/ruff-0.6.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:d0d62ca91219f906caf9b187dea50d17353f15ec9bb15aae4a606cd697b49b4c", size = 9905304 }, + { url = "https://files.pythonhosted.org/packages/5c/5b/d6a72a6a6bbf097c09de468326ef5fa1c9e7aa5e6e45979bc0d984b0dbe7/ruff-0.6.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:7438a7288f9d67ed3c8ce4d059e67f7ed65e9fe3aa2ab6f5b4b3610e57e3cb56", size = 10341480 }, + { url = "https://files.pythonhosted.org/packages/79/a9/0f2f21fe15ba537c46598f96aa9ae4a3d4b9ec64926664617ca6a8c772f4/ruff-0.6.2-py3-none-win32.whl", hash = "sha256:279d5f7d86696df5f9549b56b9b6a7f6c72961b619022b5b7999b15db392a4da", size = 7961901 }, + { url = "https://files.pythonhosted.org/packages/b0/80/fff12ffe11853d9f4ea3e5221e6dd2e93640a161c05c9579833e09ad40a7/ruff-0.6.2-py3-none-win_amd64.whl", hash = "sha256:d9f3469c7dd43cd22eb1c3fc16926fb8258d50cb1b216658a07be95dd117b0f2", size = 8783320 }, + { url = "https://files.pythonhosted.org/packages/56/91/577cdd64cce5e74d3f8b5ecb93f29566def569c741eb008aed4f331ef821/ruff-0.6.2-py3-none-win_arm64.whl", hash = "sha256:f28fcd2cd0e02bdf739297516d5643a945cc7caf09bd9bcb4d932540a5ea4fa9", size = 8225886 }, +] + +[[package]] +name = "tomli" +version = "2.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c0/3f/d7af728f075fb08564c5949a9c95e44352e23dee646869fa104a3b2060a3/tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f", size = 15164 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/97/75/10a9ebee3fd790d20926a90a2547f0bf78f371b2f13aa822c759680ca7b9/tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc", size = 12757 }, +] + +[[package]] +name = "virtualenv" +version = "20.26.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "distlib" }, + { name = "filelock" }, + { name = "platformdirs" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/68/60/db9f95e6ad456f1872486769c55628c7901fb4de5a72c2f7bdd912abf0c1/virtualenv-20.26.3.tar.gz", hash = "sha256:4c43a2a236279d9ea36a0d76f98d84bd6ca94ac4e0f4a3b9d46d05e10fea542a", size = 9057588 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/07/4d/410156100224c5e2f0011d435e477b57aed9576fc7fe137abcf14ec16e11/virtualenv-20.26.3-py3-none-any.whl", hash = "sha256:8cc4a31139e796e9a7de2cd5cf2489de1217193116a8fd42328f1bd65f434589", size = 5684792 }, +] From f775cf2328ad45f61365566ad1aa01b63ba007b9 Mon Sep 17 00:00:00 2001 From: a5chin Date: Mon, 26 Aug 2024 11:57:17 +0000 Subject: [PATCH 12/17] fix: sync --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2a6f8ea..04f1a88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,14 +4,12 @@ FROM python:${VARIANT} AS builder ENV PYTHONDONTWRITEBYTECODE=True WORKDIR /opt -COPY pyproject.toml ./ +COPY pyproject.toml uv.lock ./ # hadolint ignore=DL3013,DL3042 RUN pip install --upgrade pip && \ pip install uv && \ - uv pip compile pyproject.toml -o requirements.txt && \ - pip install --no-cache-dir -r requirements.txt - + uv sync --frozen FROM python:${VARIANT}-slim COPY --from=builder /usr/local/lib/python*/site-packages /usr/local/lib/python*/site-packages From 7b46b181e5b935cf2fc00a9dacc109c37494400c Mon Sep 17 00:00:00 2001 From: a5chin Date: Mon, 26 Aug 2024 11:57:37 +0000 Subject: [PATCH 13/17] update: README.md --- README.md | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 9414629..96f5982 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,21 @@ -# VSCode Dev Container: Python Development with Rye, uv, and Ruff +# VSCode Dev Container: Python Development with uv and Ruff
-[![Rye](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/rye/main/artwork/badge.json)](https://github.com/astral-sh/rye) [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![Versions](https://img.shields.io/badge/python-3.9%20|%203.10%20|%203.11%20|%203.12%20-green.svg)](https://github.com/a5chin/python-rye) [![Ruff](https://github.com/a5chin/python-rye/actions/workflows/ruff.yml/badge.svg)](https://github.com/a5chin/python-rye/actions/workflows/ruff.yml) -[![test](https://github.com/a5chin/python-rye/actions/workflows/test.yml/badge.svg)](https://github.com/a5chin/python-rye/actions/workflows/test.yml) +[![Test](https://github.com/a5chin/python-rye/actions/workflows/test.yml/badge.svg)](https://github.com/a5chin/python-rye/actions/workflows/test.yml) [![Docker](https://github.com/a5chin/python-rye/actions/workflows/docker.yml/badge.svg)](https://github.com/a5chin/python-rye/actions/workflows/docker.yml)
## Overview This repository contains configurations to set up a Python development environment using VSCode's Dev Container feature. -The environment includes Rye, uv, and Ruff. +The environment includes uv, and Ruff. ![demo](assets/gif/ruff.gif) @@ -27,7 +26,7 @@ Specifically, you can solve this problem by following the steps below. 2. Type `Developer: Reload Window` in the command palette to reload the window ### Contents -- [VSCode Dev Container: Python Development with Rye, uv, and Ruff](#vscode-dev-container-python-development-with-rye-uv-and-ruff) +- [VSCode Dev Container: Python Development with uv and Ruff](#vscode-dev-container-python-development-with-uv-and-ruff) - [Overview](#overview) - [Contents](#contents) - [Branches](#branches) @@ -42,6 +41,7 @@ Specifically, you can solve this problem by following the steps below. ## Branches - [main](https://github.com/a5chin/python-rye/tree/main) - [jupyter](https://github.com/a5chin/python-rye/tree/jupyter) +- [rye](https://github.com/a5chin/python-rye/tree/rye)(Archived) ## Dev Container - `devcontainer.json` @@ -64,9 +64,6 @@ Specifically, you can solve this problem by following the steps below. - [usernamehw.errorlens](https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens) - [yzhang.markdown-all-in-one](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one) - `Dockerfile` - - Rye - - `rye config --set-bool behavior.global-python=true` - - `rye config --set-bool behavior.use-uv=true` - Only Dev dependencies - `pre-commit` - `pytest` @@ -100,10 +97,10 @@ The `.pre-commit-config.yaml` file can contain scripts to be executed before com ```sh # Python Formatter -rye run ruff format . +uv run ruff format . # Python Linter -rye run ruff check . --fix +uv run ruff check . --fix # Docker Linter hodolint Dockerfile @@ -116,13 +113,13 @@ Only sync based on the production lockfile (`requirements.lock`) instead of the ```sh # Install also include develop dependencies -rye sync +uv sync # If you do not want dev dependencies to be installed -rye sync --no-dev +uv sync --no-dev # Use the add command to add dependencies to your project -rye add {libraries} +uv add {libraries} ``` ### The structure of this repository @@ -134,7 +131,7 @@ rye add {libraries} ├── Dockerfile ├── .github │ ├── actions -│ │ └── setup-python-with-rye +│ │ └── setup-python-with-uv │ │ └── action.yml │ ├── dependabot.yml │ └── workflows From 6b12c267889929f0f4a4ac84942d3cbe6d0773dc Mon Sep 17 00:00:00 2001 From: a5chin Date: Mon, 26 Aug 2024 12:36:43 +0000 Subject: [PATCH 14/17] fix: env --- .devcontainer/Dockerfile | 9 ++++++--- .devcontainer/devcontainer.json | 2 +- Dockerfile | 3 +++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 54b9e05..bdb5f3b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -19,15 +19,18 @@ RUN sh /uv-installer.sh FROM mcr.microsoft.com/vscode/devcontainers/base:bookworm + ENV CARGO_HOME="/opt/.cargo/bin" ENV PATH="$CARGO_HOME/:$PATH" -COPY --from=builder /root/.cargo/bin/uv $CARGO_HOME/uv + +ENV PYTHONUNBUFFERED=True +ENV UV_LINK_MODE=copy WORKDIR /opt +COPY --from=builder /root/.cargo/bin/uv $CARGO_HOME/uv COPY ./.python-version ./ -RUN uv python pin "$(cat .python-version)" -ENV PYTHONUNBUFFERED=True +RUN uv python pin "$(cat .python-version)" RUN chown -R vscode $CARGO_HOME diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 51fa773..4ee05ea 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -46,7 +46,7 @@ } } }, - "postCreateCommand": "uv sync", + "postCreateCommand": "uv sync --dev", "postStartCommand": "uv run pre-commit install", "remoteUser": "vscode" } diff --git a/Dockerfile b/Dockerfile index 04f1a88..ba80303 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,10 @@ ARG VARIANT=3.12 FROM python:${VARIANT} AS builder ENV PYTHONDONTWRITEBYTECODE=True +ENV UV_LINK_MODE=copy WORKDIR /opt + COPY pyproject.toml uv.lock ./ # hadolint ignore=DL3013,DL3042 @@ -11,6 +13,7 @@ RUN pip install --upgrade pip && \ pip install uv && \ uv sync --frozen + FROM python:${VARIANT}-slim COPY --from=builder /usr/local/lib/python*/site-packages /usr/local/lib/python*/site-packages From d28d08fead1086dd6273f4475a693f452dcc3415 Mon Sep 17 00:00:00 2001 From: a5chin Date: Mon, 26 Aug 2024 14:02:52 +0000 Subject: [PATCH 15/17] chore --- README.md | 14 +++++++------- pyproject.toml | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 96f5982..fad0dcb 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,11 @@ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) -[![Versions](https://img.shields.io/badge/python-3.9%20|%203.10%20|%203.11%20|%203.12%20-green.svg)](https://github.com/a5chin/python-rye) +[![Versions](https://img.shields.io/badge/python-3.9%20|%203.10%20|%203.11%20|%203.12%20-green.svg)](https://github.com/a5chin/python-uv) -[![Ruff](https://github.com/a5chin/python-rye/actions/workflows/ruff.yml/badge.svg)](https://github.com/a5chin/python-rye/actions/workflows/ruff.yml) -[![Test](https://github.com/a5chin/python-rye/actions/workflows/test.yml/badge.svg)](https://github.com/a5chin/python-rye/actions/workflows/test.yml) -[![Docker](https://github.com/a5chin/python-rye/actions/workflows/docker.yml/badge.svg)](https://github.com/a5chin/python-rye/actions/workflows/docker.yml) +[![Ruff](https://github.com/a5chin/python-uv/actions/workflows/ruff.yml/badge.svg)](https://github.com/a5chin/python-uv/actions/workflows/ruff.yml) +[![Test](https://github.com/a5chin/python-uv/actions/workflows/test.yml/badge.svg)](https://github.com/a5chin/python-uv/actions/workflows/test.yml) +[![Docker](https://github.com/a5chin/python-uv/actions/workflows/docker.yml/badge.svg)](https://github.com/a5chin/python-uv/actions/workflows/docker.yml) @@ -39,9 +39,9 @@ Specifically, you can solve this problem by following the steps below. - [The structure of this repository](#the-structure-of-this-repository) ## Branches -- [main](https://github.com/a5chin/python-rye/tree/main) -- [jupyter](https://github.com/a5chin/python-rye/tree/jupyter) -- [rye](https://github.com/a5chin/python-rye/tree/rye)(Archived) +- [main](https://github.com/a5chin/python-uv/tree/main) +- [jupyter](https://github.com/a5chin/python-uv/tree/jupyter) +- [rye](https://github.com/a5chin/python-uv/tree/rye)(Archived) ## Dev Container - `devcontainer.json` diff --git a/pyproject.toml b/pyproject.toml index 2a2137f..9a219c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,9 +5,9 @@ description = "Add your description here" authors = [ { name = "a5chin" } ] -dependencies = [] -readme = "README.md" requires-python = ">=3.9" +readme = "README.md" +dependencies = [] [tool.uv] dev-dependencies = [ From 03ebf38f31273e14460c957a8c1e105cd13526de Mon Sep 17 00:00:00 2001 From: a5chin Date: Mon, 26 Aug 2024 14:07:09 +0000 Subject: [PATCH 16/17] fix: steps --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5e53b56..5b647de 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,6 +14,7 @@ jobs: matrix: python-version: ['3.9', '3.10', '3.11', '3.12'] + steps: - name: Checkout uses: actions/checkout@v4 From 2877c4c8cc186428b099e5b04f5d4a607c4ec888 Mon Sep 17 00:00:00 2001 From: a5chin Date: Mon, 26 Aug 2024 14:36:57 +0000 Subject: [PATCH 17/17] fix: warn --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ba80303..c44753e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,4 +19,4 @@ COPY --from=builder /usr/local/lib/python*/site-packages /usr/local/lib/python*/ ENV PYTHONUNBUFFERED=True -WORKDIR $HOME +WORKDIR /