nteract / hydrogen

:atom: Run code interactively, inspect data, and plot. All the power of Jupyter kernels, inside your favorite text editor.
https://nteract.gitbooks.io/hydrogen/
MIT License
3.93k stars 333 forks source link

Support jupyter notebook files #75

Closed rawlik closed 5 years ago

rawlik commented 9 years ago

I wonder if it would be unreasonable for hydrogen to support jupyter notebook files. It would be infinitely awesome to combine the elegance of notebook files with their ability to store output with the power of atom editor.

The basic thing needed would be to display cells and allow to add, split and delete them.

Input cells would be treated as normal code.

Hydrogen is already able to display the output cells, including media types. In a notebook file, though, it would probably be better to display them in between the code lines.

The markdown cells would not need to be compiled, at least at the beginning. Still, there should be some way to mark a cell as markdown type.

It could look somehow like this:

atom_hydrogen_notebook
willwhitney commented 9 years ago

This is a possibility down the line. Either Atom would need to support inline content or Hydrogen would need to have a complete internal "notebook view" implemented with multiple input and output sections (something like how watch expressions are now). Stay tuned!

ahnj commented 9 years ago

+1

mangecoeur commented 9 years ago

I have also been looking at this - in the past I worked on an IPython desktop version (https://github.com/mangecoeur/ipython-desktop) which aimed to wrap the notebook view in a relatively primitive way. Some design questions I struggled with include:

I've asked around and got conflicting advice as to how much notebook-specific intelligence is in the notebook server - which impacts whether it makes more sense to proxy the interface - either as an iframe or through some internal mechanism, e.g. fetching rendered notebook html from within the plugin, transforming it and inserting it into the Atom view.

I personally think re-implemening the view alone might be reasonable and much more powerful if the serverside functionality can be made available through APIs (not depending on rendering of server side templates which seems to happen at the moment). Not sure how widgets would work.

I would love to see a notebook editor that used Atom TextEditors and so inherit all the text-editing superpowers as well as keybindings etc and gets rid of the extraneous browser chrome. Definitely up for contributing!

willwhitney commented 9 years ago

Just so everyone knows, I’m working on a package that does this ( https://github.com/willwhitney/jupyter-notebook-atom) and once the view works well I’ll refactor it into Hydrogen!

On Fri, Jul 24, 2015 at 9:45 AM mangecoeur notifications@github.com wrote:

I have also been looking at this - in the past I worked on an IPython desktop version (https://github.com/mangecoeur/ipython-desktop) which aimed to wrap the notebook view in a relatively primitive way. Some design questions I struggled with include:

  • Do you build Jupyter into the plugin and only require Kernals to be installed, or do you require separate installs of both Jupyter and Kernals?
  • Do you re-implement the Notebook interface, or simply proxy it into Atom
  • Do you want to support advanced features like interactive widgets? Do you mind re-implementing them?
  • How much would you want to modify Jupyter itself to achieve this. Do you want to simply proxy whatever installation people happen have (my original idea in IPython desktop, but ultimately limiting), or have something that will require a version with your upstream patches.

I've asked around and got conflicting advice as to how much notebook-specific intelligence is in the notebook server - which impacts whether it makes more sense to proxy the interface - either as an iframe or through some internal mechanism, e.g. fetching rendered notebook html from within the plugin, transforming it and inserting it into the Atom view.

I personally think re-implemening the view alone might be reasonable and much more powerful if the serverside functionality can be made available through APIs (not depending on rendering of server side templates which seems to happen at the moment). Not sure how widgets would work.

I would love to see a notebook editor that used Atom TextEditors and so inherit all the text-editing superpowers as well as keybindings etc and gets rid of the extraneous browser chrome. Definitely up for contributing!

— Reply to this email directly or view it on GitHub https://github.com/willwhitney/hydrogen/issues/75#issuecomment-124526025 .

fbrundu commented 7 years ago

Any updates on this? Or focus has shifted to nteract? I love nteract and atom but I would prefer one editor to do both things (code and notebooks).

lgeiger commented 7 years ago

There is nobody actively working towards supporting notebook files in Hydrogen since focus on that end has mostly shifted towards nteract.

That said if you or somebody else are interested in implementing notebook support we're really happy to include this in Hydrogen. We have exported a lot of nteract components as npm packages which can be used as the building blocks for this feature.

kylebarron commented 5 years ago

Closing as fixed in https://github.com/nteract/hydrogen/pull/1501