-
Notifications
You must be signed in to change notification settings - Fork 127
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
Add new Psyplot diagnostic #2653
Conversation
@@ -1,8 +0,0 @@ | |||
Diagnostic scripts |
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.
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.
nice one, Manu! I am guessing this has nothing to do with PSY eh? 😁 - two minor comments from me, and a quick request to turn on then off one of the Test Github Actions to see if all's good with the env after adding those psy packages 👍
ah also - would this not make for a nice preprocessor? Not now - when we'll have plotting preprocessors - but just to keep it in mind, that is |
Definitely!! Plotting preprocessors is actually something we should discuss at the workshop as part of the long-term strategy 👍 |
All GH action tests ran successful 🎉 |
Thanks for the reviews @valeriupredoi @lukruh 🚀 |
The test introduced in this PR produced an error in the nightly tests (see here). The problem seems to be a race condition where the package finds that it has no config file and tries to create that, but two processes try that at the same time and then can interfere. Upstream may be unwilling to address this because it is not likely a real life problem; we might mitigate it by creating the config before running the test. |
I didn't add a test in this PR... I'm not really sure which test actually fails, the error message just says |
Hm. Good point. I didn't read the message carefully enough. @bouweandela, @valeriupredoi any ideas? |
having a looksee at this right now, I smell gagnam-style coding on the part of Psy |
pytest does that - checks all imports in all recognized python scripts - it's actually a very useful feature since sometimes one doesn't have tests per se, but can just run a pytest instance in the CI to check if all imports work |
I don't think we should abuse Pytest's discovery logic as a poor man's import test. |
So how can we solve this? Adding a |
@zklaus We use pytest to run flake8 and doctests, that's the kind of tests it will find in the esmvaltool directory. |
the problem is I can not manage to reproduce the fail on Linux under any circumstance: running five instance of a pytest (that only imports that module) in parallel with |
It should be possible to use a library from different programs simultaneously. I would suggest reporting the issue and if the authors are indeed not interested in getting itt fixed we can think about workarounds. |
I agree with Bouwe - I am trying to see if it's an OSX specific issue now, so we can noarrow down the parameter space for the Psy devvs, a bit hard coz it's like fishing on a frozen lake, not having a Mac myself |
Alright, sounds good. In the meantime, we just accept the occasional red cross on osx? |
yeah we can change the sticker on the main README to point only to the Linux tests I think, so we save face for new users 😁 |
OK I managed to force the race condition to come from an actual test https://github.com/ESMValGroup/ESMValTool/runs/6470528634?check_suite_focus=true - again on OSX only, and it clearly is a race condition, probably due to how slow the execution is on Darwin machines on GA. Here is a suggestion for the Psy guys https://stackoverflow.com/questions/1586648/race-condition-creating-folder-in-python - @schlunma you wanna do the nonors to open an issue on the Psy GH? 🍺 |
I already got an answer to the issue with a PR and was asked to check if that fix solves our problem. Any suggestions on how to do that? I also don't own a Mac, and as far as I can tell this only happens on OSX 😅 |
@valeriupredoi, did you have a reproducible way to trigger the error? Otherwise I would say that the fix looks appropriate and explain that we have the issue only in a race condition that occurs rarely and that we'll get back if it doesn't solve the problem. |
@zklaus not an 100% reproducible case, it looks to be 1 out of 6 or 9 times reproducible, so it's best to go the way you suggest 👍 |
BTW the psy thingie failed for Linux too - so it's not just OSX - it's a stock race condition, that happens everytime a magpie craps on a BMW 🐦 |
Description
This PR adds a recipe and diagnostic that provides a high-level interface for the Psyplot package. This package can produce a large variety of plots, e.g., plot unstructured UGRID and ICON data:
Links to documentation:
@lukruh Would you be able to briefly test this recipe and approve the changes if you like them? I think this diagnostic might be especially interesting to you since it allows plotting arbitrary ICON output on the native grid. Maybe you could even try to plot native ICON output with it? Cheers!
Checklist
It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.
New or updated recipe/diagnostic
To help with the number of pull requests: