Skip to content
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

ci: improving readability of testing matrix #244

Closed
wants to merge 3 commits into from

Conversation

Borda
Copy link
Contributor

@Borda Borda commented Mar 13, 2024

As it is decalted now it is not trivial to make contributor head what are the tested cases...
So first sing a dictionary written in a single line to its closed-to-table reading which is easier for humans; then rather define rules for run with exceptions then special cases...

This also will increase the number of running suits, but I believe it is in favor of extension stability

cc: @bsipocz @pllim

Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

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

Thanks for your contributon!

However, the updated matrix is much harder for me to read, which is opposite of "making things easier for contributors" as you claimed. But I am just one data point.

The pytestoldest naming and exact pinning was actually requested by @bsipocz .

The only thing that I 100% agree on right now is adding pytest81: pytest==8.1.* job.

PY: ${{ matrix.python-version }}
PT: ${{ matrix.pytest-version }}
run: |
# crete the token as "pyXY-test-pytestXY" from the matrix with drop dots
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment has typo and I don't know what "drop dots" mean.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the base python notation is 3.8 with dot but for env you use just numbers 38

Copy link
Member

Choose a reason for hiding this comment

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

If I see correctly this matrix update will have way more jobs, as we haven't tested all old versions with all OSes, etc, and have already received criticism that there are way too many jobs for the versions in the middle.

@pllim
Copy link
Contributor

pllim commented Mar 13, 2024

p.s. If we deem this PR is ok to go forward, I can approve the CI run then. For now, I will just leave it unapproved. Thank you for your patience!

@Borda
Copy link
Contributor Author

Borda commented Mar 13, 2024

the updated matrix is much harder for me to read, which is opposite of "making things easier for contributors" as you claimed. But I am just one data point.

you are right, it can be very subjective, but at least I would convert it to d61a564

The pytestoldest naming and exact pinning was actually requested by @bsipocz .

it is set as explicit 4.6 so once it fails you do not need to dive to tox try to understand what the oldest version is

@pllim
Copy link
Contributor

pllim commented Mar 13, 2024

Thanks for the quick response! Let's see what @bsipocz say first. 🐱

@bsipocz
Copy link
Member

bsipocz commented Mar 13, 2024

I find the matrix part more legible, but it doesn't do what we had before. Otoh, I don't find the curly brackets and longer lines etc around the one-off combinations helpful, quite the opposite.

Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

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

This has to be changed back. We explicitly use "oldest" in the name, but just here but a lot of other places to show it's the job with the oldest supported version of declared dependencies.
The proposed change is something that let through bugs before we switched to be explicit.

@@ -13,7 +13,7 @@ setenv =
numpydev: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
description = run tests
deps =
pytestoldest: pytest==4.6.0
pytest46: pytest==4.6.*
Copy link
Member

Choose a reason for hiding this comment

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

The oldest have to stay explicit and the version that is declared in the config. Besides that, there is no need to test the latest bugfix in the 4.6 series

@Borda
Copy link
Contributor Author

Borda commented Mar 13, 2024

@bsipocz not sure if I got your reply correctly, sounds like you do not agree with any part of this PR, correct? in such case, let's just close it... :)

@pllim
Copy link
Contributor

pllim commented Mar 13, 2024

Adding pytest81: pytest==8.1.* should be uncontroversial though. Do you want to just address that part in a separate PR? :)

@bsipocz
Copy link
Member

bsipocz commented Mar 13, 2024

I like the matrix form better but unfortunately it doesn't do the same thing, see a ci run of 19 jobs on main vs 157 jobs in this PR.

So if we take away those changes that don't work, unfortunately, it's indeed just the pytest addition that remains in this PR.

@Borda
Copy link
Contributor Author

Borda commented Mar 13, 2024

I like the matrix form better but unfortunately it doesn't do the same thing, see a ci run of 19 jobs on main vs 157 jobs in this PR.

You are right as I did all combinations (and it was a demonstration not necessarily final state), but also you may want to define rich combinations for all Python and pytest versions on Ubuntu and then add a few includes for the latest and oldest configurations for MacOS and Windows.

@bsipocz
Copy link
Member

bsipocz commented Mar 13, 2024

Even that maybe an overkill. The only thing we definitely need to test for is all the (major) pytest versions as those sometimes change suddenly. Then the combination of the OS or python version can be much sparer as pytest itself already test for those. Given the incompatibilities (new pytest on old python vs old pytest on new python) the matrix form will get rather complicated to make it work, and then we'll need to add enough other OS jobs.
So maybe this all comes down to some documentation lines in the config file that summarize the above logic, and also separates the "walking through the versions" jobs from the more special cases?

@bsipocz bsipocz closed this in #245 Mar 13, 2024
@bsipocz bsipocz reopened this Mar 13, 2024
@bsipocz
Copy link
Member

bsipocz commented Mar 13, 2024

I didn't mean to close just yet it with the other PR.

@Borda Borda marked this pull request as draft March 13, 2024 15:54
@bsipocz bsipocz mentioned this pull request May 3, 2024
@pllim pllim closed this in #251 May 3, 2024
@Borda Borda deleted the ci/matrix branch May 3, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants