Skip to content
Snippets Groups Projects

iPython notebook viewer

Merged Phil Hughes requested to merge ipython-notebook-viewer into master
All threads resolved!

What does this MR do?

Adds iPython notebook rendering with a Vue component (see the project https://gitlab.com/gitlab-org/notebooklab). All this code does it renders a different template for notebook files, fetches the raw JSON, parses the JSON and passes it into the Vue component.

It includes markdown rendering (without any GFM references) and syntax highlighting. The syntax highlighting uses our CSS to save anymore CSS being added in.

It is super simple at the moment and probably doesn't work with some more complex notebook files but this can be worked on in the NotebookLab component & then the version updated here when required.

The actual notebook code is tested in the notebooklab repo so the tests here just tests the notebook actually renders on the page rather than also checking how the notebook renders.

There is some simple error handling for when the file is either incorrect JSON or the request fails. I guess the plugin should handle render errors & then display an error there.

Screenshots (if relevant)

Screen_Shot_2017-03-23_at_17.31.09

Screen_Shot_2017-03-23_at_17.31.35

What are the relevant issue numbers?

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Grzegorz Bizon
  • @iamphill @jschatz1 It looks good to me! I left a one question, but it looks good enough as is! 👍

  • @iamphill I am going to merge to get this in and so we can find out what works and what doesn't and fix it one at a time.

  • Jacob Schatz resolved all discussions

    resolved all discussions

  • mentioned in issue #30190 (closed)

  • Jacob Schatz approved this merge request

    approved this merge request

  • Grzegorz Bizon approved this merge request

    approved this merge request

  • merged

  • mentioned in issue #24287 (closed)

  • Jacob Schatz mentioned in commit 47aeacd7

    mentioned in commit 47aeacd7

  • mentioned in issue #2508 (closed)

  • Grzegorz Bizon resolved all discussions

    resolved all discussions

  • Author Maintainer

    @grzesiek Yeah I think thats a good idea.

  • Hi, I have ipynb files in my repo but I see that none of them render on gitlab.com . Could you inform how to ensure ipynb files are rendered properly and not show the default json.

  • Author Maintainer

    @vmodi Hi, this will be in GitLab 9.1, so once that is released on the 22nd you will be able to see them (maybe before the 22nd depending when the RC is deployed)

  • @iamphill I guess it has partially landed and I am stoked to see it happening! :)

    There is a problem with inline LaTeX rendering though. When escaped with $$ it is rendered properly, but not inline $<some equation>$ (see screenshot below)

    Screenshot_from_2017-04-13_11-25-24

    Is this the correct place to leave this info or should I open a new issue? Or am I just doing something wrong?

    Edited by username-removed-90489
  • Author Maintainer

    @zabugr Thanks for feedback! If you could open a new issue so its easier for us to track that'd be great 👍

  • mentioned in issue #30900 (closed)

  • @iamphill done. I have also set up a project to test it out with a minimal setup that illustrates the issue. Details are in #30900 (closed)

  • Hi, I am still facing rendering issue with ipython files. Inline latex doesn't seem to render properly. Is there anyway to make that happen?

  • mentioned in merge request !8486 (closed)

  • mentioned in merge request !11419 (merged)

  • Please register or sign in to reply
    Loading