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
Fix provenance of figures of several R diagnostics #2300
Conversation
@katjaweigel Would you be willing to review this, since you know some R? |
ok, I'll have a look. |
@esmvalbot Please run recipe_spei.yml |
Since @katjaweigel asked, ESMValBot will run recipe recipe_spei.yml as soon as possible, output will be generated here |
ESMValBot is happy to report recipe recipe_spei.yml ran OK, output has been generated here |
@bouweandela Looks fine for me, thanks! But there are several other R diagnostics, which would need the same change, so far I found: |
I'll have a look, thanks for bringing those to my attention. My R is not good enough to know that there are multiple ways to add keys to a list, so I only looked for the string |
@katjaweigel I updated all occurrences of |
seems like the newly requested R package has made an already very slow |
@bouweandela I think hyint uses functions stored in other scripts (e.g. hyint_plot_trends.R) to do the plots, but they don't write any provenance. But I think it is possible (or already part of the data given back), to get the file name of the figure back from these functions, to write the provenance file for all figures where the other provenance file is written. But I'm not really sure about this and have to check it in more detail. |
@esmvalbot Please run recipe_hyint.yml |
Since @bouweandela asked, ESMValBot will run recipe recipe_hyint.yml as soon as possible, output will be generated here |
From just looking at the code of the hyint diagnostics, provenance looked OK, but let's try running the recipes to be sure. |
ESMValBot is sorry to report it failed to run recipe recipe_hyint.yml: exit is 1, output has been generated here |
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.
OK by me from a purely technical (environment/testing) point of view, but please merge only when the sciencey bit is reviewed 👍
There is no science bit to this pull request, it's only a bugfix for the provenance recording procedure. |
@bouweandela, fair enough. Could you merge the latest main to check the right tests? |
…venance-of-figures-in-recipe_spei.yml
Done |
Description
Several R diagnostic scripts made use of the
plot_file
attribute of the provenance entry of the NetCDF file to log provenance. Unfortunately, this does not work. This pull request fixes the problem by writing a separate provenance record for the plots.To pass the
lintr
checks, I also had to modify some variable names to follow the lowercase character/snake case convention from the R style guide and I needed an extra dependency to getlitnr
to run from pre-commit.Before you get started
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: