Skip to content
New issue

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

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

Already on GitHub? # to your account

Use pyproject.toml as Python version source #490

Merged
merged 1 commit into from
Dec 21, 2024

Conversation

per1234
Copy link
Collaborator

@per1234 per1234 commented Dec 21, 2024

Python and Python-based tools are used in the development and maintenance of the project. A standardized version of Python is used for these operations.

Poetry is used for Python package dependencies management. Poetry installs dependencies into a virtual environment. For this reason, the Poetry configuration includes a Python version number, which must match the correct version of Python for the project. This configuration is stored in the pyproject.toml file.

Python is installed in the GitHub Actions runner environments using the "actions/setup-python" action, which also must be configured to install the correct version of Python. Previously the version number for use by the actions/setup-python action was defined in each workflow. This meant that we had multiple copies of the Python version information, all of which had to be kept in sync.

Fortunately, support for using pyproject.toml as the source of version information for the "actions/setup-python" action was recently added. This means it is now possible for all components of the project infrastructure to get the Python version from a single source.

Python and Python-based tools are used in the development and maintenance of the project. A standardized version of
Python is used for these operations.

Poetry is used for Python package dependencies management. Poetry installs dependencies into a virtual environment. For
this reason, the Poetry configuration includes a Python version number, which must match the correct version of Python
for the project. This configuration is stored in the `pyproject.toml` file.

Python is installed in the GitHub Actions runner environments using the "actions/setup-python" action, which also must
be configured to install the correct version of Python. Previously the version number for use by the actions/setup-python
action was defined in each workflow. This meant that we had multiple copies of the Python version information, all of
which had to be kept in sync.

Fortunately, support for using `pyproject.toml` as the source of version information for the "actions/setup-python"
action was recently added. This means it is now possible for all components of the project infrastructure to get the
Python version from a single source.
@per1234 per1234 added the topic: infrastructure Related to project infrastructure label Dec 21, 2024
@per1234 per1234 self-assigned this Dec 21, 2024
@per1234 per1234 closed this Dec 21, 2024
@per1234 per1234 reopened this Dec 21, 2024
@per1234 per1234 merged commit 2b817ca into arduino:main Dec 21, 2024
24 of 28 checks passed
@per1234 per1234 deleted the python-versioning-source branch December 21, 2024 20:18
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
topic: infrastructure Related to project infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant