I've been collecting data from Nim packages and created a list of links to PlantUML with packages dependencies visualizations.
Some examples:
My data isn't 100% accurate, but I'm still working on it.
Looks very cool! Have you thought about sharing recursive dependencies instead of duplicating them?
eg for amysql, unicodedb is a dependency of segmentation, unicodeplus and regex, so it's shown 3 times instead of 1 time with 3 links
The graph may look a bit messier, but may be more representative
Nice!
As maintainers of lots of Nim packages, for us it's also often interesting to know the reverse dependencies - ie given a package like chronos, what depends on it?
If there is interest for this I could add and direct dependency listing to https://nimble.directory/
I'm concerned about the increasing fragmentation of dependencies in the Nim ecosystem leading to low stability and high churn.
Would people be interested in a dependency health gauge to be displayed on each package on the package directory?
This should be built into nimble.directory! Would be great to see a PlantUML link on every package's page.
Nexus doesn't use many dependencies, most seem related to Chronicles: http://www.plantuml.com/plantuml/uml/TP5B5e8m34NdhgBZ3bq1E_54Y5eeAJP1mDNRZnwXwAWlpKrUcbOiuAKtrFGm7BGYd4S-QArQP44Vb5R02zNYdEKKtaI6Cm9BZ8giMg2tyRoFfkxQAJAg0mzpAcsS83sId18E_khe65LzyuvCRJ6RIB0VnMHBhKOo4g-EATcoenEZDs3D4yGuobIOU7ghNRBeiQQrkeJNi7Y4FlljwJN-7jPzsBoIxxG_wxSTYY2iqpFR_zN5FhP8XU7tyW_I2m==
It is updated but sums all versions
https://github.com/riinr/flake-crown/tree/flake-pinning/nimpkgs/c/choosenim
Now only with deps from Master & Main & Dev
Nice work ! The digraphs makes it much more clear.
I am not sure about a health bar, I don't want to flag packages with a red bar, just because they do complex stuff and need a lot of dependencies. A dependency counter, with maybe even a counter of the number of dependencies which status is passing (for github CI actions) would be top.
If there is an easy way to include a link to a dependency graph in our README.md, that could be nice too!
import zlib
import base64
import string
plantuml_alphabet = string.digits + string.ascii_uppercase + string.ascii_lowercase + '-_'
base64_alphabet = string.ascii_uppercase + string.ascii_lowercase + string.digits + '+/'
b64_to_plantuml = bytes.maketrans(base64_alphabet.encode('utf-8'), plantuml_alphabet.encode('utf-8'))
plantuml_url = 'http://www.plantuml.com/plantuml/uml/'
def encode_url(graph_code):
compressed = zlib.compress(graph_code.encode('utf-8'))
hashed = base64.b64encode(compressed[2:-4]).translate(b64_to_plantuml).decode('utf-8')
return plantuml_url + hashed