From 720a7b619f807ac6a5d5762f3e96ecf7c6f6dc5f Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 12 Sep 2025 07:12:56 -0700 Subject: [PATCH] Only install Python package dependencies from relevant group The "Poetry" tool is used to manage the Python package dependencies of the website deployment workflows. Dependencies might be classified into distinct categories. The most basic classification would be: - Application dependencies: used by the project's applications - Development dependencies: tools used in the development and maintenance of the project, but not by the application By default, Poetry installs all non-optional dependencies. This can be inefficient in a case where a specific operation is being performed, since a given operation might only require the dependencies from one category and so the installation of dependencies from the other is pointless for that operation. For this reason, Poetry allows the user to organize dependencies into arbitrary "groups", and to specify which groups should be installed. The calls to the Python package installation task in the workflows is hereby updated specify the `dev` group of the required dependencies. --- workflow-templates/deploy-cobra-mkdocs-versioned-poetry.yml | 4 ++-- workflow-templates/deploy-mkdocs-poetry.yml | 4 ++-- workflow-templates/deploy-mkdocs-versioned-poetry.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/workflow-templates/deploy-cobra-mkdocs-versioned-poetry.yml b/workflow-templates/deploy-cobra-mkdocs-versioned-poetry.yml index 1d42d962..1858bff2 100644 --- a/workflow-templates/deploy-cobra-mkdocs-versioned-poetry.yml +++ b/workflow-templates/deploy-cobra-mkdocs-versioned-poetry.yml @@ -79,8 +79,8 @@ jobs: - name: Install Dependencies run: | - task \ - poetry:install-deps + task poetry:install-deps \ + POETRY_GROUPS=dev - name: Determine versioning parameters id: determine-versioning diff --git a/workflow-templates/deploy-mkdocs-poetry.yml b/workflow-templates/deploy-mkdocs-poetry.yml index 401d6542..34e3c08d 100644 --- a/workflow-templates/deploy-mkdocs-poetry.yml +++ b/workflow-templates/deploy-mkdocs-poetry.yml @@ -42,8 +42,8 @@ jobs: - name: Install Dependencies run: | - task \ - poetry:install-deps + task poetry:install-deps \ + POETRY_GROUPS=dev - name: Deploy website run: | diff --git a/workflow-templates/deploy-mkdocs-versioned-poetry.yml b/workflow-templates/deploy-mkdocs-versioned-poetry.yml index 9c89888b..381b6141 100644 --- a/workflow-templates/deploy-mkdocs-versioned-poetry.yml +++ b/workflow-templates/deploy-mkdocs-versioned-poetry.yml @@ -67,8 +67,8 @@ jobs: - name: Install Dependencies run: | - task \ - poetry:install-deps + task poetry:install-deps \ + POETRY_GROUPS=dev - name: Determine versioning parameters id: determine-versioning