From 9ddfafb2121bc0b4b4ff431169cfe2c43faf1e83 Mon Sep 17 00:00:00 2001 From: Jakob Keller <57402305+jakob-keller@users.noreply.github.com> Date: Sun, 22 Dec 2024 18:01:42 +0100 Subject: [PATCH 1/2] build(python): add .python-version --- .gitignore | 3 --- .python-version | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) create mode 100644 .python-version diff --git a/.gitignore b/.gitignore index 0a1612c..f08be4b 100644 --- a/.gitignore +++ b/.gitignore @@ -81,9 +81,6 @@ target/ profile_default/ ipython_config.py -# pyenv -.python-version - # pipenv # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. # However, in case of collaboration, if having platform-specific dependencies or dependencies diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..c10780c --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.13.1 From cdc6870fa5e32fade95cefad4d23127b2d8446ed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 20:08:53 +0000 Subject: [PATCH 2/2] ci: fully leverage uv in GitHub workflows --- .github/workflows/release.yml | 11 ++--------- .github/workflows/test.yml | 10 ++-------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 60a9c08..cd26092 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,7 @@ jobs: pages: write id-token: write env: - UV_PYTHON_PREFERENCE: only-system + UV_FROZEN: 1 steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" @@ -40,14 +40,7 @@ jobs: fetch-depth: 0 - id: uv name: Install uv - uses: astral-sh/setup-uv@v4 - with: - enable-cache: true - version: "0.5.7" - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version-file: "pyproject.toml" + uses: astral-sh/setup-uv@v5 - id: cz name: Create bump and changelog uses: commitizen-tools/commitizen-action@0.23.0 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3cfd621..40c7423 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,8 +15,7 @@ jobs: python-version: [ "3.10", "3.11", "3.12", "3.13" ] env: PYTHON: ${{ matrix.python-version }} - UV_PYTHON_PREFERENCE: only-system - UV_LOCKED: 1 + UV_FROZEN: 1 steps: - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" @@ -24,12 +23,7 @@ jobs: - name: Check out repository code uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v4 - with: - enable-cache: true - version: "0.5.7" - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: astral-sh/setup-uv@v5 with: python-version: ${{ matrix.python-version }} - name: Check code formatting