Closed sadielbartholomew closed 2 weeks ago
Hi @sadielbartholomew!
Thank you, and thanks to Natalia as well for submitting this recipe. I've reviewed the Python script, and it's well-structured and clearly commented—great job! 🙌
Regarding your question, the additional files (plot_N_recipe_codeobj.pickle
, plot_N_recipe.ipynb
, and plot_N_recipe.rst
) are generated automatically as part of the build process. What I used to do is add all the necessary files after generating the HTML and then provide a link to the temporary deployment of the webpage for reviewers to preview (for an example, see PR #688).
[!NOTE]
Additionally, for each new recipe, you'll need to edit the docs/source/recipes/recipe_list.txt file to include the newly added recipe with its corresponding filters, as outlined in DOCUMENTATION.md.
With these considerations in mind, I believe this PR could be merged once other files are added/updated. Great work on preparing this recipe from Natalia's summer project!
Thanks Ankit for your prompt review. :slightly_smiling_face:
Additionally, for each new recipe, you'll need to edit the docs/source/recipes/recipe_list.txt file to include the newly added recipe with its corresponding filters, as outlined in DOCUMENTATION.md.
Aha, that makes sense - I was wondering where the filter keywords would be added. I think across the student recipes we can add some new ones too to reflect other topics/themes, but I will check in with you that you think they are suitable. Right-o, I shall get this done and re-commit, and do this for the other 4 PRs too.
Hi again @bewithankit, I've added this to the recipe_list.txt
now, including adding a new keyword 'subplot' and marking that for two other recipes which use subplots - let me know if you think this works. Natalia's second recipe (#819, to be updated shortly) also uses subplots as a major part of the recipe, so I thought it would be useful to add it in especially in light of that.
Regarding your question, the additional files (plot_N_recipe_codeobj.pickle, plot_N_recipe.ipynb, and plot_N_recipe.rst) are generated automatically as part of the build process. What I used to do is add all the necessary files after generating the HTML and then provide a link to the temporary deployment of the webpage for reviewers to preview (for an example, see PR https://github.com/NCAS-CMS/cf-python/pull/688).
Getting the environment required for Sphinx (echo 'ERROR: Must use sphinx version 2.4.5. Got 7.4.7'
etc.) is a bit of a pain, so let me suggest that I add all five recipes via PRs like this one, with the Python script and addition to the recipe_list.txt
, then I do a final PR where I add all of the built material from those five to the repo finally, show they show up on the site. That way, I don't have to get the Sphinx env set up and enabled each time, and all the source and built materials stay separate in PR terms. What do you think?
Given how busy Ankit is with his PhD we have agreed I can merge this without second review. At release time I will enact the plan I outlined above:
let me suggest that I add all five recipes via PRs like this one, with the Python script and addition to the recipe_list.txt, then I do a final PR where I add all of the built material from those five to the repo finally, show they show up on the site
So, merging, and there will eventually be a follow-on PR to get all the new recipes built and included.
This is the first of three recipes created this summer by our first summer student of two, Natalia. It has been prepared in the form consistent with the existing recipes.
I have only added the Python script - @bewithankit, I see four different files per recipe, is this one sufficient or do I need to generate the other three (
plot_N_recipe_codeobj.pickle
,plot_N_recipe.ipynb
andplot_N_recipe.rst
) from this for this PR, or can this be done at release time (or is the creation automatic from release r other procedures)? I will be adding the other five student-made recipes in the next few (working) days - all are in the same format as the canonical Python script.Given the nature of recipes, the script itself should be self-contained and self-explanatory. But for context, I will add that, given the summer placement was only two weeks including time for making a poster, there wasn't time to do a full feedback round, so I have included some commits to Natalia's final script to apply linting including line wrapping; simplification of some logic and comment wording; and notably to replace one projection, 'lcc', with another, 'merc', because there is a bug with the former (see NCAS-CMS/cf-plot#75) which breaks the script, so to avoid that bug.
Expected output
Note there is a cf-plot bug (yet another one, eek, NCAS-CMS/cf-plot#77) preventing us from disabling the axes for all plots, which would make everything consistent given some of the projections don't have default in-built axes labelling.