Skip to content

Commit 31eae1e

Browse files
authored
Merge pull request #144 from per1234/poetry-groups
Only install Python package dependencies from relevant group
2 parents 158f3d5 + 6c8ee09 commit 31eae1e

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

Taskfile.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ tasks:
122122
desc: Check for commonly misspelled words
123123
deps:
124124
- task: poetry:install-deps
125+
vars:
126+
POETRY_GROUPS: dev
125127
cmds:
126128
- |
127129
poetry run \
@@ -132,6 +134,8 @@ tasks:
132134
desc: Correct commonly misspelled words where possible
133135
deps:
134136
- task: poetry:install-deps
137+
vars:
138+
POETRY_GROUPS: dev
135139
cmds:
136140
- |
137141
poetry run \
@@ -380,11 +384,17 @@ tasks:
380384
381385
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
382386
poetry:install-deps:
383-
desc: Install dependencies managed by Poetry
387+
desc: |
388+
Install dependencies managed by Poetry.
389+
Environment variable parameters:
390+
POETRY_GROUPS: Poetry dependency groups to install (default: install all dependencies).
384391
deps:
385392
- task: poetry:install
386393
cmds:
387-
- poetry install --no-root
394+
- |
395+
poetry install \
396+
--no-root \
397+
{{if .POETRY_GROUPS}} --only {{.POETRY_GROUPS}} {{end}}
388398
389399
# Make a temporary file named according to the passed TEMPLATE variable and print the path passed to stdout
390400
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/windows-task/Taskfile.yml
@@ -426,6 +436,8 @@ tasks:
426436
desc: Check for problems with YAML files
427437
deps:
428438
- task: poetry:install-deps
439+
vars:
440+
POETRY_GROUPS: dev
429441
cmds:
430442
- |
431443
poetry run \

0 commit comments

Comments
 (0)