Skip to content

Commit 720a7b6

Browse files
committed
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.
1 parent 9c1e66f commit 720a7b6

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

workflow-templates/deploy-cobra-mkdocs-versioned-poetry.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ jobs:
7979

8080
- name: Install Dependencies
8181
run: |
82-
task \
83-
poetry:install-deps
82+
task poetry:install-deps \
83+
POETRY_GROUPS=dev
8484
8585
- name: Determine versioning parameters
8686
id: determine-versioning

workflow-templates/deploy-mkdocs-poetry.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ jobs:
4242

4343
- name: Install Dependencies
4444
run: |
45-
task \
46-
poetry:install-deps
45+
task poetry:install-deps \
46+
POETRY_GROUPS=dev
4747
4848
- name: Deploy website
4949
run: |

workflow-templates/deploy-mkdocs-versioned-poetry.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ jobs:
6767

6868
- name: Install Dependencies
6969
run: |
70-
task \
71-
poetry:install-deps
70+
task poetry:install-deps \
71+
POETRY_GROUPS=dev
7272
7373
- name: Determine versioning parameters
7474
id: determine-versioning

0 commit comments

Comments
 (0)