Enable rich rendering of Jupyter notebooks (BB-12986)

Issue #11318 resolved
Nathan Goldbaum
created an issue

Github now supports rich rendering of jupyter notebooks:

https://github.com/blog/1995-github-jupyter-notebooks-3

It would be great if Bitbucket did as well. Jupyter notebooks are increasingly used as a format for documentation, sharing computations, and reproducible data science in general.

Official response

  • Thomas Kells staff

    Bitbucket dev here,

    Just wanted to let everyone know that I have created a fileview addon for bitbucket that does exactly this. It is deployed to our internal PaaS so it even works on private notebooks.

    To install the addon, click your avatar in the lower left corner and select "App Marketplace". You can now search for "Bitbucket Notebook Viewer" in the addon listings. Once you have installed the addon you will get the option to render as a notebook on any file with the extension ".ipynb".

    If you have any issues/feedback/feature requests for the plugin, please submit them as issues to the repository here - https://bitbucket.org/bitbucket/bitbucket-nbviewer/issues.

    Thanks,

    TJ

Comments (114)

  1. Thomas Kluyver

    I work on Jupyter - if there are any questions about how to make this happen, I can help you find the answers (I won't necessarily know the answers, but I'll probably have a good idea who does).

  2. Youri Nelson

    Ivote for it too, it would be fantastic! One of the reason we are still hesitating on porting over to github so we can read the jupyter notebook straight from the repo.

  3. Boon Jin Tek

    +1 Jupyter notebook has become the main part of my workday now... It would be extremely useful to have bitbucket able to render jupyter notebooks the way github does.

  4. marshall_245

    +1 this has been noticeably absent from Atlassian's Bitbucket product offering. Code comments are taking place in the raw text during code review. This makes notebook collaboration challenging.

  5. Hiroshi Yamamoto

    +1 from a group of sad pandas. Just taught my colleague engineer how to use Jupyter Notebook, only to find our projects are hosted on BitBucket which doesn't support ipynb format!

  6. bluemarblesoft

    I add my vote. Having discovered to my chagrin yesterday that Jupyter notebook rendering is not supported, after a lapse in their use for a while, my enthusiasm for BitBucket abruptly dimmed.

    Message to BitBucket: you are going to lose users back to GitHub if you don't get notebook rendering working!

  7. bluemarblesoft

    Is the hold-up here because of a concern for server-side CPU load? Does nbconvert place too much of a burden when processing multi-Mb notebooks?

    Or is it because of a perceived complexity with maintaining support Jupyter for nb rendering? Perhaps there is a perception that Jupyter notebook rendering is a niche concern?

    Some update from the gurus here would be nice, since this issue was first raised two years ago. Please make a decision at your end and either act on resolving the issue or tell us that it will not be fulfilled. Then we can move on. [In my case, I have already switched back to GitHub for the time being]

  8. Boon Jin Tek

    I wonder is anyone from Atlassian reading this ticket? Also, I was trying to check the priority of other issues, apparently, all are set to "Minor" ... hmmm...

    Any response from the devs would be great! Hello??

  9. Nathan Goldbaum reporter

    I mentioned this earlier but no one has taken me up on it. It would likely not be that hard to write a bitbucket connect add-on to do this. Anyone (including those commenting in this thread) can write and run a connect add-on.

  10. cstarkjp

    Atlassian bosses: please pay attention to this thread, upgrade the issue to "major" (not all major issues are fires that need to be put out yesterday...), and fix the problem. The lack of progress in two years speaks volumes.

  11. Thomas Kluyver

    It doesn't appear that Atlassian bosses are reading this issue, so the storm of +1s and increasingly grumpy messages here are probably not achieving anything.

    You may find it easier to make the case if someone took up Nathan's suggestion of making an add-on to do it. Then you'd just be asking them to enable a popular (hopefully!) add-on by default.

    Here are some resources for Bitbucket add-ons:

    And an example for rendering files:

    If you need info on the Jupyter side of things, come and talk to us on our mailing list or via Github issues.

  12. dlrb

    +1 -- We used to be able to do this with GitHub - and really miss this feature. Our DEV team uses this extensively - and now we feel handicapped.

  13. BlackArbsCEO

    After seeing this thread, I decided it was better to just pay up for privacy on github because rendering notebooks is that important to my workflow. I'm migrating all my projects immediately.

  14. Thomas Kells staff

    Bitbucket dev here,

    Just wanted to let everyone know that I have created a fileview addon for bitbucket that does exactly this. It is deployed to our internal PaaS so it even works on private notebooks.

    To install the addon, click your avatar in the lower left corner and select "App Marketplace". You can now search for "Bitbucket Notebook Viewer" in the addon listings. Once you have installed the addon you will get the option to render as a notebook on any file with the extension ".ipynb".

    If you have any issues/feedback/feature requests for the plugin, please submit them as issues to the repository here - https://bitbucket.org/bitbucket/bitbucket-nbviewer/issues.

    Thanks,

    TJ

  15. Edson Tadeu M. Manoel

    We're trying that unsupported hkruitbosch/bitbucket-ipynb-plugin plugin in our Bitbucket Server, but it is not very good... it can only render less than half of the notebooks... many of them render just as a blank page. Also, it's LaTeX/MathJax support seems to be defective, equations are being displayed as raw LaTeX.

    @Thomas Kells: +1 for adding the full support for this on Bitbucket Server

  16. Sandeep Srinivasa

    this is very important for us as well. it is a huge huge pain to not be able to do this. my team is forcing me to consider a move to github. we cannot install plugins that come with this caveat

    |  This 3rd party vendor has not provided a privacy policy or terms of use. Atlassian's Privacy Policy is not applicable to the use of this App.
    |  You are adding Ipython Notebook FileView to the XXXX Bitbucket account. Ipython Notebook FileView will have access to:Read your repositories
    
  17. Thomas Kells staff

    @Sandeep Srinivasa Would there be an acceptable privacy policy for that addon that would make it installable for your company? Technically the addon is not actually third party, it was written in-house and runs on Atlassian's private infrastructure so there is another potential avenue where we flag this as a first-party addon.

    EDIT: I went ahead and flagged the addon as being an official Atlassian addon. The scary "3rd party vendor" warning should be gone now.

  18. Arun Rangarajan

    @Thomas Kells I don't understand what you mean by repository browser. If I open a link to my notebook file with a browser, say like <URL>/src/master/code/test.ipynb it displays raw JSON like this: { "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, ...

    This is even after installing the plugin.

    It would be helpful if you tell where "option to render as a notebook" is.

    Thx.

  19. Thomas Kells staff

    @Arun Rangarajan Make sure you have the addon installed for the user/team that owns the repository. For instance, if I (tj_kells) install the addon for myself, it won't show up on the various repos that I have admin access to, but do not own - ie https://bitbucket.org/bitbucket/bitbucket-nbviewer. In order for that repository to be able to render notebooks, I would need to install the addon for the bitbucket team.

    Once that is done, there should be a dropdown in the upper right corner of your file that says "Default File Viewer". You simply select "Ipython Notebook" instead and the rich notebook will be rendered.

  20. Thomas Kells staff

    @Carisa Leal In a recent updated we added some functionality to aggressively strip HTML tags as we had reports of XSS exploits related to this addon. We moved aggressively as having open XSS vulnerabilities is time sensitive, but now that the hole is plugged we could probably look at adding back a subset of safe tags (I imagine table would be one of them). Would you mind opening an issue in this repo? https://bitbucket.org/bitbucket/bitbucket-nbviewer

  21. Jeroen Van Goey

    The pinned official response states "click your avatar in the lower left corner and select Integrations." This has apparently changed. Now you have to click your avatar in the lower left corner and select "App Marketplace". There, search for "Notebook Viewer" and click "Add". Then go to your repository and select your *.ipynb file. On the top right of your code, click the dropdown next to "Default file viewer" and select "Ipython Notebook".

  22. Log in to comment