TST: replace mpl380 tox factor with oldestdeps and solidify reproducibility of image tests#19115
TST: replace mpl380 tox factor with oldestdeps and solidify reproducibility of image tests#19115neutrinoceros wants to merge 1 commit intoastropy:mainfrom
mpl380 tox factor with oldestdeps and solidify reproducibility of image tests#19115Conversation
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
mhvk
left a comment
There was a problem hiding this comment.
That's a very nice solution! And logical to test with oldestdeps.
|
If possible, I would like @astrofrog and/or @Cadair to have a look because they set this up and they would know best if this refactoring still reflects their original design, as this isn't a one-to-one replacement. |
|
I think this is fine as long as we accept that bumping oldestdeps will probably mean a full figure regeneration. Also if we have different oldestdeps on different branches things might break (I'm not 100% clear on how we handle figure tests on different branches at the moment, I get confused with the slight differences in setup between sunpy and astropy). I think on a more philosophical level, this will stop you being able to do visual figure comparisons of historic commits (i.e. regenerating the figures for oldestdeps will mean there isn't old versions of the reference images like there is now). I'm not personally that worried about this, but thought it was worth mentioning. (We could solve this other ways if we wanted, like making the figure names use the installed version of mpl rather than having it hard-coded). |
On the contrary, this should be making env resolution for old commits reliably reproducible, so I'm not sure I get your point ? |
|
I think we are maybe not talking about the same thing. Each figure test env uploads figures (in a folder named for the tox env) here: https://github.com/astropy/astropy-figure-tests/tree/astropy-main/figures at the moment the old envs stay around even after we stop updating them, but if they are all named |
|
oh, I get it now. Isn't this repo used as a submodule here ? if so, it should trivially be pinned to a git commit hash, which would make this problem moot. Alternatively, we could also add git tags there ? |
|
I don't think it is a Git submodule and I do not wish to reintroduce that after we managed to get rid of astropy-helpers |
This does seem okay to me too. Overall I don't see anything blocking here, so can we move forward with it ? |
Let me try to understand, so we will need a lot more PRs like this? |
…ducibility of image tests
27a2a28 to
41f25f9
Compare
|
(rebased to resolve a merge conflict) |
|
friendly reminder @Cadair |
|
I have a concern related to what @Cadair raised above. Let's say we release astropy 8.0 which has a certain set of versions for oldestdeps. Now let's suppose that in The only way I can think of to get around this if we want to avoid having to rename CI jobs is that when we construct the reference image URL, we inject the matplotlib version into it (like we used to). |
|
I couldn't find how it used to be done in the repo history. Any pointers ? |
|
Something like this: https://github.com/astropy/astropy/blob/v3.0.x/astropy/tests/image_tests.py Just wondering, is this really worth it though? We only bump the minimum MPL version once or twice a year, and not sure if it's worth over-engineering this? |
right, but this PR isn't really about removing this (admittedly marginal) maintenance burden: the goal is rather to eliminate a failure mode, which the current state of
One could argue the existing setup is over-engineered already. I'd like to give a shot at figuring out a simpler solution that eliminates the defect you and Stuart pointed out. |
|
I think we could probably retain the existing env names and remove metadata duplication by using recent tox features like |
|
I think I'll need to migrate |
|
apparently tox configuration is in a weird state right now: |
|
Apparently this "design" was actually intentional: I'm at a loss for words. |
|
|
Description
This is a follow up to #18986, containing just the env-renaming part. The patch is trivial but manual intervention is needed because it implies a change in name for a required job. Maybe we could actually avoid this pain in the future using a future-proof name for it instead of hardcoding the exact version of mpl within the name ?