Skip to content

Conversation

tiran
Copy link
Contributor

@tiran tiran commented Apr 22, 2024

Changes

Description of your changes:

The previous tox.ini used fixed testenvs that used the default basepython, which typically points to python3. It was not easily possible to run tests with another Python version.

The new configuration uses tox's matrix configuration feature. The default targets for tests are now py3-unit, py3-unitcov, and py3-functional. These targets use python3 as base Python. With the new configurion it's now possible to run tests with different Python versions. For example tox -e py39-unit runs unit tests with python3.9.

Tox is also configured to use wheel with a common wheel env for sdist and binary wheel dist. This speeds up purelib wheel creation.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Apr 22, 2024
@tiran tiran force-pushed the tox-matrix branch 3 times, most recently from 53f4657 to e22891d Compare April 22, 2024 10:41
@alimaredia alimaredia removed the request for review from mairin April 23, 2024 03:27
The previous `tox.ini` used fixed testenvs that used the default
`basepython`, which typically points to `python3`. It was not easily
possible to run tests with another Python version.

The new configuration uses tox's matrix configuration feature. The
default targets for tests are now `py3-unit`, `py3-unitcov`, and
`py3-functional`. These targets use `python3` as base Python. With the
new configurion it's now possible to run tests with different Python
versions. For example `tox -e py39-unit` runs unit tests with `python3.9`.

Tox is also configured to use wheel with a common wheel env for sdist
and binary wheel dist. This speeds up purelib wheel creation.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
@tiran
Copy link
Contributor Author

tiran commented Apr 23, 2024

The PR is a prerequisite to test InstructLab with multiple Python versions. A common approach is tox-gh-actions, Python matrix in GHA, and a mapping of GHA env to tox env in tox.ini.

Copy link
Member

@russellb russellb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@russellb russellb merged commit 5d3cbe9 into instructlab:main Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants