-
Notifications
You must be signed in to change notification settings - Fork 43
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
Various testing fixes #283
Conversation
Note: something truly crazy was happening before this ...
|
At present the noxfile supports a dual test-run matrix for Iris versions : one from 'latest' (repo branch 'main') and one from 'conda-forge' (i.e. latest released version). Basically, this was causing trouble because a non-bugfix change was merged into Iris v3.0.x. I will investigate configuring cirrus to do separate tasks for the 'latest' and 'conda-forge' testing |
I would have retained that test, but it seems to be hitting an unrelated error, I'm guessing related to ecCodes, so I think we can drop that rather than fix it. It was there to ensure that it was "safe" to fetch a zero-length slice (because Dask appeared to need it). |
OK, although it is explicitly possible to use "matrix" more than once, I think that does require different Cirrus keywords to apply it to. Whereas our options are both implemented with the 'env' key. So, the previous commit Meanwhile, this latest commit, does allow me to specify "python-version" and "iris-source" separately. Presumably, another way is to use an "incorrect" YAML syntax with a repeated key, as we had before for the python versions. |
( Sorry for the braindump : It appears that the ordering + uniqueness of "mapping keys" is not a given in many implementations of YAML I think Cirrus may be using its own fork of a popular YAML engine -- though I'm not entirely sure why, and they may possibly have reverted to the original by now?. So in short (!) I think you were right @trexfeathers that Cirrus is not strict about YAML, but ideally I think we should be -- at least to be future-proof. |
@pp-mo out of the two options you present I definitely prefer 8762cf5, although I would certainly like to use 'true' matrix construction if it were possible to write in a non-confusing way using correct syntax. Intuitively I would have hoped the below would be valid: env:
matrix:
PY_VER:
- 3.7
- 3.8
IRIS_SOURCE:
- "conda-forge"
- "source" |
That's an interesting approach. I wonder if I have been over-concerned about the 'special' nature of the 'env' construct? I think, from closer inspection of the docs, that 'matrix' must work in a pre-processing kind of way, like a macro applying to the source text, which is replaced with one of its options wherever it occurs.
So in this, each 'branch' of the (last) matrix is providing more than one key in the containing definition ... If it does works like that, then the 'env' construct would probably not behave differently from anything else.
Let's see if that works ... |
No it doesn't like that.
I'm going to try your example, though I'm not sure it is right. Just to put my cards on the table before trying it... according to my reading that approach "ought" to mean that you either include a PY_VER or an IRIS_SOURCE key (but never both) ... |
(for sake of documenting the struggle...)
|
So I think we are back to either a task with two "env" keys, or an env with two "matrix" keys. So, following your
I'm going back to the "expand the options" approach. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done @pp-mo!
@trexfeathers thanks for the discussion, and just for sticking with it! |
Replacing #282
As I needed a new branch