Skip to content

Conversation

mmcky
Copy link
Contributor

@mmcky mmcky commented Mar 14, 2025

This PR looks to fix compatibility with google collab new julia option.

This updates the generated download notebooks with julia kernel name rather than julia-1.11 which is version specific.

see #330

@mmcky mmcky mentioned this pull request Mar 14, 2025
Copy link

github-actions bot commented Mar 14, 2025

@github-actions github-actions bot temporarily deployed to pull request March 14, 2025 22:29 Inactive
@github-actions github-actions bot temporarily deployed to pull request April 24, 2025 04:31 Inactive
@jlperla
Copy link
Member

jlperla commented May 7, 2025

Hey @mmcky I wasn't sure how to test this correctly. Note that the julia kernel shows up in the _config.yml but also at the top of each of the myst files. They look like:

---
jupytext:
  text_representation:
    extension: .md
    format_name: myst
kernelspec:
  display_name: Julia
  language: julia
  name: julia-1.11
---

Things seem to execute here though. Maybe what ends up happening is that the embedded kernel is used for the myst execution, but the generated notebooks are left with the more general naming from the config?

I downloaded one of the notebooks from the netlify output here and the relevant stuff in the ipynb is

 "metadata": {
  "date": 1745469061.0018864,
  "filename": "julia_by_example.md",
  "kernelspec": {
   "display_name": "Julia",
   "language": "julia",
   "name": "julia"
  },
  "title": "Introductory Examples"
 },
 "nbformat": 4,
 "nbformat_minor": 5
}

So this seems to match the change to just julia. When I open this in VS Code's ipynb editor, or in jupyterlab, I think you need ot manually choose the kernel. That might be confusing.

But for all of that, it seems like there may be a tradeoff here. If you leave the kernelname as julia-1.11 then I think that the jupyter/jupyterhub/etc. will correctly open it when you run (without having to manually change the kernel type whenever you open the file).

With colab is it that when choosing julia it automatically opens without manual selection of the kernel? But if you put up the current notebooks with juila-1.11 does it just force you to select the runtimt type? If so, maybe that is preferrred since there are more users of jupyterlab/VS Code than there are of colab?

@mmcky
Copy link
Contributor Author

mmcky commented May 8, 2025

thanks @jlperla

So this seems to match the change to just julia. When I open this in VS Code's ipynb editor, or in jupyterlab, I think you need ot manually choose the kernel. That might be confusing.

Oh that is a downside. I thought using Julia would select the latest kernel version. I think that's how the python side works. Thanks for letting me know @jlperla.

Happy for you to make the call on this tradeoff. Please feel free to close when you're ready.

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

Successfully merging this pull request may close these issues.

2 participants