Is it OK to edit kernel specs by hand?

I wrote some instructions for our JupyterHub deployment (GitHub - educational-technology-collective/etc_simple_jupyterhub_deployment). I found that it was easiest to explain how to get the kernel specs right by editing them directly as opposed to using the ipykernel module.

Is it generally considered OK to edit the kernel.json files by hand? I’m not sure if ipykernel may do anything else other than install the kernel specs when it is invoked for that purpose.

I’m not an expert in the realm of kernel specs, but I would say this is fine.

The “standardisation” of the Jupyter ecosystem is such that many different tools can co-exist using specified configuration files such as kernelspecs. It stands to reason that hand-crafting them is perfectly reasonable.

The only issue is if a particular tool expects to take ownership over these files, e.g. if it maintained a log of kernelspecs that it had installed. However, I’ve never encountered such a tool - many kernel implementations have an install option for kernelspecs, and don’t touch them after this point. ipykernel is one such tool; once installed, kernelspecs are no longer modified (unless they’re removed, of course).

1 Like