This is essentially a refactor of #74 to be more in line with the code style of the project and a few minor changes.
The whole process of auto configuring kernels as it currently stands involves the following steps:
Parsing the kernel name and language from the output of jupyter kernelspec list --json
Adding jupyter-<language> to org-src-lang-modes if not already present. In the case that <language> already exists in org-src-lang-modes use the corresponding mode for the language when adding jupyter-<language>.
Set org-babel-default-header-args:jupyter-<language> to a default value if not already set. The default consists of setting the :session and :kernel header args where the default :session is just "<language>".
Aliasing the org-babel functions for jupyter-<language> to the ipython versions that are currently implemented.
This is essentially a refactor of #74 to be more in line with the code style of the project and a few minor changes.
The whole process of auto configuring kernels as it currently stands involves the following steps:
jupyter kernelspec list --json
jupyter-<language>
toorg-src-lang-modes
if not already present. In the case that<language>
already exists inorg-src-lang-modes
use the corresponding mode for the language when addingjupyter-<language>
.org-babel-default-header-args:jupyter-<language>
to a default value if not already set. The default consists of setting the:session
and:kernel
header args where the default:session
is just"<language>"
.org-babel
functions forjupyter-<language>
to theipython
versions that are currently implemented.