Skip to content

Commit 538e5ae

Browse files
committed
Add dedicated Python dependency installation task
A dedicated task has been added for installing the project's Python dependencies via Poetry, and this should be used throughout the taskfile in place of redundant direct commands.
1 parent 4222c3b commit 538e5ae

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

Taskfile.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ tasks:
4343
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/test-go-integration-task/Taskfile.yml
4444
go:test-integration:
4545
desc: Run integration tests
46-
cmds:
46+
deps:
4747
- task: go:build
48-
- poetry install --no-root
48+
- task: poetry:install-deps
49+
cmds:
4950
- poetry run pytest test
5051

5152
go:check:
@@ -88,18 +89,26 @@ tasks:
8889
cmds:
8990
- go fmt {{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}}
9091

92+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/poetry-task/Taskfile.yml
93+
poetry:install-deps:
94+
desc: Install dependencies managed by Poetry
95+
cmds:
96+
- poetry install --no-root
97+
9198
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-python-task/Taskfile.yml
9299
python:lint:
93100
desc: Lint Python code
101+
deps:
102+
- task: poetry:install-deps
94103
cmds:
95-
- poetry install --no-root
96104
- poetry run flake8 --show-source
97105

98106
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-python-task/Taskfile.yml
99107
python:format:
100108
desc: Format Python files
109+
deps:
110+
- task: poetry:install-deps
101111
cmds:
102-
- poetry install --no-root
103112
- poetry run black .
104113

105114
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-prettier-formatting-task/Taskfile.yml
@@ -111,13 +120,15 @@ tasks:
111120
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check-task/Taskfile.yml
112121
general:check-spelling:
113122
desc: Check for commonly misspelled words
123+
deps:
124+
- task: poetry:install-deps
114125
cmds:
115-
- poetry install --no-root
116126
- poetry run codespell
117127

118128
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check-task/Taskfile.yml
119129
general:correct-spelling:
120130
desc: Correct commonly misspelled words where possible
131+
deps:
132+
- task: poetry:install-deps
121133
cmds:
122-
- poetry install --no-root
123134
- poetry run codespell --write-changes

0 commit comments

Comments
 (0)