question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for ipycytoscape

See original GitHub issue

Bug report for Colab: http://colab.research.google.com/. Related to #60.

  • Describe the expected behavior: I’d love to use ipycytoscape to work with network graphs in Colab. I’m able to install it without a problem, but when I try to display a network graph, nothing shows up. Reminiscent of trying to display a HoloViews plot without having run hv.extension('bokeh') in the cell.

  • The web browser you are using (Chrome, Firefox, Safari, etc.): Chrome 84.0.4147.135

  • Link (not screenshot!) to a minimal, public, self-contained notebook that reproduces this issue (click the Share button, then Get Shareable Link):

Here’s a self-contained example from their website (you can find it and others here). After running the last line I would expect to see a network graph, but nothing shows up.

!pip install ipycytoscape
from ipycytoscape import *
import pandas as pd

df = pd.read_csv("https://raw.githubusercontent.com/nextstrain/ncov/fe5a7ed1f92af63d6d1d43d0307e4b2620108aaa/data/metadata.tsv", sep = '\t')
df.columns

cytoscapeobj = CytoscapeWidget()
cytoscapeobj.set_tooltip_source('name')
cytoscapeobj.graph.add_graph_from_df(df[:30], ['country'], ['age', 'virus'])
cytoscapeobj

They provide some installation tips here that might be helpful, including how to run tests locally.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

0reactions
bloiscommented, Mar 30, 2021

To be clear- the goal has been to not have proprietary APIs but instead to work towards a common stable API that works in more environments.

If you try to install a different version of the package that is incompatible with the frontend assets

In our context there are no frontend assets at all. Aside from the minimal public API visualizations need to include all of their dependencies.

What I’m basically saying above is essentially a widget manager who’s API to the host is limited to just something along the lines of https://github.com/Quansight-Labs/jupyter-output-spec, then either loading that before the custom widget (initiated by user code), or just bundling that with the custom widget in a standalone binary which would have to be >800K.

In my view the widget manager and widget are tightly coupled due to the significant API surface area of widgets and their requirement of a common build tool (when using webpack’s module federation), thus they should be distributed together. Colab already uses a widget manager per cell execution using browser broadcast channels to coordinate, I don’t think it would be impossible to do a widget manager per widget? Then just include some esbuild created binary of the standalone binary in the widget cookie cutter and be free of the versioning issues? (I’m sure I’m oversimplifying here). We had hoped 1) to get consensus on the stable APIs necessary to support this so it could be used by other hosts and 2) to have a more minimal API to remove that large binary size.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ipycytoscape — ipycytoscape 1.3.2 documentation
Visualize graphs using Cytoscape.js in a Jupyter Notebook. You can either create graphs using the ipycytoscape API or create them from: NetworkX. JSON....
Read more >
ipycytoscape: Documentation | Openbase
A widget enabling interactive graph visualization with cytoscape.js in JupyterLab and the Jupyter notebook. Try it out using binder: Binder or install and...
Read more >
Learning and visualising Graphs with ipycytoscape (part 1)
This article is for total beginners in graph theory and graph visualization in python. This article's goal is making accessible and ...
Read more >
Network customization using ipycytoscape - Stack Overflow
To be able to visualize the labels, you will need to add the node attributes to your networkx graph and set the appropriate...
Read more >
Ipycytoscape: A Cytoscape Jupyter Widget - Python - Morioh
Ipycytoscape : A widget enabling interactive graph visualization with cytoscape.js ... Because microservice architecture is a service-oriented architecture ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found