Avoid stale cache for multimodel statistics regression tests#1030
Avoid stale cache for multimodel statistics regression tests#1030bouweandela merged 1 commit intomasterfrom
Conversation
valeriupredoi
left a comment
There was a problem hiding this comment.
cheers @bouweandela - this was bothering me but I was under the assumption that'd be fixed by the periodic regeneration of the test container...until two days passed and the fail was still there 😁
| If this doesn't avoid problems with unpickling the cached data, | ||
| manually clean the pytest cache with the command `pytest --cache- | ||
| clear`. | ||
| manually clean the pytest cache with the command `pytest --cache-clear`. |
There was a problem hiding this comment.
Just a side comment, was this formatted by yapf? On my end it prefers the left side 🤔
There was a problem hiding this comment.
It was formatted by me, yapf doesn't modify any strings (or any other part of the code). I feel that is more readable without the line-break in the middle of the argument.
There was a problem hiding this comment.
Agreed, but our autoformatters (if not yapf, then maybe docformatter) will prefer the left version so I gave up on changing it back 😅
There was a problem hiding this comment.
I personally see those more as useful tools to quickly arrive at a decent formatting than the definitive guide on how stuff should be formatted. Hopefully a newer version of docformatter will be smarter.
Description
To show that this actually solves the problem, I
fix-regression-multimodel-testsoffmasterbefore Use nearest scheme to avoid interpolation errors with masked data in regression test #1021 was merged and pushed it, to run the tests and create the pytest cache.fix-regression-multimodel-testsand pushed that, to show that the tests fail because of the stale cache.You can view the results of the test runs here:
https://app.circleci.com/pipelines/github/ESMValGroup/ESMValCore?branch=fix-regression-multimodel-tests
I added some comments with instructions to change the cache key every time the cached input data is changed, to hopefully avoid this problem in the future.
Before you get started
Checklist
pre-commitoryamllintchecksTo help with the number pull requests: