This project does not have any active maintainers. We recommend that you use nteract, a native notebook application built using Electron, React (like this project), Redux, and RxJS, or Hydrogen, a LightTable-inspired package for Atom that allows users to run code blocks and selections using Jupyter kernels.
A package that works like the Jupyter Notebook, but inside Atom. It's registered as an opener for .ipynb
files — try opening one!
Install dependencies:
brew install python3
(there are issues with pip2 and OS X 10.11)pip3 install jupyter jupyter_kernel_gateway
sudo apt-get install python python-pip
pip install jupyter jupyter_kernel_gateway
apm install jupyter-notebook
or search for jupyter-notebook inside of Atom
git clone https://github.com/jupyter/atom-notebook.git
apm install
apm link
This package is built on React and the Flux architecture.
NotebookEditor
and registers as an Opener for .ipynb
filesRendering: NotebookEditor -> NotebookEditorView -> [child views]
Updating: [external action] -> Dispatcher.dispatch -> NotebookEditor.onAction ?-> NotebookEditor._onChange -> NotebookEditorView._onChange
The state returned by NotebookEditor.getState
is an Immutable.js
object.
Accessing its properties inside a view looks like this:
let executionCount = this.props.data.get('execution_count');
Changing it (in NotebookEditor) looks like this:
this.state = this.state.setIn(
['cells', cellIndex, 'source'],
payload.source);
or this:
outputs = outputs.push(el.outerHTML);
Since React requires a view's state to be a regular JS object, the state of NotebookEditorView takes the form:
{
data: <Immutable object>
}
No other views have state.
atom.workspace.getActiveTextEditor()
returns undefined
because atom.workspace.getActivePaneItem()
returns our custom NotebookEditor class which contains one or more TextEditors, therefore autocomplete, find, and features provided by other packages don't work in cells