Skip to content
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

Automatically ignore and/or clean up kernel specifications in notebooks #16

Closed
jonathansick opened this issue Dec 14, 2021 · 2 comments
Closed

Comments

@jonathansick
Copy link
Contributor

There was an interesting issue that came up with astropy/astropy-tutorials#504. The issue is that a submitted notebook might have a Jupyter kernel specified that isn't available in the execution environment on GitHub Actions:

[nbcollection (ERROR)]: Notebook 'SpectralCubeReprojectExample.ipynb' errored: No such kernel named python39

I imagine this'll be fairly common, so we'd want a strategy for accomodating it:

  • Automatically strip kernel specifications on contribution to a tutorials repo?
  • Have nbcollection automatically ignore the kernel / replace it with one that's available when executing a notebook?
@adrn
Copy link
Member

adrn commented Dec 27, 2021

Yes, I agree this is important to fix I think the easiest solution would be to strip the kernel specifications for any tutorials in the repo. Can we do that with an nbstripout configuration?

@jonathansick
Copy link
Contributor Author

Right, handling this in the repo itself would solve it.

Adding it as a feature in nbcollection itself would be one less thing for implementors to worry about, on the other hand handling it in the notebook repo gives the implementor more control and the notebooks themselves, if downloaded by others, would already be in a "clean/normalized" state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants