Repository: ansys/actions
Pull request #794: feat: add compatibility with dependency groups
Author: login: SMoraisAnsys
Labels: name: enhancement
description: General improvements to existing features
name: ci
description: Pipelines maintenance related
Created: 2025-04-29T16:40:35Z | Merged: 2025-05-15T06:39:26Z

Add compatibility with dependency groups from [PEP 735](https://peps.python.org/pep-0735/).

Since groups can be expressed using other groups, this PR also updates the python package used to read TOML files because `toml` does not work with such expressions. The new package used is `tomli` (note that a version of `tomli`, the `tomllib` module, was added to the standard library in Python 3.11 via [PEP 680](https://www.python.org/dev/peps/pep-0680/).



Diff:
diff --git a/_doc-build-linux/action.yml b/_doc-build-linux/action.yml
index ddd6cdb40..7a6907f42 100644
--- a/_doc-build-linux/action.yml
+++ b/_doc-build-linux/action.yml
@@ -222,6 +222,12 @@ runs:
           echo "BUILD_BACKEND=$(echo 'pip')" >> $GITHUB_OUTPUT
           echo "SPHINX_BUILD_MAKE=$(echo 'make')" >> $GITHUB_OUTPUT
         fi
+        # NOTE: Dependency groups are only used with pip and uv
+        if [[ -f "pyproject.toml" ]] && grep -q "\[dependency-groups\]" "pyproject.toml"; then
+          echo "USE_DEPENDENCY_GROUPS=true" >> $GITHUB_OUTPUT
+        else
+          echo "USE_DEPENDENCY_GROUPS=false" >> $GITHUB_OUTPUT
+        fi
 
     - uses: ansys/actions/_logging@main
       with:
@@ -229,6 +235,7 @@ runs:
         message: >
           Build backend: ${{ steps.environment-variables.outputs.BUILD_BACKEND }}
           Sphinx build make: ${{ steps.environment-variables.outputs.SPHINX_BUILD_MAKE }}
+          Use of dependency groups: ${{ steps.environment-variables.outputs.USE_DEPENDENCY_GROUPS }}
 
     # ------------------------------------------------------------------------
 
@@ -336,14 +343,25 @@ runs:
       if: steps.check-requirement-file-exists.outputs.EXISTS_DOC_REQUIREMENTS == 'false'
       env:
         BUILD_BACKEND: ${{ steps.environment-variables.outputs.BUILD_BACKEND }}
+        USE_DEPENDENCY_GROUPS: ${{ steps.environment-variables.outputs.USE_DEPENDENCY_GROUPS }}
       run: |
         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]
+          if [[ "${USE_DEPENDENCY_GROUPS}" == 'true' ]]; then
+            if [[ "${BUILD_BACKEND}" == 'uv' ]]; then
+              uv pip install --group doc .
+            else
+              python -m pip install --group doc .
+            fi
+          else
+            if [[ "${BUILD_BACKEND}" == 'uv' ]]; then
+              uv pip install .[doc]
+            else
+              python -m pip install .[doc]
+            fi
+          fi
         fi
 
     # ------------------------------------------------------------------------
diff --git a/_doc-build-windows/action.yml b/_doc-build-windows/action.yml
index 3f005035b..41da57c98 100644
--- a/_doc-build-windows/action.yml
+++ b/_doc-build-windows/action.yml
@@ -248,6 +248,12 @@ runs:
           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
         }
+        # NOTE: Dependency groups are only used with pip and uv
+        if ((Test-Path "pyproject.toml") -and (Get-Content "pyproject.toml" | Select-String -Pattern '\[dependency-groups\]')) {
+          echo "USE_DEPENDENCY_GROUPS=$(echo 'false')" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
+        } else {
+          echo "USE_DEPENDENCY_GROUPS=$(echo 'true')" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
+        }
 
     - uses: ansys/actions/_logging@main
       with:
@@ -356,14 +362,29 @@ runs:
       if: ${{ steps.check-requirements-file-exists.outputs.EXISTS_DOC_REQUIREMENTS == 'false' }}
       env:
         BUILD_BACKEND: ${{ steps.determine-environment-variables.outputs.BUILD_BACKEND }}
+        USE_DEPENDENCY_GROUPS: ${{ steps.environment-variables.outputs.USE_DEPENDENCY_GROUPS }}
       run: |
         .venv\Scripts\Activate.ps1
         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]
+        }
+        else {
+          if ($env:USE_DEPENDENCY_GROUPS -eq "true") {
+            if ($env:BUILD_BACKEND -eq "uv") {
+              uv pip install --group doc .
+            }
+            else {
+              python -m pip install --group doc .
+            }
+          }
+          else {
+            if ($env:BUILD_BACKEND -eq "uv") {
+              uv pip install .[doc]
+            }
+            else {
+              python -m pip install .[doc]
+            }
+          }
         }
 
     # ------------------------------------------------------------------------
diff --git a/doc-changelog/action.yml b/doc-changelog/action.yml
index 3d5ad82ee..26dde6ab5 100644
--- a/doc-changelog/action.yml
+++ b/doc-changelog/action.yml
@@ -71,7 +71,14 @@ inputs:
   toml-version:
     description: |
       Toml version used for retrieving the towncrier directory.
-    default: '0.10.2'
+    default: ''
+    required: false
+    type: string
+
+  tomli-version:
+    description: |
+      Tomli version used for retrieving the towncrier directory.
+    default: '2.2.1'
     required: false
     type: string
 
@@ -115,6 +122,18 @@ inputs:
 runs:
   using: "composite"
   steps:
+
+    - uses: ansys/actions/_logging@main
+      if: inputs.toml-version != ''
+      with:
+        level: "ERROR"
+        message: >
+          With the adoption of dependency groups in PyAnsys packages, the ``toml`` library
+          is no longer used because it cannot parse ``pyproject.toml`` files where groups
+          include other groups. This action now uses the ``tomli`` library instead. If you
+          want to use a specific version of ``tomli``, please set the ``tomli-version``
+          input accordingly.
+
     - name: "Install Git and clone project"
       env:
         PR_BRANCH: ${{ github.event.pull_request.head.ref }}
@@ -131,14 +150,14 @@ runs:
         use-cache: ${{ inputs.use-python-cache }}
         provision-uv: ${{ inputs.use-uv }}
 
-    - name: "Install towncrier"
+    - name: "Install towncrier and tomli"
       shell: bash
       env:
         TOWNCRIER_VERSION: ${{ inputs.towncrier-version }}
-        TOML_VERSION: ${{ inputs.toml-version }}
+        TOMLI_VERSION: ${{ inputs.tomli-version }}
         INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python --system' || 'python -m pip install' }}
       run: |
-        ${INSTALL_COMMAND} --upgrade pip towncrier==${TOWNCRIER_VERSION} toml==${TOML_VERSION}
+        ${INSTALL_COMMAND} --upgrade pip towncrier==${TOWNCRIER_VERSION} tomli==${TOMLI_VERSION}
 
     - name: "Get first letter of conventional commit type"
       if: ${{ inputs.use-conventional-commits == 'true' }}
@@ -260,7 +279,7 @@ runs:
       run: |
         import pathlib
         import os
-        import toml
+        import tomli
 
         # Identify towncrier configuration file
         pyproject_file = pathlib.Path("pyproject.toml")
@@ -272,8 +291,8 @@ runs:
         towncrier_config = pyproject_file if pyproject_file.exists() else towncrier_file
 
         # Load pyproject.toml
-        with open(towncrier_config, 'r') as f:
-            config = toml.load(f)
+        with open(towncrier_config, 'rb') as f:
+            config = tomli.load(f)
             template = config["tool"]["towncrier"]["template"]
             filename = config["tool"]["towncrier"]["filename"]
 
diff --git a/doc-deploy-changelog/action.yml b/doc-deploy-changelog/action.yml
index 7f8e7df8a..ff40cb85e 100644
--- a/doc-deploy-changelog/action.yml
+++ b/doc-deploy-changelog/action.yml
@@ -223,7 +223,7 @@ runs:
       run: |
         import pathlib
         import os
-        import toml
+        import tomli
 
         # Identify towncrier configuration file
         pyproject_file = pathlib.Path("pyproject.toml")
@@ -235,8 +235,8 @@ runs:
         towncrier_config = pyproject_file if pyproject_file.exists() else towncrier_file
 
         # Load pyproject.toml
-        with open(towncrier_config, 'r') as f:
-            config = toml.load(f)
+        with open(towncrier_config, 'rb') as f:
+            config = tomli.load(f)
             directory = config["tool"]["towncrier"]["directory"]
             project_name = config["tool"]["towncrier"].get("package")
 
diff --git a/doc-style/action.yml b/doc-style/action.yml
index 9579516c8..dff4f77c7 100644
--- a/doc-style/action.yml
+++ b/doc-style/action.yml
@@ -65,7 +65,14 @@ inputs:
   toml-version:
     description: |
       Toml version used for retrieving the towncrier directory.
-    default: '0.10.2'
+    default: ''
+    required: false
+    type: string
+
+  tomli-version:
+    description: |
+      Tomli version used for retrieving the towncrier directory.
+    default: '2.2.1'
     required: false
     type: string
 
@@ -97,6 +104,17 @@ runs:
   using: "composite"
   steps:
 
+    - uses: ansys/actions/_logging@main
+      if: inputs.toml-version != ''
+      with:
+        level: "ERROR"
+        message: >
+          With the adoption of dependency groups in PyAnsys packages, the ``toml`` library
+          is no longer used because it cannot parse ``pyproject.toml`` files where groups
+          include other groups. This action now uses the ``tomli`` library instead. If you
+          want to use a specific version of ``tomli``, please set the ``tomli-version``
+          input accordingly.
+
     - name: "Install Git and clone project"
       uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
       if: inputs.checkout == 'true'
@@ -143,12 +161,12 @@ runs:
           fi
         fi
 
-    - name: "Install toml"
+    - name: "Install tomli"
       shell: bash
       env:
-       TOML_VERSION: ${{ inputs.toml-version }}
+       TOMLI_VERSION: ${{ inputs.tomli-version }}
       run: |
-        python -m pip install --upgrade pip toml==${TOML_VERSION}
+        python -m pip install --upgrade pip tomli==${TOMLI_VERSION}
 
     - name: "Install docutils"
       shell: bash
@@ -159,12 +177,12 @@ runs:
       shell: python
       run: |
         import os
-        import toml
+        import tomli
 
         if os.path.exists("pyproject.toml"):
             # Load pyproject.toml
-            with open('pyproject.toml', 'r') as f:
-                config = toml.load(f)
+            with open('pyproject.toml', 'rb') as f:
+                config = tomli.load(f)
                 try:
                     # Get towncrier directory
                     directory=config["tool"]["towncrier"]["directory"]
diff --git a/doc/source/changelog/794.added.md b/doc/source/changelog/794.added.md
new file mode 100644
index 000000000..3a236d2fb
--- /dev/null
+++ b/doc/source/changelog/794.added.md
@@ -0,0 +1 @@
+add compatibility with dependency groups
\ No newline at end of file
diff --git a/python-utils/parse_pr_title.py b/python-utils/parse_pr_title.py
index 4df1bb07d..392779fac 100644
--- a/python-utils/parse_pr_title.py
+++ b/python-utils/parse_pr_title.py
@@ -1,7 +1,7 @@
 import os
 from pathlib import Path
 
-import toml
+import tomli
 
 
 def save_env_variable(env_var_name: str, env_var_value: str):
@@ -222,8 +222,8 @@ def add_towncrier_config(org_name: str, repo_name: str, default_config: bool):
         exit(1)
 
     towncrier_config = pyproject_file if pyproject_file.exists() else towncrier_file
-    with towncrier_config.open() as file:
-        config = toml.load(towncrier_config)
+    with towncrier_config.open("rb") as file:
+        config = tomli.load(file)
         tool = config.get("tool", "DNE")
         towncrier = tool.get("towncrier", "DNE")
 
@@ -384,8 +384,8 @@ def get_towncrier_config_value(category: str, pyproject_path: str = "pyproject.t
 
     if pyproject_toml.is_file():
         # Load pyproject.toml
-        with pyproject_toml.open() as pyproj:
-            config = toml.load(pyproj)
+        with pyproject_toml.open("rb") as pyproj:
+            config = tomli.load(pyproj)
             # Get the tool category in pyproject.toml
             tool = config.get("tool", "")
             if tool:
diff --git a/release-github/action.yml b/release-github/action.yml
index f6117c40d..c7c197b0e 100644
--- a/release-github/action.yml
+++ b/release-github/action.yml
@@ -96,7 +96,14 @@ inputs:
   toml-version:
     description: |
       Toml version used for retrieving the towncrier directory.
-    default: '0.10.2'
+    default: ''
+    required: false
+    type: string
+
+  tomli-version:
+    description: |
+      Tomli version used for retrieving the towncrier directory.
+    default: '2.2.1'
     required: false
     type: string
 
@@ -155,6 +162,17 @@ runs:
   using: "composite"
   steps:
 
+    - uses: ansys/actions/_logging@main
+      if: inputs.toml-version != ''
+      with:
+        level: "ERROR"
+        message: >
+          With the adoption of dependency groups in PyAnsys packages, the ``toml`` library
+          is no longer used because it cannot parse ``pyproject.toml`` files where groups
+          include other groups. This action now uses the ``tomli`` library instead. If you
+          want to use a specific version of ``tomli``, please set the ``tomli-version``
+          input accordingly.
+
     # Only one of both can be true: generate_release_notes, changelog-release-notes
     - name: "Sanity check on release notes"
       uses: ansys/actions/_logging@main
@@ -296,11 +314,11 @@ runs:
     - name: "Install toml and pypandoc"
       shell: bash
       env:
-        TOML_VERSION: ${{ inputs.toml-version }}
+        TOMLI_VERSION: ${{ inputs.tomli-version }}
         PYPANDOC_BINARY_VERSION: ${{ inputs.pypandoc-binary-version }}
         INSTALL_COMMAND: ${{ inputs.use-uv == 'true' && 'uv pip install --no-managed-python --system' || 'python -m pip install' }}
       run: |
-        ${INSTALL_COMMAND} --upgrade pip toml=="$TOML_VERSION"
+        ${INSTALL_COMMAND} --upgrade pip toml=="$TOMLI_VERSION"
         ${INSTALL_COMMAND} pypandoc-binary=="$PYPANDOC_BINARY_VERSION"
 
     - name: "Get the release notes body"
diff --git a/tests-pytest/action.yml b/tests-pytest/action.yml
index 6f21a612c..74c3665b6 100644
--- a/tests-pytest/action.yml
+++ b/tests-pytest/action.yml
@@ -147,6 +147,12 @@ runs:
         else
           echo "BUILD_BACKEND=$(echo 'pip')" >> $GITHUB_OUTPUT
         fi
+        # NOTE: Dependency groups are only used with pip and uv
+        if [[ -f "pyproject.toml" ]] && grep -q "\[dependency-groups\]" "pyproject.toml"; then
+          echo "USE_DEPENDENCY_GROUPS=true" >> $GITHUB_OUTPUT
+        else
+          echo "USE_DEPENDENCY_GROUPS=false" >> $GITHUB_OUTPUT
+        fi
 
     - uses: ansys/actions/_logging@main
       with:
@@ -292,17 +298,28 @@ runs:
       shell: bash
       if: steps.check-exists-requirements-file.outputs.EXISTS_TESTS_REQUIREMENTS == 'false'
       env:
-        OPTIONAL_DEPENDENCIES_NAME: ${{ inputs.optional-dependencies-name }}
-        BUILD_BACKEND: ${{ steps.github-environment-variables.outputs.BUILD_BACKEND }}
         ACTIVATE_VENV: ${{ steps.virtual-environment-activation-command.outputs.ACTIVATE_VENV }}
+        BUILD_BACKEND: ${{ steps.github-environment-variables.outputs.BUILD_BACKEND }}
+        OPTIONAL_DEPENDENCIES_NAME: ${{ inputs.optional-dependencies-name }}
+        USE_DEPENDENCY_GROUPS: ${{ steps.github-environment-variables.outputs.USE_DEPENDENCY_GROUPS }}
       run: |
         $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}]"
+          if [[ "${USE_DEPENDENCY_GROUPS}" == 'true' ]]; then
+            if [[ "${BUILD_BACKEND}" == 'uv' ]]; then
+              uv pip install $(IFS=','; for group in $OPTIONAL_DEPENDENCIES_NAME; do echo --group "$group"; done) .
+            else
+              python -m pip install $(IFS=','; for group in $OPTIONAL_DEPENDENCIES_NAME; do echo --group "$group"; done) .
+            fi
+          else
+            if [[ "${BUILD_BACKEND}" == 'uv' ]]; then
+              uv pip install .["$OPTIONAL_DEPENDENCIES_NAME"]
+            else
+              python -m pip install .["$OPTIONAL_DEPENDENCIES_NAME"]
+            fi
+          fi
         fi
 
     - name: "Set up pytest run command"


Reviews:
user: login: RobPasMue
state: CHANGES_REQUESTED
author_association: MEMBER
submitted_at: 2025-04-30T06:49:36Z
user: login: SMoraisAnsys
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-30T07:23:52Z
user: login: RobPasMue
body: Apart from my comments, LGTM! Thanks @SMoraisAnsys for paving the way to dependency group support!
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-03T13:29:57Z
user: login: SMoraisAnsys
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-05T07:00:58Z
user: login: SMoraisAnsys
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-05T07:09:22Z
user: login: RobPasMue
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-05T07:32:27Z
user: login: RobPasMue
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-05T07:32:55Z
user: login: jorgepiloto
body: Thanks for adding this, @SMoraisAnsys. Should we enforce this? Knowing that we are going to release v10, it is the perfect excuse to only support groups. However, I may be missing something.
state: CHANGES_REQUESTED
author_association: MEMBER
submitted_at: 2025-05-05T08:00:38Z
user: login: SMoraisAnsys
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-05T08:15:02Z
user: login: SMoraisAnsys
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-05T08:20:27Z
user: login: jorgepiloto
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-05T09:04:58Z
user: login: MaxJPRey
body: LGTM.
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T09:01:02Z
user: login: jorgepiloto
state: CHANGES_REQUESTED
author_association: MEMBER
submitted_at: 2025-05-12T07:19:23Z
user: login: SMoraisAnsys
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-14T06:22:24Z
user: login: jorgepiloto
body: Awesome! Thanks for adding support for this, @SMoraisAnsys. Approving on my side.
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-14T07:09:26Z
user: login: SMoraisAnsys
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-15T06:22:35Z
user: login: SMoraisAnsys
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-15T06:23:56Z

Review comments:
diff_hunk: @@ -210,6 +210,11 @@ runs:
           echo "BUILD_BACKEND=$(echo 'pip')" >> $GITHUB_OUTPUT
           echo "SPHINX_BUILD_MAKE=$(echo 'make')" >> $GITHUB_OUTPUT
         fi
+        if [[ -f "pyproject.toml" ]] && grep -q "\[project.optional-dependencies\]" "pyproject.toml"; then
path: _doc-build-linux/action.yml
user: login: RobPasMue
body: My feeling is that the if-statement is wrong... we should be checking for "dependency-groups", not "optional-dependencies" @SMoraisAnsys 

https://peps.python.org/pep-0735/#example-dependency-groups-table

This applies to the entire implementation
created_at: 2025-04-30T06:49:02Z
author_association: MEMBER
diff_hunk: @@ -210,6 +210,11 @@ runs:
           echo "BUILD_BACKEND=$(echo 'pip')" >> $GITHUB_OUTPUT
           echo "SPHINX_BUILD_MAKE=$(echo 'make')" >> $GITHUB_OUTPUT
         fi
+        if [[ -f "pyproject.toml" ]] && grep -q "\[project.optional-dependencies\]" "pyproject.toml"; then
path: _doc-build-linux/action.yml
user: login: SMoraisAnsys
body: Indeed, typo spotted
created_at: 2025-04-30T07:23:51Z
author_association: CONTRIBUTOR
diff_hunk: @@ -108,6 +115,18 @@ inputs:
 runs:
   using: "composite"
   steps:
+
+    - uses: ansys/actions/_logging@main
path: doc-changelog/action.yml
user: login: RobPasMue
body: This will make it a breaking change I guess. The PR can only be exposed/released starting on v10.
created_at: 2025-05-03T13:26:45Z
author_association: MEMBER
diff_hunk: @@ -267,15 +272,20 @@ runs:
       shell: bash
       if: steps.check-exists-requirements-file.outputs.EXISTS_TESTS_REQUIREMENTS == 'false'
       env:
-        OPTIONAL_DEPENDENCIES_NAME: ${{ inputs.optional-dependencies-name }}
-        BUILD_BACKEND: ${{ steps.github-environment-variables.outputs.BUILD_BACKEND }}
         ACTIVATE_VENV: ${{ steps.virtual-environment-activation-command.outputs.ACTIVATE_VENV }}
+        BUILD_BACKEND: ${{ steps.github-environment-variables.outputs.BUILD_BACKEND }}
+        OPTIONAL_DEPENDENCIES_NAME: ${{ inputs.optional-dependencies-name }}
+        USE_PIP_DEPENDENCY_GROUPS: ${{ steps.github-environment-variables.outputs.USE_PIP_DEPENDENCY_GROUPS }}
       run: |
         $ACTIVATE_VENV
         if [[ "$BUILD_BACKEND" == 'poetry' ]]; then
           poetry install --with "$OPTIONAL_DEPENDENCIES_NAME"
         else
-          python -m pip install ".[${OPTIONAL_DEPENDENCIES_NAME}]"
+          if [[ "${USE_PIP_DEPENDENCY_GROUPS}" == 'true' ]]; then
+            python -m pip install --group "$OPTIONAL_DEPENDENCIES_NAME" .
path: tests-pytest/action.yml
user: login: RobPasMue
body: Does it accept several groups in comma-separated format? I.e. ``pip install --group group1,group2``
created_at: 2025-05-03T13:29:16Z
author_association: MEMBER
diff_hunk: @@ -267,15 +272,20 @@ runs:
       shell: bash
       if: steps.check-exists-requirements-file.outputs.EXISTS_TESTS_REQUIREMENTS == 'false'
       env:
-        OPTIONAL_DEPENDENCIES_NAME: ${{ inputs.optional-dependencies-name }}
-        BUILD_BACKEND: ${{ steps.github-environment-variables.outputs.BUILD_BACKEND }}
         ACTIVATE_VENV: ${{ steps.virtual-environment-activation-command.outputs.ACTIVATE_VENV }}
+        BUILD_BACKEND: ${{ steps.github-environment-variables.outputs.BUILD_BACKEND }}
+        OPTIONAL_DEPENDENCIES_NAME: ${{ inputs.optional-dependencies-name }}
+        USE_PIP_DEPENDENCY_GROUPS: ${{ steps.github-environment-variables.outputs.USE_PIP_DEPENDENCY_GROUPS }}
       run: |
         $ACTIVATE_VENV
         if [[ "$BUILD_BACKEND" == 'poetry' ]]; then
           poetry install --with "$OPTIONAL_DEPENDENCIES_NAME"
         else
-          python -m pip install ".[${OPTIONAL_DEPENDENCIES_NAME}]"
+          if [[ "${USE_PIP_DEPENDENCY_GROUPS}" == 'true' ]]; then
+            python -m pip install --group "$OPTIONAL_DEPENDENCIES_NAME" .
path: tests-pytest/action.yml
user: login: SMoraisAnsys
body: Just tested it and it's not working. You'd have to add both group separately `pip install --group=group1 --group=group2`
created_at: 2025-05-05T07:00:58Z
author_association: CONTRIBUTOR
diff_hunk: @@ -108,6 +115,18 @@ inputs:
 runs:
   using: "composite"
   steps:
+
+    - uses: ansys/actions/_logging@main
path: doc-changelog/action.yml
user: login: SMoraisAnsys
body: Technically that's the case. I just checked our two orgs and couldn't find a repo where `toml-version` was leveraged except for our ansys/actions. So... :p
Still thinking that we should add this in v10
created_at: 2025-05-05T07:09:22Z
author_association: CONTRIBUTOR
diff_hunk: @@ -267,15 +272,20 @@ runs:
       shell: bash
       if: steps.check-exists-requirements-file.outputs.EXISTS_TESTS_REQUIREMENTS == 'false'
       env:
-        OPTIONAL_DEPENDENCIES_NAME: ${{ inputs.optional-dependencies-name }}
-        BUILD_BACKEND: ${{ steps.github-environment-variables.outputs.BUILD_BACKEND }}
         ACTIVATE_VENV: ${{ steps.virtual-environment-activation-command.outputs.ACTIVATE_VENV }}
+        BUILD_BACKEND: ${{ steps.github-environment-variables.outputs.BUILD_BACKEND }}
+        OPTIONAL_DEPENDENCIES_NAME: ${{ inputs.optional-dependencies-name }}
+        USE_PIP_DEPENDENCY_GROUPS: ${{ steps.github-environment-variables.outputs.USE_PIP_DEPENDENCY_GROUPS }}
       run: |
         $ACTIVATE_VENV
         if [[ "$BUILD_BACKEND" == 'poetry' ]]; then
           poetry install --with "$OPTIONAL_DEPENDENCIES_NAME"
         else
-          python -m pip install ".[${OPTIONAL_DEPENDENCIES_NAME}]"
+          if [[ "${USE_PIP_DEPENDENCY_GROUPS}" == 'true' ]]; then
+            python -m pip install --group "$OPTIONAL_DEPENDENCIES_NAME" .
path: tests-pytest/action.yml
user: login: RobPasMue
body: Okay. This means that we will need to handle it ourselves. When using optional dependencies it is possible to pass in multiple values in comma-separated format
created_at: 2025-05-05T07:32:27Z
author_association: MEMBER
diff_hunk: @@ -108,6 +115,18 @@ inputs:
 runs:
   using: "composite"
   steps:
+
+    - uses: ansys/actions/_logging@main
path: doc-changelog/action.yml
user: login: RobPasMue
body: >  I just checked our two orgs and couldn't find a repo where toml-version was leveraged except for our ansys/actions. So... :p

I would wait for v10 nonetheless 😄 rather than doing a patch release
created_at: 2025-05-05T07:32:55Z
author_association: MEMBER
diff_hunk: @@ -279,8 +298,8 @@ runs:
         towncrier_config = pyproject_file if pyproject_file.exists() else towncrier_file
 
         # Load pyproject.toml
-        with open(towncrier_config, 'r') as f:
-            config = toml.load(f)
+        with open(towncrier_config, 'rb') as f:
path: doc-changelog/action.yml
user: login: jorgepiloto
body: Why reading it as binary, @SMoraisAnsys?
created_at: 2025-05-05T07:59:24Z
author_association: MEMBER
diff_hunk: @@ -279,8 +298,8 @@ runs:
         towncrier_config = pyproject_file if pyproject_file.exists() else towncrier_file
 
         # Load pyproject.toml
-        with open(towncrier_config, 'r') as f:
-            config = toml.load(f)
+        with open(towncrier_config, 'rb') as f:
path: doc-changelog/action.yml
user: login: SMoraisAnsys
body: Package `tomli` requires the file to be opened in binary mode, see https://github.com/hukkin/tomli?tab=readme-ov-file#parse-a-toml-file
created_at: 2025-05-05T08:15:02Z
author_association: CONTRIBUTOR
diff_hunk: @@ -267,15 +272,20 @@ runs:
       shell: bash
       if: steps.check-exists-requirements-file.outputs.EXISTS_TESTS_REQUIREMENTS == 'false'
       env:
-        OPTIONAL_DEPENDENCIES_NAME: ${{ inputs.optional-dependencies-name }}
-        BUILD_BACKEND: ${{ steps.github-environment-variables.outputs.BUILD_BACKEND }}
         ACTIVATE_VENV: ${{ steps.virtual-environment-activation-command.outputs.ACTIVATE_VENV }}
+        BUILD_BACKEND: ${{ steps.github-environment-variables.outputs.BUILD_BACKEND }}
+        OPTIONAL_DEPENDENCIES_NAME: ${{ inputs.optional-dependencies-name }}
+        USE_PIP_DEPENDENCY_GROUPS: ${{ steps.github-environment-variables.outputs.USE_PIP_DEPENDENCY_GROUPS }}
       run: |
         $ACTIVATE_VENV
         if [[ "$BUILD_BACKEND" == 'poetry' ]]; then
           poetry install --with "$OPTIONAL_DEPENDENCIES_NAME"
         else
-          python -m pip install ".[${OPTIONAL_DEPENDENCIES_NAME}]"
+          if [[ "${USE_PIP_DEPENDENCY_GROUPS}" == 'true' ]]; then
+            python -m pip install --group "$OPTIONAL_DEPENDENCIES_NAME" .
path: tests-pytest/action.yml
user: login: SMoraisAnsys
body: Oh, you are right. I was assuming that we should only work with a single install target.
created_at: 2025-05-05T08:20:27Z
author_association: CONTRIBUTOR
diff_hunk: @@ -279,8 +298,8 @@ runs:
         towncrier_config = pyproject_file if pyproject_file.exists() else towncrier_file
 
         # Load pyproject.toml
-        with open(towncrier_config, 'r') as f:
-            config = toml.load(f)
+        with open(towncrier_config, 'rb') as f:
path: doc-changelog/action.yml
user: login: jorgepiloto
body: Oh! Thanks for the heads up on this.
created_at: 2025-05-05T09:04:58Z
author_association: MEMBER
diff_hunk: @@ -222,6 +222,11 @@ runs:
           echo "BUILD_BACKEND=$(echo 'pip')" >> $GITHUB_OUTPUT
           echo "SPHINX_BUILD_MAKE=$(echo 'make')" >> $GITHUB_OUTPUT
         fi
+        if [[ -f "pyproject.toml" ]] && grep -q "\[dependency-groups\]" "pyproject.toml"; then
+          echo "USE_PIP_DEPENDENCY_GROUPS=true" >> $GITHUB_OUTPUT
+        else
+          echo "USE_PIP_DEPENDENCY_GROUPS=false" >> $GITHUB_OUTPUT
+        fi
path: _doc-build-linux/action.yml
user: login: jorgepiloto
body: We'll need to update this now that `uv` support has been implemented. Probably, we could resolve the package manager being used and pass the appropriate flags.
created_at: 2025-05-12T07:19:19Z
author_association: MEMBER
diff_hunk: @@ -222,6 +222,11 @@ runs:
           echo "BUILD_BACKEND=$(echo 'pip')" >> $GITHUB_OUTPUT
           echo "SPHINX_BUILD_MAKE=$(echo 'make')" >> $GITHUB_OUTPUT
         fi
+        if [[ -f "pyproject.toml" ]] && grep -q "\[dependency-groups\]" "pyproject.toml"; then
+          echo "USE_PIP_DEPENDENCY_GROUPS=true" >> $GITHUB_OUTPUT
+        else
+          echo "USE_PIP_DEPENDENCY_GROUPS=false" >> $GITHUB_OUTPUT
+        fi
path: _doc-build-linux/action.yml
user: login: SMoraisAnsys
body: [8d10504](https://github.com/ansys/actions/pull/794/commits/8d105043c0666455156ec260e651f4514acae48e) adds support for `uv`
created_at: 2025-05-14T06:22:24Z
author_association: CONTRIBUTOR
diff_hunk: @@ -248,6 +248,11 @@ runs:
           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
         }
+        if ((Test-Path "pyproject.toml") -and (Get-Content "pyproject.toml" | Select-String -Pattern '\[dependency-groups\]')) {
path: _doc-build-windows/action.yml
user: login: SMoraisAnsys
body: ```suggestion
        # NOTE: Dependency groups are only used with pip and uv
        if ((Test-Path "pyproject.toml") -and (Get-Content "pyproject.toml" | Select-String -Pattern '\[dependency-groups\]')) {
```
created_at: 2025-05-15T06:22:34Z
author_association: CONTRIBUTOR
diff_hunk: @@ -147,6 +147,11 @@ runs:
         else
           echo "BUILD_BACKEND=$(echo 'pip')" >> $GITHUB_OUTPUT
         fi
+        if [[ -f "pyproject.toml" ]] && grep -q "\[dependency-groups\]" "pyproject.toml"; then
path: tests-pytest/action.yml
user: login: SMoraisAnsys
body: ```suggestion
        # NOTE: Dependency groups are only used with pip and uv
        if [[ -f "pyproject.toml" ]] && grep -q "\[dependency-groups\]" "pyproject.toml"; then
```
created_at: 2025-05-15T06:23:56Z
author_association: CONTRIBUTOR

PR comments:
user: login: ansys-reviewer-bot[bot]
created_at: 2025-04-29T16:40:38Z
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: SMoraisAnsys
created_at: 2025-05-05T07:01:50Z
body: Btw, this branch was tested in https://github.com/ansys/pyaedt/actions/runs/14790270306 and is working
author_association: CONTRIBUTOR
user: login: SMoraisAnsys
created_at: 2025-05-05T12:33:46Z
body: > Thanks for adding this, @SMoraisAnsys. Should we enforce this? Knowing that we are going to release v10, it is the perfect excuse to only support groups. However, I may be missing something.

Indeed, this would be a nice timing to enforce that. Let us discuss on it and I'll extend the PR with changes if needed.
author_association: CONTRIBUTOR
user: login: SMoraisAnsys
created_at: 2025-05-14T08:40:21Z
body: I just run a test with this branch in pyaedt https://github.com/ansys/pyaedt/actions/runs/15016598437
Let's wait to see if this works and merge it if it does :)

author_association: CONTRIBUTOR
user: login: SMoraisAnsys
created_at: 2025-05-14T13:53:42Z
body: Switching to draft mode as the PR points to the dev branch for testing, I'll do the revert once the pyaedt's PR run is passing
author_association: CONTRIBUTOR
user: login: SMoraisAnsys
created_at: 2025-05-14T15:02:33Z
body: CI passed in https://github.com/ansys/pyaedt/actions/runs/15020668511
author_association: CONTRIBUTOR