-
Notifications
You must be signed in to change notification settings - Fork 54
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
Intro tutorial part2 #293
Intro tutorial part2 #293
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Awesome! Thanks for getting this going, Rachel. More complete review to follow, but just wanted to note that we're tracking the pruning issue you encountered in #279 and IIUC Ryan is planning to fix this next week. |
With this most recent commit the notes from the PR description have been addressed: chunksize and prunning consolidated metadata warning logging output engine error on run StatusI have no more todos on this PR and there are no outstanding questions. Ready for yes/no on merging. |
@@ -0,0 +1,1228 @@ | |||
{ |
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.
@@ -0,0 +1,1228 @@ | |||
{ |
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.
@@ -0,0 +1,1228 @@ | |||
{ |
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.
@@ -0,0 +1,1228 @@ | |||
{ |
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.
@rabernat thanks for the review, most comments are addressed. 3 of the comments which I left unresolved I interpreted as future actions. The last comment I left was about logging. It is really nice while working but in my opinion it doesn't render very nicely on the webpage. It takes up a lot of room and the lack of color coding makes it hard to follow. Let me know if I've missed anything. |
If pangeo-forge-recipes/pangeo_forge_recipes/recipes/__init__.py Lines 16 to 25 in 9783725
screenshots in #287 (comment) |
I would vote to include the 🎨 If the only remaining concern is vertical space, it looks like MyST supports collapsable outputs via the I believe this is an up-to-date explanation for how to add tags to cells: So I think:
then maybe MyST/Sphinx will just know what to do when the docs are built? |
I really like those ideas @cisaacstern , and thanks so much for finding instructions how to do it! I just pushed a commit that shows what the tutorial would look like with the |
Yes, I agree with the use of rich. Scratch that
This is not correct. Since the notebook is being executed locally and then committed to the repo with its content already filled, its outputs are generated purely in your local environment. So you should just have to have rich installed locally. It should not have to be added to the dev environment in order to see the colorful logs. I'm not sure why that isn't working here. Maybe a sphinx or myst-nb issue. Since merging #295 it looks like there is a merge conflict on |
Ah ok so it looks like the part 1 tutorial was simply removed in this PR. So it should be straightforward to resolve. You probably just want to revert commit 5b541f2. Hopefully it is as simple as |
That all makes sense @rabernat, thanks for explaining! I'll fix the merge conflicts and re-run the docs with |
FWIW, we can still add rich to |
Okay so rich I can't get going. I am happy with the way that the logs look with the dropdown, though, so I would be fine to move on without rich and circle back at another point. Merge conflicts are resolved. I think we are set here. Feel free to squash-merge or give me a 👍🏻 to do so. |
Final suggestion: For the "code summary" at the end, put all the code into a single cell. That way it can easily be copy-pasted as a block. Then feel free to self-merge. |
What has been built?
This PR address the second part of Issue #280. It builds on PR #281 by creating Part 2 of an updated Introduction Tutorial sequence. Part 2 focuses on Running a recipe locally.
How was it done?
introduction_tutorial
with the 1st part of the new tutorialindex.md
for the intro tutorials (1 more part to come)How can it be tested?
Clicking "Details" for the docs test that gets run by CI.
Notes
chunksize and prunning
In Part 1 of the recipe we told the user to use
XarrayZarrRecipe(pattern, inputs_per_chunk=10)
. Once the recipe gets pruned and run, though, it errors withAssertionError: invalid chunksize 10 and dimsize 2
. I can changeinputs_per_chunk
to 2 to stop this error, but I wanted to flag it in case others had better ideas. If the only use of pruned recipes is to run test chunks, it might be advantageous one day to allow pruned to skip over that error. On a shorter term basis, though, if anyone has different ideas from switching toinputs_per_chunk=2
I'm all about it.consolidated metadata warning
When running the recipe function (
recipe_pruned.to_function()()
) aRuntimeWarning: Failed to open Zarr store with consolidated metadata, falling back to try reading non-consolidated metadata.
warning appears. It's not the end of the world but if anyone knows what I could change to stop the warning that would be great.logging output
The logging output is quite long and my current opinion is that it disrupts the flow of the tutorial without much gain. To deal with this I commented out the # setup_logging() line. This looks awkward in it's own way, though, so I'm not sure which way to go here.
engine error on run
(Adding post docs-build)
running the recipe function (
recipe_pruned.to_function()()
) errors withValueError: unrecognized engine h5netcdf must be one of: ['netcdf4', 'store', 'zarr']
. You can see it here. I'm surprised this happens, since we run so many other recipes with the docs those libraries I would have thought have to be installed.cc @cisaacstern