Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 46,627
    • Issues 46,627
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,529
    • Merge requests 1,529
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #18258
Closed
Open
Issue created May 23, 2017 by Colum McCoole@mccoole

Use rich output for Jupyter notebooks

Problem to solve

Not all features of Jupyter notebooks display properly in GitLab

Proposal

Integrate the nbviewer.js library to GitLab to solve these rendering issues for good. Something like a w3 would be enough to assess.

Further Details

The linked notebook below is from a Github repo that the Jupyter team often use to demonstrate the latest capabilities. This Rich Output.ipynb file is therefore a good benchmark against which to measure the rendering capabilities of Jupyter Notebooks within Gitlab.

https://github.com/ipython/ipython-in-depth/blob/master/examples/IPython%20Kernel/Rich%20Output.ipynb http://nbviewer.jupyter.org/github/ipython/ipython-in-depth/blob/master/examples/IPython%20Kernel/Rich%20Output.ipynb

I've reproduced some screenshots of where things are broken. Gitlab is on the left, Github in the middle and nbviewer on the right. The rendering within Gitlab is generally good, and in some cases better than Github, but there are still a few glitches, namely:

  • Embedded images have problems rendering and when they do, they appear to show a clipped version of the original.

  • Latex rendering is not working at all.

  • Embedded web-page links are not working ... the nbviewer rendering on the right is correct

GitLab GitHub nbviewer
Embedded Images GL Embedded Images GH Embedded Images nbv
image image image
LaTeX GL LaTeX GH LaTeX nbv
image image image
Embedded webpage GL Embedded webpage GH Embedded webpage nbv
image image image

Release Notes

Jupyter notebooks are documents that contain live code, equations, visualizations, and narrative text. They are widely use for data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and more. They are capable of using "rich output" to show an object's rendered representation, such as HTML, JPEG, SVG, or LaTeX files. However, in order to take advantage of the rich output, users had to open the notebook inside Jupyter.

GitLab 13.8 now shows these files types with "rich output", showing you the rendered version of the file. This is an excellent way both to preview changes to your files as well as consume Jupyter notebook without ever having to leave GitLab.

mockup

Edited Dec 14, 2020 by Daniel Gruesso
Assignee
Assign to
Time tracking