From f4e6de70a2418a3f4962633568f087946820f9ea Mon Sep 17 00:00:00 2001 From: "J. Forde" Date: Fri, 3 Aug 2018 13:06:52 -0700 Subject: [PATCH 1/6] initial kernel content for user guide --- content/concepts/intro_kernels.md | 13 +++++++ content/user-guides/using_kernels.md | 52 ++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 content/concepts/intro_kernels.md create mode 100644 content/user-guides/using_kernels.md diff --git a/content/concepts/intro_kernels.md b/content/concepts/intro_kernels.md new file mode 100644 index 0000000..eafaebc --- /dev/null +++ b/content/concepts/intro_kernels.md @@ -0,0 +1,13 @@ +# Introducing Kernels + + Kernels are tools to run code. Kernels receive messages from the front end that contain a user's code and execute the code. The kernel then sends messages that contain the result of the executed code back to the front end. Messages are formatted as JSONs and sent using [ZeroMQ](http://zguide.zeromq.org/page:all#ZeroMQ-in-a-Hundred-Words). + +![](http://ipython.readthedocs.io/en/stable/_images/other_kernels.png) + + + IPython provides wrappers to execute code that + have been used to develop kernels across [over 100 languages](https://github.com/jupyter/jupyter/wiki/Jupyter-kernels). Notable examples of community-developed kernels include [xeus for C++](https://github.com/QuantStack/xeus-cling), [IJavascript](https://github.com/n-riesco/ijavascript), [IHaskell](https://github.com/gibiansky/IHaskell), [Igo](https://github.com/yunabe/lgo), [IJulia](https://github.com/JuliaLang/IJulia.jl), [IRKernel](https://github.com/IRkernel/IRkernel), [BeakerX for JVM languages](https://github.com/twosigma/beakerx), and [Calysto for Octave](https://github.com/Calysto/octave_kernel). + + To learn more about creating your own Jupyter Kernel, you may learn more at [Making Kernels for Jupyter](http://jupyter-client.readthedocs.io/en/latest/kernels.html). An simple example kernel + is at [dsblank/simple_kernel](https://github.com/dsblank/simple_kernel) on GitHub. + If you do create a new kernel, [please add it to our list of kernels](https://github.com/jupyter/jupyter/wiki/Jupyter-kernels)! diff --git a/content/user-guides/using_kernels.md b/content/user-guides/using_kernels.md new file mode 100644 index 0000000..10e7d27 --- /dev/null +++ b/content/user-guides/using_kernels.md @@ -0,0 +1,52 @@ +# Using Kernels + +Kernels are installed either by installing the kernel directly or adding the +kernel with [ipykernel](https://github.com/ipython/ipykernel). Many [community-developed](https://github.com/jupyter/jupyter/wiki/Jupyter-kernels) kernels will include installation instructions in their README.md. Kernels are managed with ipykernel. + +To install ipykernel with pip call: + +``` +pip install ipykernel +``` + +or with conda + +``` +conda install ipykernel +``` + +To see what kernels you have already installed: + +``` +jupyter kernelspec list +``` + +Python environments are manually added through ipykernel. To add a Python +environment, ipykernel must be installed in the environment. To add a kernel +with ipykernel that is made with a configuration file, e.g. `requirements.txt` +or `environment.yml`, you will need to install ipykernel into the environment +and install the kernel while the environment is activated. + + +Using pip: + +``` +python -m pip install ipykernel virtualenv +python -m ipykernel install +python -m virtualenv myenv +source myenv/bin/activate +pip install ipykernel +pip install -r requirements.txt +python -m ipykernel install --user --name myenv --display-name "Python (myenv)" +``` + +Using conda: + +``` +conda install ipykernel +python -m ipykernel install +conda env create -f environment.yml +source activate myenv +conda install ipykernel +python -m ipykernel install --user --name myenv --display-name "Python (myenv)" +``` From 93b05f6413c5057d51077649c8d6b1567deac24e Mon Sep 17 00:00:00 2001 From: "J. Forde" Date: Fri, 3 Aug 2018 13:25:31 -0700 Subject: [PATCH 2/6] nteract cant use beakerx --- content/concepts/intro_kernels.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/concepts/intro_kernels.md b/content/concepts/intro_kernels.md index eafaebc..db8c251 100644 --- a/content/concepts/intro_kernels.md +++ b/content/concepts/intro_kernels.md @@ -6,7 +6,7 @@ IPython provides wrappers to execute code that - have been used to develop kernels across [over 100 languages](https://github.com/jupyter/jupyter/wiki/Jupyter-kernels). Notable examples of community-developed kernels include [xeus for C++](https://github.com/QuantStack/xeus-cling), [IJavascript](https://github.com/n-riesco/ijavascript), [IHaskell](https://github.com/gibiansky/IHaskell), [Igo](https://github.com/yunabe/lgo), [IJulia](https://github.com/JuliaLang/IJulia.jl), [IRKernel](https://github.com/IRkernel/IRkernel), [BeakerX for JVM languages](https://github.com/twosigma/beakerx), and [Calysto for Octave](https://github.com/Calysto/octave_kernel). + have been used to develop kernels across [over 100 languages](https://github.com/jupyter/jupyter/wiki/Jupyter-kernels). Notable examples of community-developed kernels include [xeus for C++](https://github.com/QuantStack/xeus-cling), [IJavascript](https://github.com/n-riesco/ijavascript), [IHaskell](https://github.com/gibiansky/IHaskell), [Igo](https://github.com/yunabe/lgo), [IJulia](https://github.com/JuliaLang/IJulia.jl), [IRKernel](https://github.com/IRkernel/IRkernel), and [Calysto for Octave](https://github.com/Calysto/octave_kernel). To learn more about creating your own Jupyter Kernel, you may learn more at [Making Kernels for Jupyter](http://jupyter-client.readthedocs.io/en/latest/kernels.html). An simple example kernel is at [dsblank/simple_kernel](https://github.com/dsblank/simple_kernel) on GitHub. From c99e990157441be719ff77b09fec8e8b05853180 Mon Sep 17 00:00:00 2001 From: "J. Forde" Date: Fri, 3 Aug 2018 13:44:41 -0700 Subject: [PATCH 3/6] moving files to fit new structure --- {content/concepts => docs}/intro_kernels.md | 0 {content/user-guides => docs}/using_kernels.md | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {content/concepts => docs}/intro_kernels.md (100%) rename {content/user-guides => docs}/using_kernels.md (100%) diff --git a/content/concepts/intro_kernels.md b/docs/intro_kernels.md similarity index 100% rename from content/concepts/intro_kernels.md rename to docs/intro_kernels.md diff --git a/content/user-guides/using_kernels.md b/docs/using_kernels.md similarity index 100% rename from content/user-guides/using_kernels.md rename to docs/using_kernels.md From 272daae44d9072a8436ba8cba69cba77ce61fb73 Mon Sep 17 00:00:00 2001 From: "J. Forde" Date: Fri, 3 Aug 2018 13:47:27 -0700 Subject: [PATCH 4/6] added metadata --- docs/intro_kernels.md | 6 ++++++ docs/using_kernels.md | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/intro_kernels.md b/docs/intro_kernels.md index db8c251..96d39bb 100644 --- a/docs/intro_kernels.md +++ b/docs/intro_kernels.md @@ -1,3 +1,9 @@ +--- +id: intro-kernels +title: Introducing Kernels +--- + + # Introducing Kernels Kernels are tools to run code. Kernels receive messages from the front end that contain a user's code and execute the code. The kernel then sends messages that contain the result of the executed code back to the front end. Messages are formatted as JSONs and sent using [ZeroMQ](http://zguide.zeromq.org/page:all#ZeroMQ-in-a-Hundred-Words). diff --git a/docs/using_kernels.md b/docs/using_kernels.md index 10e7d27..9fa358b 100644 --- a/docs/using_kernels.md +++ b/docs/using_kernels.md @@ -1,3 +1,8 @@ +--- +id: using-kernels +title: Using Kernels +--- + # Using Kernels Kernels are installed either by installing the kernel directly or adding the @@ -25,7 +30,7 @@ Python environments are manually added through ipykernel. To add a Python environment, ipykernel must be installed in the environment. To add a kernel with ipykernel that is made with a configuration file, e.g. `requirements.txt` or `environment.yml`, you will need to install ipykernel into the environment -and install the kernel while the environment is activated. +and install the kernel while the environment is activated. Using pip: From fe091cb676280a1aec093e63f7cbf4fe4a41bcb7 Mon Sep 17 00:00:00 2001 From: "J. Forde" Date: Fri, 3 Aug 2018 13:49:10 -0700 Subject: [PATCH 5/6] updated sidebar for new kernels files --- website/sidebars.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/sidebars.json b/website/sidebars.json index 7362a32..a325150 100644 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -7,7 +7,8 @@ "components-nteract" ], "Concepts": [ - "concepts" + "intro-kernels", + "using-kernels" ], "Contributing": [ "design-software", @@ -16,4 +17,4 @@ "docs-deploy" ] } -} \ No newline at end of file +} From ac90178b66f4e0e6dcdf7eed5e57eb1519d243d5 Mon Sep 17 00:00:00 2001 From: "J. Forde" Date: Fri, 3 Aug 2018 13:49:32 -0700 Subject: [PATCH 6/6] removed placeholder file for concepts --- docs/concepts.md | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 docs/concepts.md diff --git a/docs/concepts.md b/docs/concepts.md deleted file mode 100644 index 3541d41..0000000 --- a/docs/concepts.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -id: concepts -title: Concepts ---- - -Concepts placeholder