this post was submitted on 31 May 2026
14 points (100.0% liked)

programming

301 readers
14 users here now

  1. Post about programming, interesting repos, learning to program, etc. Let's try to keep free software posts in the c/libre comm unless the post is about the programming/is to the repo.

  2. Do not doxx yourself by posting a repo that is yours and in any way leads to your personally identifying information. Use reports if necessary to alert mods to a potential doxxing.

  3. Be kind, keep struggle sessions focused on the topic of programming.

founded 2 years ago
MODERATORS
 

I've been using a package called pyvis for a while to help visualize general graph data, but it's been pretty limited in terms of exposed API for vis.js (which is what it renders in) so I've been working on a more general full featured wrapper in Python that uses a fast graph library backend.

My test project is to visualize the repository as an interactive graph. It builds the html template in under a second right now and I'm planning on trying to make it something you can use to generate interactive repo graphs with.

It's still very WIP, but I think it's fun so I wanted to share.

Also, you can double click any node to have it open the source on GitHub. My goal is to make it host agnostic so you can just slap a repo url in there and it'll generate a graph with properly formatted links. I've got all the components exposed though, so you can manipulate how the link is generated as needed.

you are viewing a single comment's thread
view the rest of the comments
[–] invalidusernamelol@hexbear.net 5 points 1 week ago* (last edited 1 week ago)

If you want to try it out for yourself, just make sure you have Python 3.10+ installed and rustworkx (I'm probably gonna update it to allow networkx or no graph library backend at some point).

The dev directory has a testing script that you can use, I have a branch I'm working on now that makes it simpler and will probably set it up so it can be run from the command line with some flags/config files.

I've pointed it at a lot of bigger projects and it hasn't taken more than 2 seconds, even for something like curl and cpython. The client side rendering in visjs is essentially dead once you cross ~600 nodes though, so I'll probably have to start pre-computing node positions instead of just letting them all start at the origin.

Would love to get some feedback on it though!

Also any contributions are welcome, just open a PR. Only rule I have is that everything has to be fully typed since it's a new project and I prefer to have typing implemented early instead of relying on discovering types later lol.