-
Notifications
You must be signed in to change notification settings - Fork 46
Initial Cartopy work #24
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
Conversation
@ktyle, to fix the CI failure, add the following to the - sqlalchemy<1.4 |
@andersy005 Thanks ... yes, I ran into this problem when setting notebook execution to "cache" in my local environment, as mine is now using sqlalchemy 1.4.2. In its setup.py, jupyter-cache specifies sqlalchemy~=1.3.12. Based on my reading of version specifications, specifically compatible-release, I thought that the only problem would be if the major version (1) changed, but that seems to not be the case. |
🚀 📚 Preview for git commit SHA: f049a02 at: https://606298a027be9f46aaa5850b--pythia-foundations.netlify.app |
🚀 📚 Preview for git commit SHA: 1286c77 at: https://606325605020ac121a2f5779--pythia-foundations.netlify.app |
Awesome, it's up now and working! It will be great to discuss this content with the team at the EWG meeting this week. |
🚀 📚 Preview for git commit SHA: d1de2e9 at: https://60633ccf8170e500baebf3cc--pythia-foundations.netlify.app |
@dopplershift @andersy005 any tips on how to deal with the linting failures? |
Are you using the pre-commit hooks, as outlined on the README page? I'm not sure if these work on notebooks files. |
They do pythia-foundations/.pre-commit-config.yaml Lines 41 to 49 in fea4074
@ktyle, as @brian-rose pointed out, try following the steps in the README. If the |
@ktyle, you are right. The failure is due to the conda package which doesn't enforce this condition but uses |
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.
Looks great! Thanks @ktyle for putting this together.
Yeah, I should have read the README, who knew!! :) I have now built a local env using the prescribed pythia-book-dev environment. My CentOS 7 system has versions of git and apparently nodeJS that are incompatible with the pre-commit hooks; updating git has resolved most of them but it looks like I need a newer nodeJS as well ... hopefully I'll have this all working locally shortly! |
🚀 📚 Preview for git commit SHA: e85fff0 at: https://6063d557c4193f38a93c9064--pythia-foundations.netlify.app |
So the pre_commit linting step is failing, with a not-so-pretty error in the "prettier" pre_commit stage. I suspect it's the same error that occurred on my local development machine: `/nfs/kt11/ktyle/.cache/pre-commit/repoxzxoqnu3/node_env-system/lib/node_modules/prettier/bin-prettier.js:783 SyntaxError: Unexpected token * but upgrading NodeJS to 14.16.0 seemed to resolve it. What version of NodeJS is Github using? Or is there a way we can change the behavior of pre_commit so as to control what "prettier" does (looks like there is an .eslintignore file that one can specify files to ignore, a la .gitignore)? |
I think the default nodeJS version in GitHub action is
You can add a |
@andersy005 I installed a version 12 NodeJS on my local system but did not get the "prettier" error (my previous local failure was using a version 6 NodeJS). I'm unclear exactly what prettier's role is here ... I am assuming it is markdown related. I suppose a workaround to get the linting task to pass on Github would be to add an appropriate directory to .prettierignore (which I assume would be where my 01_Cartopy notebook is), but that would also seem to defeat the purpose of using prettier. |
Trying something out here. When I tried to commit locally, the pre-commit hooks were complaining like this:
After some digging, I added the line
to the Once this was in place, trying to commit resulted in changes to the import statements at the top of the notebook. With these changes staged, the commit then went smoothly on my local machine. |
... but that does not seem to have made the GitHub listing problems go away. |
🚀 📚 Preview for git commit SHA: effd5b2 at: https://606629871d2c5145a55bc610--pythia-foundations.netlify.app |
🚀 📚 Preview for git commit SHA: 8ac420b at: https://60662ddaf42fc34f12439333--pythia-foundations.netlify.app |
Wow, was prettier actually choking on the commented out lines in |
🚀 📚 Preview for git commit SHA: 9d79a81 at: https://60671b68c54c8daa4fbd17b1--pythia-foundations.netlify.app |
@brian-rose Looks that way! It wanted the # lines lined up to whatever stanza they were used in. Now I think I finally have the hang of all the workflow steps involved in pre-commit. |
For everyone's reference, I left an alternate version of this Cartopy content over in #26. Same content, different formatting in the source notebook. This might help folks see better how JupyterBook will render notebook content. |
This is awesome @ktyle . Nicely done! A few comments. Some of these are specific to this document, but others are more general and we might want to discuss as a group (or get more input here).
|
🚀 📚 Preview for git commit SHA: 1ebb709 at: https://607dcc63a324060092e8d998--pythia-foundations.netlify.app |
🚀 📚 Preview for git commit SHA: f6dab75 at: https://607e0eb353378900956c37c0--pythia-foundations.netlify.app |
@clyne I think I've addressed most of your comments above (not 3 or 4 yet, but I think these can be addressed once we have some Matplotlib content) with my latest push. |
I think I fixed a merge conflict on the |
🚀 📚 Preview for git commit SHA: 6109559 at: https://6080db01c20081195d395ca7--pythia-foundations.netlify.app |
Per our discussion at last week's EWG, we should merge this now unless there's other feedback. I think it would be great to merge just for stylistic comparison against all the new Unidata content discussed in #42 |
Thanks @brian-rose , yes, I think we should merge now! |
Ok, merging! Thanks @ktyle |
Created first Cartopy notebook and revised _config.yml and _toc.yml to reflect its addition.