xgi-org / xgi

CompleX Group Interactions (XGI) is a Python package for higher-order networks.
https://xgi.readthedocs.io
Other
186 stars 30 forks source link

Organize/unify the drawing module #404

Closed nwlandry closed 1 year ago

nwlandry commented 1 year ago

At this point, we have lots of great functionality for drawing. The draw.py file is now ~1.5k lines! I'm wondering if we should

  1. Organize the functions (some are drawing utilities, some only draw nodes/edges, some draw the entire hypergraph)
  2. Unify the functions in some way (the most extreme example being that you have a single draw method with kwargs to change the style). I don't feel strongly about this, I just think it might be time to streamline this module.
leotrs commented 1 year ago

1.5k lines is too much for me to wrap my head around and I'm scared.

One thing to keep in mind is how to handle kwargs. All of these methods that just pass kwargs to some other call down the line tend to be very verbose and repetitive and bug-prone when doing things like if some_kwargs in kwargs: ....

iaciac commented 1 year ago

networkx has also 1.5k lines, just saying

maximelucas commented 1 year ago

Partially solved by #435

maximelucas commented 1 year ago

Since opening this issue, a lot changed in the drawing module:

In particular right now we have:

My feeling is that none of those can be easily merged or use each other more. If that's the case, should we close this issue? Or @nwlandry did you have more ideas to unify?

nwlandry commented 1 year ago

I think that we can close now. Thanks for taking care of all these issues!