Repository: ansys/actions
Pull request #754: feat: uv as default package manager
Author: login: moe-ad
Labels: name: enhancement
description: General improvements to existing features
name: ci
description: Pipelines maintenance related
Created: 2025-04-01T09:03:16Z | Merged: 2025-05-09T08:45:24Z

Closes #693

The idea is to make `uv` the default package manager in actions where it can bring much value — those where potentially a lot of packages will be installed.

So far these include:
- Actions where a project's library and/or its dependencies can be installed:
  - `_doc-build-linux`
  - `_doc-build-windows`
  - `build-wheel-house`
  - `check-licenses`
  - `check-vulnerabilities`
  - `code-style`
  - `tests-pytest`

- Actions where > two packages are installed:
  - `doc-deploy-changelog`

In actions where ≤ 2 packages are being installed, the idea is that `pip` is enough and I didn't touch those. They include:
- `_release-pypi`
- `build-library`
- `doc-changelog`
- `hk-package-clean-except`
- `hk-package-clean-untagged`


Implementing `uv` support has been done in a non-intrusive way, to accommodate those that do not want to use it. In the actions where `uv` is supported, a `use-uv` input has been added which defaults to true. Therefore, setting `use-uv=false` essentially reverts those actions to how they were before.

## IMPORTANT
> [!NOTE]  
> After discussions, `use-uv` has been set to default to true across all actions. This way, any issue can quickly surface when
> users switch to `v10` for quick fixes. Also, the `use-uv` option is now available across all actions for consistency.

Linked issue #693: Set uv as the default package manager
[uv] is a package manager written in Rust that has proven to be really fast and versatile. Considering how many projects we have, the amount of minutes employed by CI/CD is large. Using [uv] could significantly reduce CI/CD times at the end of the month.

To implement [uv] in our actions, we must:

- [ ] Collect data on the amount of minutes used by CI/CD at org level before implementing this
- [ ] Replace any `python -m pip install` by the `uv pip install`
- [ ] Ensure any compatibility with Poetry and other build systems
- [ ] Collect data on the amount of minutes used by CI/CD at org level after implementing this

[uv]: https://github.com/astral-sh/uv

Diff:
diff --git a/_doc-build-linux/action.yml b/_doc-build-linux/action.yml
index 7c5eebe88..ddd6cdb40 100644
--- a/_doc-build-linux/action.yml
+++ b/_doc-build-linux/action.yml
@@ -131,6 +131,13 @@ inputs:
     required: true
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
+    required: false
+    type: boolean
+
 runs:
   using: "composite"
   steps:
@@ -202,10 +209,15 @@ runs:
     - name: "Determine GitHub environment variables"
       id: environment-variables
       shell: bash
+      env:
+        USE_UV: ${{ inputs.use-uv }}
       run: |
         if [[ -f "pyproject.toml" ]] && grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then
           echo "BUILD_BACKEND=$(echo 'poetry')" >> $GITHUB_OUTPUT
           echo "SPHINX_BUILD_MAKE=$(echo 'poetry run -- make')" >> $GITHUB_OUTPUT
+        elif [[ "$USE_UV" == 'true' ]]; then
+          echo "BUILD_BACKEND=$(echo 'uv')" >> $GITHUB_OUTPUT
+          echo "SPHINX_BUILD_MAKE=$(echo 'uv run --no-sync -- make')" >> $GITHUB_OUTPUT
         else
           echo "BUILD_BACKEND=$(echo 'pip')" >> $GITHUB_OUTPUT
           echo "SPHINX_BUILD_MAKE=$(echo 'make')" >> $GITHUB_OUTPUT
@@ -254,13 +266,15 @@ runs:
       run: |
         python -m pip install pipx
         python -m pipx install poetry
-        python -m venv .venv
       env:
         PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
         PIPX_HOME : ${{ runner.temp }}/pipx/home
 
+    # NOTE: A virtual environment is needed regardless in all cases. In uv's case,
+    # the installation speed "uv pip" offers is what needs to be taken advantage of,
+    # using "uv venv" in a separate step is not necessary since "uv pip" will still
+    # work with existing virtual environments.
     - name: "Create a virtual environment"
-      if: steps.environment-variables.outputs.BUILD_BACKEND == 'pip'
       shell: bash
       run: |
         python -m venv .venv
@@ -269,9 +283,16 @@ runs:
 
     - name: "Update pip"
       shell: bash
+      env:
+        USE_UV: ${{ inputs.use-uv }}
       run: |
         source .venv/bin/activate
-        python -m pip install -U pip
+        if [[ "$USE_UV" == 'true' ]]; then
+          uv pip install -U pip
+        else
+          python -m pip install -U pip
+        fi
+
 
     - name: "Check if requirements.txt file exists"
       id: check-requirement-file-exists
@@ -282,13 +303,18 @@ runs:
         echo "EXISTS_DOC_REQUIREMENTS=$(if [ -f "${REQUIREMENTS_FILE}" ]; then echo 'true'; else echo 'false'; fi)" >> $GITHUB_OUTPUT
 
     - name: "Install documentation dependencies from requirements file"
+      if: steps.check-requirement-file-exists.outputs.EXISTS_DOC_REQUIREMENTS == 'true'
       shell: bash
       env:
         REQUIREMENTS_FILE: ${{ inputs.requirements-file }}
-      if: steps.check-requirement-file-exists.outputs.EXISTS_DOC_REQUIREMENTS == 'true'
+        USE_UV: ${{ inputs.use-uv }}
       run: |
         source .venv/bin/activate
-        python -m pip install -r "${REQUIREMENTS_FILE}"
+        if [[ "${USE_UV}" == 'true' ]]; then
+          uv pip install -r "${REQUIREMENTS_FILE}"
+        else
+          python -m pip install -r "${REQUIREMENTS_FILE}"
+        fi
 
     - name: "Install Python library"
       shell: bash
@@ -299,6 +325,8 @@ runs:
         source .venv/bin/activate
         if [[ "${BUILD_BACKEND}" == 'poetry' ]]; then
           poetry install
+        elif [[ "$BUILD_BACKEND" == 'uv' ]]; then
+          uv pip install .
         else
           python -m pip install .
         fi
@@ -312,6 +340,8 @@ runs:
         source .venv/bin/activate
         if [[ "${BUILD_BACKEND}" == 'poetry' ]]; then
           poetry install --with doc
+        elif [[ "$BUILD_BACKEND" == 'uv' ]]; then
+          uv pip install .[doc]
         else
           python -m pip install .[doc]
         fi
diff --git a/_doc-build-windows/action.yml b/_doc-build-windows/action.yml
index e52456cbe..3f005035b 100644
--- a/_doc-build-windows/action.yml
+++ b/_doc-build-windows/action.yml
@@ -123,6 +123,13 @@ inputs:
     required: true
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
+    required: false
+    type: boolean
+
 runs:
   using: "composite"
   steps:
@@ -226,11 +233,18 @@ runs:
     - name: "Determine GitHub environment variables"
       id: determine-environment-variables
       shell: powershell
+      env:
+        USE_UV: ${{ inputs.use-uv }}
       run: |
         if ((Test-Path "pyproject.toml") -and (Get-Content "pyproject.toml" | Select-String -Pattern 'build-backend = "poetry\.core\.masonry\.api"')) {
           echo "BUILD_BACKEND=$(echo 'poetry')" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
           echo "SPHINX_BUILD_MAKE=$(echo 'poetry run -- make.bat')" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
-        } else {
+        }
+        elseif ($env:USE_UV -eq "true") {
+          echo "BUILD_BACKEND=$(echo 'uv')" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
+          echo "SPHINX_BUILD_MAKE=$(echo 'uv run --no-sync -- .\make.bat')" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
+        }
+        else {
           echo "BUILD_BACKEND=$(echo 'pip')" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
           echo "SPHINX_BUILD_MAKE=$(echo '.\make.bat')" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
         }
@@ -278,13 +292,11 @@ runs:
       run: |
         python -m pip install pipx
         python -m pipx install poetry
-        python -m venv .venv
       env:
         PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
         PIPX_HOME : ${{ runner.temp }}/pipx/home
 
     - name: "Create a virtual environment"
-      if: steps.determine-environment-variables.outputs.BUILD_BACKEND == 'pip'
       shell: powershell
       run: python -m venv .venv
 
@@ -292,9 +304,15 @@ runs:
 
     - name: "Update pip"
       shell: powershell
+      env:
+        USE_UV: ${{ inputs.use-uv }}
       run: |
         .venv\Scripts\Activate.ps1
-        python -m pip install -U pip
+        if ($env:USE_UV -eq "true") {
+          uv pip install -U pip
+        } else {
+          python -m pip install -U pip
+        }
 
     - name: "Check if requirements.txt file exists"
       id: check-requirements-file-exists
@@ -308,10 +326,15 @@ runs:
       shell: powershell
       env:
         REQUIREMENTS_FILE: ${{ inputs.requirements-file }}
+        USE_UV: ${{ inputs.use-uv }}
       if: ${{ steps.check-requirements-file-exists.outputs.EXISTS_DOC_REQUIREMENTS == 'true' }}
       run: |
         .venv\Scripts\Activate.ps1
-        python -m pip install -r "$env:REQUIREMENTS_FILE"
+        if ($env:USE_UV -eq "true") {
+          uv pip install -r "$env:REQUIREMENTS_FILE"
+        } else {
+          python -m pip install -r "$env:REQUIREMENTS_FILE"
+        }
 
     - name: Install Python library
       shell: powershell
@@ -320,8 +343,10 @@ runs:
         BUILD_BACKEND: ${{ steps.determine-environment-variables.outputs.BUILD_BACKEND }}
       run: |
         .venv\Scripts\Activate.ps1
-        if ("$env:BUILD_BACKEND" -eq 'poetry' ) {
+        if ($env:BUILD_BACKEND -eq "poetry") {
           poetry install
+        } elseif ($env:BUILD_BACKEND -eq "uv") {
+          uv pip install .
         } else {
           python -m pip install .
         }
@@ -333,8 +358,10 @@ runs:
         BUILD_BACKEND: ${{ steps.determine-environment-variables.outputs.BUILD_BACKEND }}
       run: |
         .venv\Scripts\Activate.ps1
-        if ("$env:BUILD_BACKEND" -eq 'poetry' ) {
+        if ($env:BUILD_BACKEND -eq "poetry") {
           poetry install --with doc
+        } elseif ($env:BUILD_BACKEND -eq "uv") {
+          uv pip install .[doc]
         } else {
           python -m pip install .[doc]
         }
diff --git a/_release-pypi/action.yml b/_release-pypi/action.yml
index 237df6591..e9cbb7c5d 100644
--- a/_release-pypi/action.yml
+++ b/_release-pypi/action.yml
@@ -96,6 +96,13 @@ inputs:
     required: true
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
+    required: false
+    type: boolean
+
 runs:
   using: "composite"
   steps:
@@ -125,11 +132,14 @@ runs:
       with:
         python-version: ${{ inputs.python-version }}
         use-cache: false
+        provision-uv: ${{ inputs.use-uv }}
 
     - name: "Install twine"
       shell: bash
+      env:
+        INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python' || 'python -m pip install' }}
       run: |
-        python -m pip install --upgrade pip twine
+        ${INSTALL_COMMAND} --upgrade pip twine
 
     - name: "Download the library artifacts from build-library step"
       uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
diff --git a/_setup-python/action.yml b/_setup-python/action.yml
index e6e330909..a4caac171 100644
--- a/_setup-python/action.yml
+++ b/_setup-python/action.yml
@@ -32,6 +32,11 @@ inputs:
     description: 'Whether to use Python cache or not. Requires a pyproject.toml file.'
     required: true
     type: boolean
+  provision-uv:
+    description: 'Whether to provision uv alongside Python'
+    default: false
+    required: true
+    type: boolean
 
 runs:
   using: "composite"
@@ -50,3 +55,7 @@ runs:
       if: inputs.use-cache == 'false'
       with:
         python-version: ${{ inputs.python-version }}
+
+    - name: "Set up uv"
+      uses: astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182 # v5.4.1
+      if: ${{ inputs.provision-uv == 'true' }}
\ No newline at end of file
diff --git a/build-library/action.yml b/build-library/action.yml
index 2345aa760..2c80dfaa8 100644
--- a/build-library/action.yml
+++ b/build-library/action.yml
@@ -86,6 +86,13 @@ inputs:
     default: false
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
+    required: false
+    type: boolean
+
 runs:
   using: "composite"
   steps:
@@ -98,11 +105,14 @@ runs:
       with:
         python-version: ${{ inputs.python-version }}
         use-cache: ${{ inputs.use-python-cache }}
+        provision-uv: ${{ inputs.use-uv }}
 
     - name: "Install build and twine"
       shell: bash
+      env:
+        INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python' || 'python -m pip install' }}
       run: |
-        python -m pip install build twine
+        ${INSTALL_COMMAND} build twine
 
     - name: "Build distribution artifacts"
       shell: bash
diff --git a/build-wheelhouse/action.yml b/build-wheelhouse/action.yml
index 7ce3c9fc2..74aed83ed 100644
--- a/build-wheelhouse/action.yml
+++ b/build-wheelhouse/action.yml
@@ -131,6 +131,13 @@ inputs:
     default: false
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
+    required: false
+    type: boolean
+
 runs:
   using: "composite"
   steps:
@@ -144,17 +151,22 @@ runs:
       with:
         python-version: ${{ inputs.python-version }}
         use-cache: ${{ inputs.use-python-cache }}
+        provision-uv: ${{ inputs.use-uv }}
 
     - name: "Update pip"
       shell: bash
+      env:
+        INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python' || 'python -m pip install' }}
       run: |
-        python -m pip install --upgrade pip
+        $INSTALL_COMMAND -U pip
 
     - name: "Optionally install build and wheel"
       if: ${{ inputs.install-build-and-wheel == 'true' }}
       shell: bash
+      env:
+        INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python' || 'python -m pip install' }}
       run: |
-        python -m pip install build wheel
+        $INSTALL_COMMAND build wheel
 
     - name: "Check if specific target is requested"
       id: specific-target-requested
@@ -169,9 +181,10 @@ runs:
     - name: "Install the library"
       shell: bash
       env:
+        INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python' || 'python -m pip install' }}
         INSTALL_TARGET: ${{ steps.specific-target-requested.outputs.install_target }}
       run: |
-        python -m pip install "${INSTALL_TARGET}"
+        ${INSTALL_COMMAND} "${INSTALL_TARGET}"
 
     - name: "Verify if importlib-metadata needs to be installed"
       id: needs-importlib-metadata
@@ -193,8 +206,10 @@ runs:
     - name: "Install importlib-metadata (only for Python <= 3.7)"
       if: steps.needs-importlib-metadata.outputs.needs_importlib_metadata == 'true'
       shell: bash
+      env:
+        INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python' || 'python -m pip install' }}
       run: |
-        python -m pip install importlib-metadata
+        $INSTALL_COMMAND importlib-metadata
 
     - name: "Verify library is properly installed and get its version number"
       id: library-version
diff --git a/check-licenses/action.yml b/check-licenses/action.yml
index 55415a3a3..b46599c9f 100644
--- a/check-licenses/action.yml
+++ b/check-licenses/action.yml
@@ -115,6 +115,13 @@ inputs:
     required: false
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
+    required: false
+    type: boolean
+
 runs:
   using: "composite"
   steps:
@@ -148,11 +155,14 @@ runs:
       with:
         python-version: ${{ inputs.python-version }}
         use-cache: ${{ inputs.use-python-cache }}
+        provision-uv: ${{ inputs.use-uv }}
 
     - name: "Update pip"
       shell: bash
+      env:
+        INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python' || 'python -m pip install' }}
       run: |
-        python -m pip install -U pip
+        $INSTALL_COMMAND -U pip
 
     - name: Clone ansys/pip-licenses on main branch
       uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -163,8 +173,10 @@ runs:
 
     - name: Install ansys/pip-licenses main branch
       shell: bash
+      env:
+        INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python --no-cache' || 'python -m pip install --no-cache-dir' }}
       run: |
-        python -m pip install --no-cache-dir external/pip-licenses
+        $INSTALL_COMMAND external/pip-licenses
 
     - name: "Check if specific target is requested"
       id: specific-target-requested
@@ -179,7 +191,8 @@ runs:
       shell: bash
       env:
         INSTALL_TARGET: ${{ steps.specific-target-requested.outputs.install_target }}
-      run: python -m pip install "${INSTALL_TARGET}"
+        INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python' || 'python -m pip install' }}
+      run: ${INSTALL_COMMAND} "$INSTALL_TARGET"
 
     - name:  "Install wget on Windows"
       if: runner.os == 'Windows'
diff --git a/check-vulnerabilities/action.yml b/check-vulnerabilities/action.yml
index a08686617..8936eb5ea 100644
--- a/check-vulnerabilities/action.yml
+++ b/check-vulnerabilities/action.yml
@@ -167,6 +167,13 @@ inputs:
     required: false
     type: string
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
+    required: false
+    type: boolean
+
 runs:
   using: "composite"
   steps:
@@ -207,9 +214,13 @@ runs:
     - name: "Determine GitHub environment variables"
       id: github-environment-variables
       shell: bash
+      env:
+        USE_UV: ${{ inputs.use-uv }}
       run: |
         if [[ -f "pyproject.toml" ]] && grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then
           echo "BUILD_BACKEND=$(echo 'poetry')" >> ${GITHUB_OUTPUT}
+        elif [[ "${USE_UV}" == 'true' ]]; then
+          echo "BUILD_BACKEND=$(echo 'uv')" >> ${GITHUB_OUTPUT}
         else
           echo "BUILD_BACKEND=$(echo 'pip')" >> ${GITHUB_OUTPUT}
         fi
@@ -233,6 +244,7 @@ runs:
       with:
         python-version: ${{ inputs.python-version }}
         use-cache: false
+        provision-uv: ${{ inputs.use-uv }}
 
     # NOTE: Installation of poetry in a separate environment to the project to
     # avoid situations in which both poetry and the project have shared
@@ -262,13 +274,15 @@ runs:
       run: |
         python -m pip install pipx
         python -m pipx install poetry
-        python -m venv .venv
       env:
         PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
         PIPX_HOME : ${{ runner.temp }}/pipx/home
 
+    # NOTE: A virtual environment is needed regardless in all cases. In uv's case,
+    # the installation speed "uv pip" offers is what needs to be taken advantage of,
+    # using "uv venv" in a separate step is not necessary since "uv pip" will still
+    # work with existing virtual environments.
     - name: "Create a virtual environment"
-      if: steps.github-environment-variables.outputs.BUILD_BACKEND == 'pip'
       shell: bash
       run: |
         python -m venv .venv
@@ -289,9 +303,14 @@ runs:
       shell: bash
       env:
         ACTIVATE_VENV: ${{ steps.virtual-environment-activation-command.outputs.ACTIVATE_VENV }}
+        USE_UV: ${{ inputs.use-uv }}
       run: |
         ${ACTIVATE_VENV}
-        python -m pip install -U pip
+        if [[ "${USE_UV}" == 'true' ]]; then
+          uv pip install -U pip
+        else
+          python -m pip install -U pip
+        fi
 
     - name: "Install library"
       shell: bash
@@ -318,6 +337,8 @@ runs:
 
         if [[ "${BUILD_BACKEND}" == 'poetry' ]]; then
           poetry install --extras "${extra_targets}"
+        elif [[ "${BUILD_BACKEND}" == 'uv' ]]; then
+          uv pip install ."${extra_targets}"
         else
           python -m pip install ."${extra_targets}"
         fi
@@ -329,7 +350,11 @@ runs:
         ACTION_PATH: ${{ github.action_path }}
       run: |
         ${ACTIVATE_VENV}
-        python -m pip install -r "${ACTION_PATH}/requirements.txt"
+        if [[ "${BUILD_BACKEND}" == 'uv' ]]; then
+          uv pip install -r "${ACTION_PATH}/requirements.txt"
+        else
+          python -m pip install -r "${ACTION_PATH}/requirements.txt"
+        fi
 
     - name: "Download the list of ignored safety vulnerabilities"
       shell: bash
diff --git a/code-style/action.yml b/code-style/action.yml
index c3eb16722..cac2cad30 100644
--- a/code-style/action.yml
+++ b/code-style/action.yml
@@ -103,6 +103,13 @@ inputs:
     default: true
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
+    required: false
+    type: boolean
+
 runs:
   using: "composite"
   steps:
@@ -120,10 +127,14 @@ runs:
 
     - name: "Determine GitHub environment variables"
       id: github-environment-variables
+      env:
+        USE_UV: ${{ inputs.use-uv }}
       shell: bash
       run: |
         if [[ -f "pyproject.toml" ]] && grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then
           echo "BUILD_BACKEND=$(echo 'poetry')" >> ${GITHUB_OUTPUT}
+        elif [[ "${USE_UV}" == 'true' ]]; then
+          echo "BUILD_BACKEND=$(echo 'uv')" >> ${GITHUB_OUTPUT}
         else
           echo "BUILD_BACKEND=$(echo 'pip')" >> ${GITHUB_OUTPUT}
         fi
@@ -147,6 +158,7 @@ runs:
       with:
         python-version: ${{ inputs.python-version }}
         use-cache: ${{ inputs.use-python-cache }}
+        provision-uv: ${{ inputs.use-uv }}
 
     # NOTE: Installation of poetry in a separate environment to the project to
     # avoid situations in which both poetry and the project have shared
@@ -176,13 +188,15 @@ runs:
       run: |
         python -m pip install pipx
         python -m pipx install poetry
-        python -m venv .venv
       env:
         PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
         PIPX_HOME: ${{ runner.temp }}/pipx/home
 
+    # NOTE: A virtual environment is needed regardless in all cases. In uv's case,
+    # the installation speed "uv pip" offers is what needs to be taken advantage of,
+    # using "uv venv" in a separate step is not necessary since "uv pip" will still
+    # work with existing virtual environments.
     - name: "Create a virtual environment"
-      if: steps.github-environment-variables.outputs.BUILD_BACKEND == 'pip'
       shell: bash
       run: |
         python -m venv .venv
@@ -203,9 +217,14 @@ runs:
       shell: bash
       env:
         ACTIVATE_VENV: ${{ steps.virtual-environment-activation-command.outputs.ACTIVATE_VENV }}
+        USE_UV: ${{ inputs.use-uv }}
       run: |
         ${ACTIVATE_VENV}
-        python -m pip install -U pip
+        if [[ "${USE_UV}" == 'true' ]]; then
+          uv pip install -U pip
+        else
+          python -m pip install -U pip
+        fi
 
     - name: "Install project (if required)"
       if: inputs.skip-install == 'false'
@@ -214,10 +233,11 @@ runs:
         BUILD_BACKEND: ${{ steps.github-environment-variables.outputs.BUILD_BACKEND }}
         ACTIVATE_VENV: ${{ steps.virtual-environment-activation-command.outputs.ACTIVATE_VENV }}
       run: |
-        $ACTIVATE_VENV
+        ${ACTIVATE_VENV}
         if [[ "${BUILD_BACKEND}" == 'poetry' ]]; then
-          python -m pip install poetry
-          python -m poetry install
+          poetry install
+        elif [[ "${BUILD_BACKEND}" == 'uv' ]]; then
+          uv pip install .
         else
           python -m pip install .
         fi
@@ -229,7 +249,11 @@ runs:
         ACTIVATE_VENV: ${{ steps.virtual-environment-activation-command.outputs.ACTIVATE_VENV }}
       run: |
         ${ACTIVATE_VENV}
-        python -m pip install "pre-commit==${PRE_COMMIT_VERSION}"
+        if [[ "${BUILD_BACKEND}" == 'uv' ]]; then
+          uv pip install "pre-commit==${PRE_COMMIT_VERSION}"
+        else
+          python -m pip install "pre-commit==${PRE_COMMIT_VERSION}"
+        fi
         pre-commit install
 
     - name: "Run pre-commit"
diff --git a/doc-build/action.yml b/doc-build/action.yml
index 14ac059cf..ecf40993f 100644
--- a/doc-build/action.yml
+++ b/doc-build/action.yml
@@ -181,6 +181,13 @@ inputs:
     required: false
     type: boolean
 
+  use-uv:
+    description: >
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
+    required: false
+    type: boolean
+
 runs:
   using: "composite"
   steps:
@@ -196,6 +203,7 @@ runs:
       with:
         python-version: ${{ inputs.python-version }}
         use-cache: ${{ inputs.use-python-cache }}
+        provision-uv: ${{ inputs.use-uv }}
 
     # ------------------------------------------------------------------------
 
@@ -213,6 +221,7 @@ runs:
         check-links: ${{ inputs.check-links }}
         add-pdf-html-docs-as-assets: ${{ inputs.add-pdf-html-docs-as-assets }}
         needs-quarto: ${{ inputs.needs-quarto }}
+        use-uv: ${{ inputs.use-uv }}
 
     # ------------------------------------------------------------------------
 
@@ -237,3 +246,4 @@ runs:
         check-links: ${{ inputs.check-links }}
         add-pdf-html-docs-as-assets: ${{ inputs.add-pdf-html-docs-as-assets }}
         needs-quarto: ${{ inputs.needs-quarto }}
+        use-uv: ${{ inputs.use-uv }}
diff --git a/doc-changelog/action.yml b/doc-changelog/action.yml
index 2cd28192b..47996768c 100644
--- a/doc-changelog/action.yml
+++ b/doc-changelog/action.yml
@@ -105,6 +105,13 @@ inputs:
     default: true
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
+    required: false
+    type: boolean
+
 runs:
   using: "composite"
   steps:
@@ -122,14 +129,16 @@ runs:
       with:
         python-version: ${{ inputs.python-version }}
         use-cache: ${{ inputs.use-python-cache }}
+        provision-uv: ${{ inputs.use-uv }}
 
     - name: "Install towncrier"
       shell: bash
       env:
         TOWNCRIER_VERSION: ${{ inputs.towncrier-version }}
         TOML_VERSION: ${{ inputs.toml-version }}
+        INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python' || 'python -m pip install' }}
       run: |
-        python -m pip install --upgrade pip towncrier==${TOWNCRIER_VERSION} toml==${TOML_VERSION}
+        ${INSTALL_COMMAND} --upgrade pip towncrier==${TOWNCRIER_VERSION} toml==${TOML_VERSION}
 
     - name: "Get first letter of conventional commit type"
       if: ${{ inputs.use-conventional-commits == 'true' }}
diff --git a/doc-deploy-changelog/action.yml b/doc-deploy-changelog/action.yml
index b5f8f4147..7f8e7df8a 100644
--- a/doc-deploy-changelog/action.yml
+++ b/doc-deploy-changelog/action.yml
@@ -133,6 +133,13 @@ inputs:
     default: true
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
+    required: false
+    type: boolean
+
   release-from-main:
     description: |
       If ``false``, you pushed a tag from a release branch. This is applicable for most
@@ -189,6 +196,7 @@ runs:
       with:
         python-version: ${{ inputs.python-version }}
         use-cache: ${{ inputs.use-python-cache }}
+        provision-uv: ${{ inputs.use-uv }}
 
     - name: Save tag version
       id: save-tag-version
@@ -201,9 +209,14 @@ runs:
       env:
         TOWNCRIER_VERSION: ${{ inputs.towncrier-version }}
         TOML_VERSION: ${{ inputs.toml-version }}
+        USE_UV: ${{ inputs.use-uv }}
       shell: bash
       run: |
-        python -m pip install --upgrade pip towncrier=="${TOWNCRIER_VERSION}" toml=="${TOML_VERSION}"
+        if [[ "$USE_UV" == "true" ]]; then
+          uv pip install --upgrade pip towncrier=="${TOWNCRIER_VERSION}" toml=="${TOML_VERSION}"
+        else
+          python -m pip install --upgrade pip towncrier=="${TOWNCRIER_VERSION}" toml=="${TOML_VERSION}"
+        fi
 
     - name: "Get towncrier directory and project name"
       shell: python
diff --git a/doc-style/action.yml b/doc-style/action.yml
index 0efa64cd2..9579516c8 100644
--- a/doc-style/action.yml
+++ b/doc-style/action.yml
@@ -153,7 +153,7 @@ runs:
     - name: "Install docutils"
       shell: bash
       run: |
-        python -m pip install --upgrade pip docutils
+        python -m pip install --upgrade docutils
 
     - name: "Get towncrier directory"
       shell: python
diff --git a/doc/source/changelog/754.added.md b/doc/source/changelog/754.added.md
new file mode 100644
index 000000000..7bb3ccfdd
--- /dev/null
+++ b/doc/source/changelog/754.added.md
@@ -0,0 +1 @@
+uv as default package manager
\ No newline at end of file
diff --git a/doc/styles/config/vocabularies/ANSYS/accept.txt b/doc/styles/config/vocabularies/ANSYS/accept.txt
index 36f44da83..1cbea4303 100644
--- a/doc/styles/config/vocabularies/ANSYS/accept.txt
+++ b/doc/styles/config/vocabularies/ANSYS/accept.txt
@@ -16,3 +16,4 @@ PyAnsys Dashboard
 robots.txt
 rulesets
 rst
+uv
\ No newline at end of file
diff --git a/hk-package-clean-except/action.yml b/hk-package-clean-except/action.yml
index 1e155f40d..8ea4404be 100644
--- a/hk-package-clean-except/action.yml
+++ b/hk-package-clean-except/action.yml
@@ -51,6 +51,12 @@ inputs:
     default: '3.11'
     required: false
     type: string
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
+    required: false
+    type: boolean
 
 runs:
   using: "composite"
@@ -61,13 +67,16 @@ runs:
       with:
         python-version: ${{ inputs.python-version }}
         use-cache: false
+        provision-uv: ${{ inputs.use-uv }}
 
     - name: "Install ghapi"
       shell: bash
+      env:
+        INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python' || 'python -m pip install' }}
       run: |
 
-        python -m pip install --upgrade pip
-        pip install ghapi
+        ${INSTALL_COMMAND} --upgrade pip
+        ${INSTALL_COMMAND} ghapi
 
     - name: "Declare Python script"
       shell: bash
diff --git a/hk-package-clean-untagged/action.yml b/hk-package-clean-untagged/action.yml
index e1ada5e85..e66a5995c 100644
--- a/hk-package-clean-untagged/action.yml
+++ b/hk-package-clean-untagged/action.yml
@@ -47,6 +47,12 @@ inputs:
     default: '3.11'
     required: false
     type: string
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
+    required: false
+    type: boolean
 
 runs:
   using: "composite"
@@ -57,13 +63,16 @@ runs:
       with:
         python-version: ${{ inputs.python-version }}
         use-cache: false
+        provision-uv: ${{ inputs.use-uv }}
 
     - name: "Install ghapi"
       shell: bash
+      env:
+        INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python' || 'python -m pip install' }}
       run: |
 
-        python -m pip install --upgrade pip
-        pip install ghapi
+        ${INSTALL_COMMAND} --upgrade pip
+        ${INSTALL_COMMAND} ghapi
 
     - name: "Clone script"
       shell: bash
diff --git a/release-github/action.yml b/release-github/action.yml
index d8840d797..8a015a060 100644
--- a/release-github/action.yml
+++ b/release-github/action.yml
@@ -144,6 +144,13 @@ inputs:
     required: false
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
+    required: false
+    type: boolean
+
 runs:
   using: "composite"
   steps:
@@ -291,9 +298,10 @@ runs:
       env:
         TOML_VERSION: ${{ inputs.toml-version }}
         PYPANDOC_BINARY_VERSION: ${{ inputs.pypandoc-binary-version }}
+        INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python' || 'python -m pip install' }}
       run: |
-        python -m pip install --upgrade pip toml=="$TOML_VERSION"
-        python -m pip install pypandoc-binary=="$PYPANDOC_BINARY_VERSION"
+        ${INSTALL_COMMAND} --upgrade pip toml=="$TOML_VERSION"
+        ${INSTALL_COMMAND} pypandoc-binary=="$PYPANDOC_BINARY_VERSION"
 
     - name: "Get the release notes body"
       if: inputs.changelog-release-notes == 'true'
diff --git a/tests-pytest/action.yml b/tests-pytest/action.yml
index d4c832c58..6f21a612c 100644
--- a/tests-pytest/action.yml
+++ b/tests-pytest/action.yml
@@ -111,6 +111,13 @@ inputs:
     default: false
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
+    required: false
+    type: boolean
+
 runs:
   using: "composite"
   steps:
@@ -130,9 +137,13 @@ runs:
     - name: "Determine GitHub environment variables"
       id: github-environment-variables
       shell: bash
+      env:
+        USE_UV: ${{ inputs.use-uv }}
       run: |
         if [[ -f "pyproject.toml" ]] && grep -q 'build-backend = "poetry\.core\.masonry\.api"' "pyproject.toml"; then
           echo "BUILD_BACKEND=$(echo 'poetry')" >> $GITHUB_OUTPUT
+        elif [[ "$USE_UV" == 'true' ]]; then
+          echo "BUILD_BACKEND=$(echo 'uv')" >> $GITHUB_OUTPUT
         else
           echo "BUILD_BACKEND=$(echo 'pip')" >> $GITHUB_OUTPUT
         fi
@@ -156,6 +167,7 @@ runs:
       with:
         python-version: ${{ inputs.python-version }}
         use-cache: ${{ inputs.use-python-cache }}
+        provision-uv: ${{ inputs.use-uv }}
 
     # NOTE: Installation of poetry in a separate environment to the project to
     # avoid situations in which both poetry and the project have shared
@@ -185,13 +197,15 @@ runs:
       run: |
         python -m pip install pipx
         python -m pipx install poetry
-        python -m venv .venv
       env:
         PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
         PIPX_HOME : ${{ runner.temp }}/pipx/home
 
+    # NOTE: A virtual environment is needed regardless in all cases. In uv's case,
+    # the installation speed "uv pip" offers is what needs to be taken advantage of,
+    # using "uv venv" in a separate step is not necessary since "uv pip" will still
+    # work with existing virtual environments.
     - name: "Create a virtual environment"
-      if: steps.github-environment-variables.outputs.BUILD_BACKEND == 'pip'
       shell: bash
       run: |
         python -m venv .venv
@@ -212,9 +226,14 @@ runs:
       shell: bash
       env:
         ACTIVATE_VENV: ${{ steps.virtual-environment-activation-command.outputs.ACTIVATE_VENV }}
+        USE_UV: ${{ inputs.use-uv }}
       run: |
         $ACTIVATE_VENV
-        python -m pip install -U pip
+        if [[ "$USE_UV" == 'true' ]]; then
+          uv pip install -U pip
+        else
+          python -m pip install -U pip
+        fi
 
     - name: "Install project (if required)"
       if: inputs.skip-install == 'false'
@@ -225,8 +244,9 @@ runs:
       run: |
         $ACTIVATE_VENV
         if [[ "$BUILD_BACKEND" == 'poetry' ]]; then
-          python -m pip install poetry
           poetry install
+        elif [[ "$BUILD_BACKEND" == 'uv' ]]; then
+          uv pip install .
         else
           python -m pip install .
         fi
@@ -259,9 +279,14 @@ runs:
       env:
         OPTIONAL_DEPENDENCIES_NAME: ${{ inputs.optional-dependencies-name }}
         ACTIVATE_VENV: ${{ steps.virtual-environment-activation-command.outputs.ACTIVATE_VENV }}
+        USE_UV: ${{ inputs.use-uv }}
       run: |
         $ACTIVATE_VENV
-        python -m pip install -r requirements/requirements_${OPTIONAL_DEPENDENCIES_NAME}.txt
+        if [[ "$USE_UV" == 'true' ]]; then
+          uv pip install -r requirements/requirements_${OPTIONAL_DEPENDENCIES_NAME}.txt
+        else
+          python -m pip install -r requirements/requirements_${OPTIONAL_DEPENDENCIES_NAME}.txt
+        fi
 
     - name: "Install test dependencies from pyproject.toml"
       shell: bash
@@ -274,6 +299,8 @@ runs:
         $ACTIVATE_VENV
         if [[ "$BUILD_BACKEND" == 'poetry' ]]; then
           poetry install --with "$OPTIONAL_DEPENDENCIES_NAME"
+        elif [[ "$BUILD_BACKEND" == 'uv' ]]; then
+          uv pip install ".[${OPTIONAL_DEPENDENCIES_NAME}]"
         else
           python -m pip install ".[${OPTIONAL_DEPENDENCIES_NAME}]"
         fi
@@ -286,6 +313,8 @@ runs:
       run: |
         if [[ "$BUILD_BACKEND" == 'poetry' ]]; then
           echo "PYTEST_RUN=$(echo 'poetry run pytest')" >> $GITHUB_OUTPUT
+        elif [[ "$BUILD_BACKEND" == 'uv' ]]; then
+          echo "PYTEST_RUN=$(echo 'uv run --no-sync pytest')" >> $GITHUB_OUTPUT
         else
           echo "PYTEST_RUN=$(echo 'python -m pytest')" >> $GITHUB_OUTPUT
         fi
@@ -294,7 +323,11 @@ runs:
       shell: bash
       if: inputs.randomize == 'true'
       run: |
-        python -m pip install pytest-randomly
+        if [[ "$BUILD_BACKEND" == 'uv' ]]; then
+          uv pip install pytest-randomly
+        else
+          python -m pip install pytest-randomly
+        fi
 
     - name: "Executing test suite"
       if: inputs.requires-xvfb == 'false'


Reviews:
user: login: jorgepiloto
state: CHANGES_REQUESTED
author_association: MEMBER
submitted_at: 2025-04-30T12:48:32Z
user: login: moe-ad
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-30T14:06:11Z
user: login: jorgepiloto
body: One last comment before approving, @moe-ad.
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-05T09:09:09Z
user: login: moe-ad
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-05T09:49:30Z
user: login: jorgepiloto
body: After a quick discussion, the install of some packages used during the CI/CD for certain actions do not have a long number of dependencies. Therefore, I am approving on my side.
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-05T13:54:24Z
user: login: SMoraisAnsys
body: I left some comments. The comment on venv creation needs to be addressed as it could introduce unexpected behaviors for users.
state: CHANGES_REQUESTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-06T09:20:08Z
user: login: moe-ad
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-06T10:23:35Z
user: login: moe-ad
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-06T10:25:55Z
user: login: moe-ad
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-06T10:41:44Z
user: login: moe-ad
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-06T10:44:34Z
user: login: SMoraisAnsys
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-06T12:37:35Z
user: login: moe-ad
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-06T14:00:04Z
user: login: SMoraisAnsys
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-06T14:25:48Z
user: login: moe-ad
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-06T15:31:43Z
user: login: SMoraisAnsys
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-06T16:29:00Z
user: login: jorgepiloto
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-06T18:21:30Z
user: login: RobPasMue
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-07T06:05:21Z
user: login: moe-ad
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T07:46:48Z
user: login: SMoraisAnsys
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T08:16:47Z
user: login: SMoraisAnsys
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T08:18:23Z
user: login: MaxJPRey
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T08:21:58Z
user: login: MaxJPRey
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T08:22:32Z
user: login: MaxJPRey
body: Excellent work @moe-ad .
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T08:23:38Z
user: login: moe-ad
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T09:07:02Z
user: login: moe-ad
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T09:07:53Z
user: login: moe-ad
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T09:08:56Z
user: login: MaxJPRey
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T09:11:39Z
user: login: jorgepiloto
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-07T12:04:55Z
user: login: jorgepiloto
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-09T07:29:20Z

Review comments:
path: _setup-python/action.yml
user: login: jorgepiloto
body: Shouldn't we install Python via `uv` rather than installing both side by side?
created_at: 2025-04-30T12:48:19Z
author_association: MEMBER
path: _setup-python/action.yml
user: login: moe-ad
body: If we do this, that would mean projects won't have a way of not using `uv` when using affected actions. My understanding is that we will still allow this flexibility.

**Note** that `uv` by itself doesn't bundle any python versions, they are downloaded as needed if they aren't already available (or when forced to do so via some CLI arguments). `uv` is still able to do it's job with python installations not provisioned through it. Same goes for `astral/setup-uv`, it installs just the `uv` executable on the runner if additional options relating to how python should be set up aren't passed.

With all of this in mind, we can set things up in a non-intrusive way and this is what I have done. Users only need to set `use-uv: false` in affected actions and workflows becomes essentially the same as they were before. Win-win, if I am allowed to call it that ^^
created_at: 2025-04-30T14:06:11Z
author_association: CONTRIBUTOR
diff_hunk: @@ -254,13 +266,15 @@ runs:
       run: |
         python -m pip install pipx
         python -m pipx install poetry
-        python -m venv .venv
       env:
         PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
         PIPX_HOME : ${{ runner.temp }}/pipx/home
 
+    # NOTE: A virtual environment is needed regardless in all cases. In uv's case,
+    # the installation speed "uv pip" offers is what needs to be taken advantage of,
+    # using "uv venv" in a separate step is not necessary since "uv pip" will still
+    # work with existing virtual environments.
path: _doc-build-linux/action.yml
user: login: jorgepiloto
body: Even when created using the `python -m venv .venv`?
created_at: 2025-05-05T09:08:47Z
author_association: MEMBER
diff_hunk: @@ -254,13 +266,15 @@ runs:
       run: |
         python -m pip install pipx
         python -m pipx install poetry
-        python -m venv .venv
       env:
         PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
         PIPX_HOME : ${{ runner.temp }}/pipx/home
 
+    # NOTE: A virtual environment is needed regardless in all cases. In uv's case,
+    # the installation speed "uv pip" offers is what needs to be taken advantage of,
+    # using "uv venv" in a separate step is not necessary since "uv pip" will still
+    # work with existing virtual environments.
path: _doc-build-linux/action.yml
user: login: moe-ad
body: Yes. That's correct.
created_at: 2025-05-05T09:49:30Z
author_association: CONTRIBUTOR
diff_hunk: @@ -254,13 +266,15 @@ runs:
       run: |
         python -m pip install pipx
         python -m pipx install poetry
-        python -m venv .venv
       env:
         PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
         PIPX_HOME : ${{ runner.temp }}/pipx/home
 
+    # NOTE: A virtual environment is needed regardless in all cases. In uv's case,
+    # the installation speed "uv pip" offers is what needs to be taken advantage of,
+    # using "uv venv" in a separate step is not necessary since "uv pip" will still
+    # work with existing virtual environments.
     - name: "Create a virtual environment"
-      if: steps.environment-variables.outputs.BUILD_BACKEND == 'pip'
path: _doc-build-linux/action.yml
user: login: SMoraisAnsys
body: Unfortunately, I think that the behavior we want to have with poetry requires that `PIPX_BIN_DIR` and `PIPX_HOME` are defined when creating the virtual environment. I think it was an edge case when working with poetry + self hosted runners where caching behavior had an impact. I'd recommend adding an OR statement in the if condition. Another option would be to add the environment variable by default and hope that adding them doesn't add any side effect (I don't like that approach though)
created_at: 2025-05-06T09:03:05Z
author_association: CONTRIBUTOR
diff_hunk: @@ -278,23 +292,27 @@ runs:
       run: |
         python -m pip install pipx
         python -m pipx install poetry
-        python -m venv .venv
       env:
         PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
         PIPX_HOME : ${{ runner.temp }}/pipx/home
 
     - name: "Create a virtual environment"
-      if: steps.determine-environment-variables.outputs.BUILD_BACKEND == 'pip'
path: _doc-build-windows/action.yml
user: login: SMoraisAnsys
body: Same comment as before
created_at: 2025-05-06T09:04:20Z
author_association: CONTRIBUTOR
diff_hunk: @@ -278,23 +292,27 @@ runs:
       run: |
         python -m pip install pipx
         python -m pipx install poetry
-        python -m venv .venv
       env:
         PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
         PIPX_HOME : ${{ runner.temp }}/pipx/home
 
     - name: "Create a virtual environment"
-      if: steps.determine-environment-variables.outputs.BUILD_BACKEND == 'pip'
       shell: powershell
       run: python -m venv .venv
 
     # ------------------------------------------------------------------------
 
     - name: "Update pip"
       shell: powershell
+      env:
+        USE_UV: ${{ inputs.use-uv }}
       run: |
         .venv\Scripts\Activate.ps1
-        python -m pip install -U pip
+        if ($env:USE_UV -eq "true") {
+            uv pip install -U pip
+        } else {
+            python -m pip install -U pip
+        }
path: _doc-build-windows/action.yml
user: login: SMoraisAnsys
body: ```suggestion
        if ($env:USE_UV -eq "true") {
          uv pip install -U pip
        } else {
          python -m pip install -U pip
        }
```
To match files formatting
created_at: 2025-05-06T09:06:01Z
author_association: CONTRIBUTOR
diff_hunk: @@ -308,10 +326,15 @@ runs:
       shell: powershell
       env:
         REQUIREMENTS_FILE: ${{ inputs.requirements-file }}
+        USE_UV: ${{ inputs.use-uv }}
       if: ${{ steps.check-requirements-file-exists.outputs.EXISTS_DOC_REQUIREMENTS == 'true' }}
       run: |
         .venv\Scripts\Activate.ps1
-        python -m pip install -r "$env:REQUIREMENTS_FILE"
+        if ($env:USE_UV -eq "true") {
+            uv pip install -r "$env:REQUIREMENTS_FILE"
+        } else {
+            python -m pip install -r "$env:REQUIREMENTS_FILE"
+        }
path: _doc-build-windows/action.yml
user: login: SMoraisAnsys
body: ```suggestion
        if ($env:USE_UV -eq "true") {
          uv pip install -r "$env:REQUIREMENTS_FILE"
        } else {
          python -m pip install -r "$env:REQUIREMENTS_FILE"
        }
```
To match files formatting
created_at: 2025-05-06T09:06:16Z
author_association: CONTRIBUTOR
diff_hunk: @@ -320,10 +343,12 @@ runs:
         BUILD_BACKEND: ${{ steps.determine-environment-variables.outputs.BUILD_BACKEND }}
       run: |
         .venv\Scripts\Activate.ps1
-        if ("$env:BUILD_BACKEND" -eq 'poetry' ) {
-          poetry install
+        if ($env:BUILD_BACKEND -eq "poetry") {
+            poetry install
+        } elseif ($env:BUILD_BACKEND -eq "uv") {
+            uv pip install .
path: _doc-build-windows/action.yml
user: login: SMoraisAnsys
body: ```suggestion
        if ($env:BUILD_BACKEND -eq "poetry") {
          poetry install
        } elseif ($env:BUILD_BACKEND -eq "uv") {
          uv pip install .
```
To match files formatting
created_at: 2025-05-06T09:06:49Z
author_association: CONTRIBUTOR
diff_hunk: @@ -320,10 +343,12 @@ runs:
         BUILD_BACKEND: ${{ steps.determine-environment-variables.outputs.BUILD_BACKEND }}
       run: |
         .venv\Scripts\Activate.ps1
-        if ("$env:BUILD_BACKEND" -eq 'poetry' ) {
-          poetry install
+        if ($env:BUILD_BACKEND -eq "poetry") {
+            poetry install
+        } elseif ($env:BUILD_BACKEND -eq "uv") {
+            uv pip install .
         } else {
-          python -m pip install .
+            python -m pip install .
path: _doc-build-windows/action.yml
user: login: SMoraisAnsys
body: ```suggestion
          python -m pip install .
```
created_at: 2025-05-06T09:06:58Z
author_association: CONTRIBUTOR
diff_hunk: @@ -333,10 +358,12 @@ runs:
         BUILD_BACKEND: ${{ steps.determine-environment-variables.outputs.BUILD_BACKEND }}
       run: |
         .venv\Scripts\Activate.ps1
-        if ("$env:BUILD_BACKEND" -eq 'poetry' ) {
-          poetry install --with doc
+        if ($env:BUILD_BACKEND -eq "poetry") {
+            poetry install --with doc
+        } elseif ($env:BUILD_BACKEND -eq "uv") {
+            uv pip install .[doc]
path: _doc-build-windows/action.yml
user: login: SMoraisAnsys
body: ```suggestion
        if ($env:BUILD_BACKEND -eq "poetry") {
          poetry install --with doc
        } elseif ($env:BUILD_BACKEND -eq "uv") {
          uv pip install .[doc]
```
created_at: 2025-05-06T09:07:15Z
author_association: CONTRIBUTOR
diff_hunk: @@ -333,10 +358,12 @@ runs:
         BUILD_BACKEND: ${{ steps.determine-environment-variables.outputs.BUILD_BACKEND }}
       run: |
         .venv\Scripts\Activate.ps1
-        if ("$env:BUILD_BACKEND" -eq 'poetry' ) {
-          poetry install --with doc
+        if ($env:BUILD_BACKEND -eq "poetry") {
+            poetry install --with doc
+        } elseif ($env:BUILD_BACKEND -eq "uv") {
+            uv pip install .[doc]
         } else {
-          python -m pip install .[doc]
+            python -m pip install .[doc]
path: _doc-build-windows/action.yml
user: login: SMoraisAnsys
body: ```suggestion
          python -m pip install .[doc]
```
created_at: 2025-05-06T09:07:23Z
author_association: CONTRIBUTOR
diff_hunk: @@ -32,6 +32,11 @@ inputs:
     description: 'Whether to use Python cache or not. Requires a pyproject.toml file.'
     required: true
     type: boolean
+  provision-uv:
path: _setup-python/action.yml
user: login: SMoraisAnsys
body: Very good idea
created_at: 2025-05-06T09:07:48Z
author_association: CONTRIBUTOR
diff_hunk: @@ -136,17 +144,22 @@ runs:
       with:
         python-version: ${{ inputs.python-version }}
         use-cache: ${{ inputs.use-python-cache }}
+        provision-uv: ${{ inputs.use-uv == 'true' && 'true' || 'false' }}
path: build-wheelhouse/action.yml
user: login: SMoraisAnsys
body: I'm not sure about this line. Either inputs.use-uv is perceived as boolean and thus ${{ inputs.use-uv }} should be enough or it's perceived as a string and then I also don't see why we would need `== 'true' && 'true' || 'false'`.
Am I missing something or can this be updated ? :)
created_at: 2025-05-06T09:13:02Z
author_association: CONTRIBUTOR
diff_hunk: @@ -233,6 +245,7 @@ runs:
       with:
         python-version: ${{ inputs.python-version }}
         use-cache: false
+        provision-uv: ${{ inputs.use-uv == 'true' && 'true' || 'false' }}
path: check-vulnerabilities/action.yml
user: login: SMoraisAnsys
body: Same comment
created_at: 2025-05-06T09:16:02Z
author_association: CONTRIBUTOR
diff_hunk: @@ -262,13 +275,15 @@ runs:
       run: |
         python -m pip install pipx
         python -m pipx install poetry
-        python -m venv .venv
       env:
         PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
         PIPX_HOME : ${{ runner.temp }}/pipx/home
 
+    # NOTE: A virtual environment is needed regardless in all cases. In uv's case,
+    # the installation speed "uv pip" offers is what needs to be taken advantage of,
+    # using "uv venv" in a separate step is not necessary since "uv pip" will still
+    # work with existing virtual environments.
     - name: "Create a virtual environment"
-      if: steps.github-environment-variables.outputs.BUILD_BACKEND == 'pip'
path: check-vulnerabilities/action.yml
user: login: SMoraisAnsys
body: Again
created_at: 2025-05-06T09:16:12Z
author_association: CONTRIBUTOR
diff_hunk: @@ -147,6 +159,7 @@ runs:
       with:
         python-version: ${{ inputs.python-version }}
         use-cache: ${{ inputs.use-python-cache }}
+        provision-uv: ${{ inputs.use-uv == 'true' && 'true' || 'false' }}
path: code-style/action.yml
user: login: SMoraisAnsys
body: I'm stopping to report echos
created_at: 2025-05-06T09:16:44Z
author_association: CONTRIBUTOR
diff_hunk: @@ -254,13 +266,15 @@ runs:
       run: |
         python -m pip install pipx
         python -m pipx install poetry
-        python -m venv .venv
       env:
         PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
         PIPX_HOME : ${{ runner.temp }}/pipx/home
 
+    # NOTE: A virtual environment is needed regardless in all cases. In uv's case,
+    # the installation speed "uv pip" offers is what needs to be taken advantage of,
+    # using "uv venv" in a separate step is not necessary since "uv pip" will still
+    # work with existing virtual environments.
     - name: "Create a virtual environment"
-      if: steps.environment-variables.outputs.BUILD_BACKEND == 'pip'
path: _doc-build-linux/action.yml
user: login: moe-ad
body: @SMoraisAnsys thanks for noting this. Maybe I am missing something, but the current implementation takes this into account. It hasn't changed how `poetry` was being handled previously.

Before:
- step-A (`PIPX_BIN_DIR` and `PIPX_HOME` set):
  - if `BUILD_BACKEND == poetry`:
    - ... some actions
    - create `venv`
- step-B:
  - if `BUILD_BACKEND == pip`:
    - create `venv`
  
A `venv` is still created in both cases and in this PR, I have just unified the creation of the `venv` such that adding `uv` to the mix becomes easier to handle:
- The virtual environment creation step is always executed.
- When the build backend is poetry, `PIPX_BIN_DIR` and `PIPX_HOME` are still set before the virtual environment creation step.

So when the build backend is poetry, the way the action works is essentially the same as before.

created_at: 2025-05-06T10:23:35Z
author_association: CONTRIBUTOR
diff_hunk: @@ -278,23 +292,27 @@ runs:
       run: |
         python -m pip install pipx
         python -m pipx install poetry
-        python -m venv .venv
       env:
         PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
         PIPX_HOME : ${{ runner.temp }}/pipx/home
 
     - name: "Create a virtual environment"
-      if: steps.determine-environment-variables.outputs.BUILD_BACKEND == 'pip'
       shell: powershell
       run: python -m venv .venv
 
     # ------------------------------------------------------------------------
 
     - name: "Update pip"
       shell: powershell
+      env:
+        USE_UV: ${{ inputs.use-uv }}
       run: |
         .venv\Scripts\Activate.ps1
-        python -m pip install -U pip
+        if ($env:USE_UV -eq "true") {
+            uv pip install -U pip
+        } else {
+            python -m pip install -U pip
+        }
path: _doc-build-windows/action.yml
user: login: moe-ad
body: Thanks for catching this and subsequent ones @SMoraisAnsys!
created_at: 2025-05-06T10:25:54Z
author_association: CONTRIBUTOR
diff_hunk: @@ -136,17 +144,22 @@ runs:
       with:
         python-version: ${{ inputs.python-version }}
         use-cache: ${{ inputs.use-python-cache }}
+        provision-uv: ${{ inputs.use-uv == 'true' && 'true' || 'false' }}
path: build-wheelhouse/action.yml
user: login: moe-ad
body: Great catch! That's correct. We shouldn't need to do this.
created_at: 2025-05-06T10:41:44Z
author_association: CONTRIBUTOR
diff_hunk: @@ -136,17 +144,22 @@ runs:
       with:
         python-version: ${{ inputs.python-version }}
         use-cache: ${{ inputs.use-python-cache }}
+        provision-uv: ${{ inputs.use-uv == 'true' && 'true' || 'false' }}
path: build-wheelhouse/action.yml
user: login: moe-ad
body: Fixed!
created_at: 2025-05-06T10:44:34Z
author_association: CONTRIBUTOR
diff_hunk: @@ -254,13 +266,15 @@ runs:
       run: |
         python -m pip install pipx
         python -m pipx install poetry
-        python -m venv .venv
       env:
         PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
         PIPX_HOME : ${{ runner.temp }}/pipx/home
 
+    # NOTE: A virtual environment is needed regardless in all cases. In uv's case,
+    # the installation speed "uv pip" offers is what needs to be taken advantage of,
+    # using "uv venv" in a separate step is not necessary since "uv pip" will still
+    # work with existing virtual environments.
     - name: "Create a virtual environment"
-      if: steps.environment-variables.outputs.BUILD_BACKEND == 'pip'
path: _doc-build-linux/action.yml
user: login: SMoraisAnsys
body: Maybe I'm missing something but, AFAIK, the current step creating the .venv does not contain the `PIPX_BIN_DIR` and `PIPX_HOME` environment variable since the step does not contain any `env:`

Anyway, after some though I think the environment variables are mainly here to ensure that poetry does not contain much cached packages. Without the use of pipx, we wouldn't be sure that poetry gets installed in it's own isolated venv.

I'll leave that discussion unsolved so that you can read my answer. Feel free to resolve it afterward :)
created_at: 2025-05-06T12:37:35Z
author_association: CONTRIBUTOR
diff_hunk: @@ -254,13 +266,15 @@ runs:
       run: |
         python -m pip install pipx
         python -m pipx install poetry
-        python -m venv .venv
       env:
         PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
         PIPX_HOME : ${{ runner.temp }}/pipx/home
 
+    # NOTE: A virtual environment is needed regardless in all cases. In uv's case,
+    # the installation speed "uv pip" offers is what needs to be taken advantage of,
+    # using "uv venv" in a separate step is not necessary since "uv pip" will still
+    # work with existing virtual environments.
     - name: "Create a virtual environment"
-      if: steps.environment-variables.outputs.BUILD_BACKEND == 'pip'
path: _doc-build-linux/action.yml
user: login: moe-ad
body: Thanks @SMoraisAnsys! Just one final note that that `PIPX_BIN_DIR` and `PIPX_HOME` are available in the `venv` creation step. This is because they are written to `GITHUB_ENV`, making them persistent and automatically available in subsequent steps.
created_at: 2025-05-06T14:00:04Z
author_association: CONTRIBUTOR
diff_hunk: @@ -254,13 +266,15 @@ runs:
       run: |
         python -m pip install pipx
         python -m pipx install poetry
-        python -m venv .venv
       env:
         PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
         PIPX_HOME : ${{ runner.temp }}/pipx/home
 
+    # NOTE: A virtual environment is needed regardless in all cases. In uv's case,
+    # the installation speed "uv pip" offers is what needs to be taken advantage of,
+    # using "uv venv" in a separate step is not necessary since "uv pip" will still
+    # work with existing virtual environments.
     - name: "Create a virtual environment"
-      if: steps.environment-variables.outputs.BUILD_BACKEND == 'pip'
path: _doc-build-linux/action.yml
user: login: SMoraisAnsys
body: I'm not sure to see where they are written. Are you speaking about the 
```
      env:
        PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
        PIPX_HOME : ${{ runner.temp }}/pipx/home
```
??

If yes, then it shouldn't be available in the following step. See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#defining-environment-variables-for-a-single-workflow
created_at: 2025-05-06T14:25:48Z
author_association: CONTRIBUTOR
diff_hunk: @@ -254,13 +266,15 @@ runs:
       run: |
         python -m pip install pipx
         python -m pipx install poetry
-        python -m venv .venv
       env:
         PIPX_BIN_DIR: ${{ runner.temp }}/pipx/bin
         PIPX_HOME : ${{ runner.temp }}/pipx/home
 
+    # NOTE: A virtual environment is needed regardless in all cases. In uv's case,
+    # the installation speed "uv pip" offers is what needs to be taken advantage of,
+    # using "uv venv" in a separate step is not necessary since "uv pip" will still
+    # work with existing virtual environments.
     - name: "Create a virtual environment"
-      if: steps.environment-variables.outputs.BUILD_BACKEND == 'pip'
path: _doc-build-linux/action.yml
user: login: moe-ad
body: Sorry, I mixed things up. Apologies for the confusion. I was talking about this part:

```
# NOTE: Installation of poetry in a separate environment to the project to
# avoid situations in which both poetry and the project have shared
# dependencies with different version. This can lead to CICD failures. For
# more information, see https://github.com/ansys/actions/pull/560
- name: "Add pipx/bin directory to Github Path"
  if: steps.environment-variables.outputs.BUILD_BACKEND == 'poetry'
  shell: bash
  run: echo "${{ runner.temp }}/pipx/bin" >> $GITHUB_PATH  # zizmor: ignore[github-env]

# NOTE: Poetry uses virtual environments when installing a project. As we
# want to control that creation, we store POETRY_VIRTUALENVS_CREATE=false
# in the GitHub environment.
- name: "Set poetry environment variable(s)"
   if: steps.environment-variables.outputs.BUILD_BACKEND == 'poetry'
   shell: bash
   run: echo "POETRY_VIRTUALENVS_CREATE=false" >> $GITHUB_ENV # zizmor: ignore[github-env]
```

For whatever reason, my brain registered that we were writing `PIPX_BIN_DIR` and `PIPX_HOME` to `GITHUB_ENV`.
😄 
created_at: 2025-05-06T15:31:43Z
author_association: CONTRIBUTOR
diff_hunk: @@ -96,6 +96,13 @@ inputs:
     required: true
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
path: _release-pypi/action.yml
user: login: SMoraisAnsys
body: ```suggestion
    default: false
```
I would default to `false` for the actions were you didn't implement `uv` initially:
- _release-pypi
- build-library
- doc-changelog
- hk-package-clean-except
- hk-package-clean-untagged

@jorgepiloto @RobPasMue What do you think ?

If this is validated, the current change needs to be applied in other actions
created_at: 2025-05-06T16:28:27Z
author_association: CONTRIBUTOR
diff_hunk: @@ -96,6 +96,13 @@ inputs:
     required: true
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
path: _release-pypi/action.yml
user: login: jorgepiloto
body: Thanks for raising this, @SMoraisAnsys. Agreed. If we proceed implementing `uv` everywhere, then at least let's disable it for "critical" actions.
created_at: 2025-05-06T18:21:30Z
author_association: MEMBER
diff_hunk: @@ -96,6 +96,13 @@ inputs:
     required: true
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
path: _release-pypi/action.yml
user: login: RobPasMue
body: I completely agree too, thanks @SMoraisAnsys and @moe-ad!
created_at: 2025-05-07T06:05:21Z
author_association: MEMBER
diff_hunk: @@ -96,6 +96,13 @@ inputs:
     required: true
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
path: _release-pypi/action.yml
user: login: moe-ad
body: @SMoraisAnsys @jorgepiloto @RobPasMue 
Implemented. `ansys/actions/build-wheelhouse` was also added.
created_at: 2025-05-07T07:46:47Z
author_association: CONTRIBUTOR
diff_hunk: @@ -105,6 +105,13 @@ inputs:
     default: true
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: false
path: doc-changelog/action.yml
user: login: SMoraisAnsys
body: Sry but why default to false here when it defaults to true in doc-deploy-changelog ? The behavior of both actions w.r.t package management seems to be the same, no ?
created_at: 2025-05-07T08:15:06Z
author_association: CONTRIBUTOR
diff_hunk: @@ -144,6 +144,13 @@ inputs:
     required: false
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
path: release-github/action.yml
user: login: SMoraisAnsys
body: Wondering if we shouldn't move to false here since only 2 dependencies seem to be installed.
created_at: 2025-05-07T08:16:20Z
author_association: CONTRIBUTOR
diff_hunk: @@ -96,6 +96,13 @@ inputs:
     required: true
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
path: _release-pypi/action.yml
user: login: SMoraisAnsys
body: > Thanks for raising this, @SMoraisAnsys. Agreed. If we proceed implementing `uv` everywhere, then at least let's disable it for "critical" actions.

Did you mean "non critical" actions ? My idea was to follow your thoughs on having a treshold to default to `uv` or not. Like "if the number of packages installed is >2" then "true" else "false".
created_at: 2025-05-07T08:18:23Z
author_association: CONTRIBUTOR
diff_hunk: @@ -123,6 +123,14 @@ inputs:
     default: false
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv for installation operations instead of pip. By default it is set
+      to ``true``.
path: build-wheelhouse/action.yml
user: login: MaxJPRey
body: Just to be consistent with the other descriptions.
```suggestion
      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
```
created_at: 2025-05-07T08:21:57Z
author_association: CONTRIBUTOR
diff_hunk: @@ -103,6 +103,14 @@ inputs:
     default: true
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv for installation operations instead of pip. By default it is set
+      to ``true``.
path: code-style/action.yml
user: login: MaxJPRey
body: ```suggestion
      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
```
created_at: 2025-05-07T08:22:31Z
author_association: CONTRIBUTOR
diff_hunk: @@ -105,6 +105,13 @@ inputs:
     default: true
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: false
path: doc-changelog/action.yml
user: login: moe-ad
body: Thanks @SMoraisAnsys, I missed this. I implemented changes in-line with the original request, which is to default to `false` for actions I didn't implement `use-uv` for previously.

So what's the final verdict here? Default to `false` for both or default to `true`?
created_at: 2025-05-07T09:07:02Z
author_association: CONTRIBUTOR
diff_hunk: @@ -144,6 +144,13 @@ inputs:
     required: false
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
path: release-github/action.yml
user: login: moe-ad
body: That makes sense.
created_at: 2025-05-07T09:07:53Z
author_association: CONTRIBUTOR
diff_hunk: @@ -123,6 +123,14 @@ inputs:
     default: false
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv for installation operations instead of pip. By default it is set
+      to ``true``.
path: build-wheelhouse/action.yml
user: login: moe-ad
body: Thanks for catching that @MaxJPRey 
created_at: 2025-05-07T09:08:56Z
author_association: CONTRIBUTOR
diff_hunk: @@ -144,6 +144,13 @@ inputs:
     required: false
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
path: release-github/action.yml
user: login: MaxJPRey
body: Good idea.
created_at: 2025-05-07T09:11:39Z
author_association: CONTRIBUTOR
diff_hunk: @@ -96,6 +96,13 @@ inputs:
     required: true
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: true
path: _release-pypi/action.yml
user: login: jorgepiloto
body: Oh! I thought we were discretizing based on actions that build, release and deploy "uv: false" and the rest "uv: true".
created_at: 2025-05-07T12:04:55Z
author_association: MEMBER
diff_hunk: @@ -105,6 +105,13 @@ inputs:
     default: true
     type: boolean
 
+  use-uv:
+    description: |
+      Whether to use uv as the default package manager instead of pip. Default value is ``true``.
+    default: false
path: doc-changelog/action.yml
user: login: jorgepiloto
body: We all agreed to use `uv` everywhere by default.
created_at: 2025-05-09T07:29:20Z
author_association: MEMBER

PR comments:
user: login: ansys-reviewer-bot[bot]
created_at: 2025-04-01T09:03:19Z
body: Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

**@ansys-reviewer-bot review**


author_association: CONTRIBUTOR
user: login: moe-ad
created_at: 2025-04-02T15:32:09Z
body: For `actions/build-wheelhouse`, there is no direct way to include dependency wheels if `uv` is used for wheel generation (see astral-sh/uv#1681). So I have limited `uv` usage to just package installation operations prior to the wheel building step.
author_association: CONTRIBUTOR
user: login: moe-ad
created_at: 2025-04-18T08:24:06Z
body: Changed base branch to `feat/check-actions-security-action`. Will revert to `main` when it's time to merge.
author_association: CONTRIBUTOR
user: login: moe-ad
created_at: 2025-05-05T09:59:54Z
body: @jorgepiloto
One thing we should also decide on are the actions I decided aren't worth touching. Is that approach fine by you? The actions I touched so far are the ones where a lot of dependencies are being installed. I skipped actions where just 1 or 2 packages are being installed because I thought that would not offer much value.

I guess the question becomes if we want all our actions to have `use-uv` option for the sake of consistency across board, or if we want only the actions that can benefit from `uv` to have it as I've already done.
author_association: CONTRIBUTOR
user: login: jorgepiloto
created_at: 2025-05-05T12:02:34Z
body: Thanks for pointing this out @moe-ad. I would provide the option to use `uv` across all actions. The reason is that, even if we are installing a single package, we are not aware about the number of dependencies it has.
author_association: MEMBER
user: login: moe-ad
created_at: 2025-05-06T08:16:38Z
body: Pinging @ansys/pyansys-core for their inputs as well. Especially regarding this:

> @jorgepiloto One thing we should also decide on are the actions I decided aren't worth touching. Is that approach fine by you? The actions I touched so far are the ones where a lot of dependencies are being installed. I skipped actions where just 1 or 2 packages are being installed because I thought that would not offer much value.
> 
> I guess the question becomes if we want all our actions to have `use-uv` option for the sake of consistency across board, or if we want only the actions that can benefit from `uv` to have it as I've already done.


author_association: CONTRIBUTOR
user: login: SMoraisAnsys
created_at: 2025-05-06T09:25:18Z
body: Btw, why not adding the possibility to use `uv` everywhere and only activate it for the actions that you already have modified ? This way, actions with less than 2 dependencies will keep using the old behavior and only actions where it makes sense are affected. On top of that, that will give us freedom later on if we want to move one action from "no uv" to "uv by default".

Note that I'm fine with not adding the possibility to use `uv` everywhere. I just think that's a nice occasion to allow it for later (if ever needed) :)
author_association: CONTRIBUTOR
user: login: moe-ad
created_at: 2025-05-06T10:35:00Z
body: > Btw, why not adding the possibility to use `uv` everywhere and only activate it for the actions that you already have modified ? This way, actions with less than 2 dependencies will keep using the old behavior and only actions where it makes sense are affected. On top of that, that will give us freedom later on if we want to move one action from "no uv" to "uv by default".
> 
> Note that I'm fine with not adding the possibility to use `uv` everywhere. I just think that's a nice occasion to allow it for later (if ever needed) :)

Good point. We can easily extend to other actions as well like you suggested. Jorge also thought of doing it this way but we decided to get all of your opinions regarding it.
Tagging @jorgepiloto for visibility.
author_association: CONTRIBUTOR
user: login: moe-ad
created_at: 2025-05-06T15:55:12Z
body: > Btw, why not adding the possibility to use `uv` everywhere and only activate it for the actions that you already have modified ? This way, actions with less than 2 dependencies will keep using the old behavior and only actions where it makes sense are affected. On top of that, that will give us freedom later on if we want to move one action from "no uv" to "uv by default".
> 
> Note that I'm fine with not adding the possibility to use `uv` everywhere. I just think that's a nice occasion to allow it for later (if ever needed) :)

@SMoraisAnsys This is implemented now.
author_association: CONTRIBUTOR
user: login: moe-ad
created_at: 2025-05-09T07:29:24Z
body: After some discussions offline, we are defaulting uv usage to `true` on all actions.
author_association: CONTRIBUTOR
user: login: moe-ad
created_at: 2025-05-09T10:05:59Z
body: Latest changes tested on a release workflow: https://github.com/ansys-internal/test-repo-moe/actions/runs/14926303459
Run doesn't make use of a lot of the actions though, just the `doc-build` one and `_setup-python`.
author_association: CONTRIBUTOR