Skip to content

Use pyproject.toml as Python version source #599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/check-python-task.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-python-task.md
name: Check Python

env:
# See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
PYTHON_VERSION: "3.9"

# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
on:
create:
Expand Down Expand Up @@ -73,7 +69,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: pyproject.toml

- name: Install Poetry
run: pip install poetry
Expand Down Expand Up @@ -104,7 +100,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: pyproject.toml

- name: Install Poetry
run: pip install poetry
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/check-yaml-task.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-yaml-task.md
name: Check YAML

env:
# See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
PYTHON_VERSION: "3.9"

# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
on:
create:
Expand Down Expand Up @@ -101,7 +97,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: pyproject.toml

- name: Install Poetry
run: pip install poetry
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/spell-check-task.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/spell-check-task.md
name: Spell Check

env:
# See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
PYTHON_VERSION: "3.9"

# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
on:
create:
Expand Down Expand Up @@ -55,7 +51,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: pyproject.toml

- name: Install Poetry
run: pip install poetry
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/test-python-poetry-task.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/test-python-poetry-task.md
name: Test Python

env:
# See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
PYTHON_VERSION: "3.9"

# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
on:
create:
Expand Down Expand Up @@ -69,7 +65,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: pyproject.toml

- name: Install Poetry
run: pip install poetry
Expand Down
3 changes: 1 addition & 2 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ The following development tools must be available in your local environment:
- [**Node.js** / **npm**](https://nodejs.org/en/download/) - Node.js dependencies management tool
- The **Node.js** version in use is defined by the `engines.node` key of [`package.json`](../package.json).
- [**Python**](https://wiki.python.org/moin/BeginnersGuide/Download)
- <!-- PYTHON_VERSION -->
This project uses Python 3.9.x
- The **Python** version in use is defined by the `tool.poetry.dependencies.python` key of [`pyproject.toml`](../pyproject.toml).
- [**Poetry**](https://python-poetry.org/docs/#installation) - Python dependencies management tool
- [**Task**](https://taskfile.dev/installation/) - task runner tool

Expand Down
7 changes: 2 additions & 5 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description = ""
authors = ["Arduino <info@arduino.cc>"]

[tool.poetry.dependencies]
python = "^3.9"
python = "~3.9"

[tool.poetry.dev-dependencies]
yamllint = "^v1.37.1"
Expand Down
6 changes: 1 addition & 5 deletions workflow-templates/check-mkdocs-task.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-mkdocs-task.md
name: Check Website

env:
# See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
PYTHON_VERSION: "3.9"

# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
on:
create:
Expand Down Expand Up @@ -69,7 +65,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: pyproject.toml

- name: Install Poetry
run: pip install poetry
Expand Down
8 changes: 2 additions & 6 deletions workflow-templates/check-python-task.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-python-task.md
name: Check Python

env:
# See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
PYTHON_VERSION: "3.9"

# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
on:
create:
Expand Down Expand Up @@ -73,7 +69,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: pyproject.toml

- name: Install Poetry
run: pip install poetry
Expand Down Expand Up @@ -104,7 +100,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: pyproject.toml

- name: Install Poetry
run: pip install poetry
Expand Down
6 changes: 1 addition & 5 deletions workflow-templates/check-yaml-task.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-yaml-task.md
name: Check YAML

env:
# See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
PYTHON_VERSION: "3.9"

# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
on:
create:
Expand Down Expand Up @@ -101,7 +97,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: pyproject.toml

- name: Install Poetry
run: pip install poetry
Expand Down
6 changes: 1 addition & 5 deletions workflow-templates/deploy-cobra-mkdocs-versioned-poetry.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/deploy-cobra-mkdocs-versioned-poetry.md
name: Deploy Website

env:
# See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
PYTHON_VERSION: "3.9"

on:
push:
branches:
Expand Down Expand Up @@ -70,7 +66,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: pyproject.toml

- name: Install Poetry
run: |
Expand Down
6 changes: 1 addition & 5 deletions workflow-templates/deploy-mkdocs-poetry.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/deploy-mkdocs-poetry.md
name: Deploy Website

env:
# See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
PYTHON_VERSION: "3.9"

# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
on:
push:
Expand Down Expand Up @@ -33,7 +29,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: pyproject.toml

- name: Install Poetry
run: pip install poetry
Expand Down
6 changes: 1 addition & 5 deletions workflow-templates/deploy-mkdocs-versioned-poetry.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/deploy-mkdocs-versioned-poetry.md
name: Deploy Website

env:
# See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
PYTHON_VERSION: "3.9"

on:
push:
branches:
Expand Down Expand Up @@ -60,7 +56,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: pyproject.toml

- name: Install Poetry
run: |
Expand Down
6 changes: 1 addition & 5 deletions workflow-templates/spell-check-task.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/spell-check-task.md
name: Spell Check

env:
# See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
PYTHON_VERSION: "3.9"

# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
on:
create:
Expand Down Expand Up @@ -55,7 +51,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: pyproject.toml

- name: Install Poetry
run: pip install poetry
Expand Down
6 changes: 1 addition & 5 deletions workflow-templates/test-go-integration-task.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/test-go-integration-task.md
name: Test Integration

env:
# See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
PYTHON_VERSION: "3.9"

# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
on:
create:
Expand Down Expand Up @@ -86,7 +82,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: pyproject.toml

- name: Install Poetry
run: pip install poetry
Expand Down
6 changes: 1 addition & 5 deletions workflow-templates/test-python-poetry-task.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/test-python-poetry-task.md
name: Test Python

env:
# See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
PYTHON_VERSION: "3.9"

# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
on:
create:
Expand Down Expand Up @@ -69,7 +65,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version-file: pyproject.toml

- name: Install Poetry
run: pip install poetry
Expand Down
Loading