jcrozum / biobalm

The biologist's Boolean attractor landscape mapper, building Waddington landscapes from Boolean networks.
https://jcrozum.github.io/biobalm/
MIT License
2 stars 0 forks source link

Simplify `SuccessionDiagram` API #93

Open jcrozum opened 10 months ago

jcrozum commented 10 months ago

While building the docs, I noticed that the SuccessionDiagram API could be simplified in a few ways:

  1. We have various node attributes that could be grouped into a separate object, e.g., sd.node_is_expanded should be sd.node.is_expanded.
  2. Several of the from_xxx(s) methods could be grouped into one function, e.g., from_string(s, format=xxx).
  3. The various expansion methods could be aggregated into one with an method argument.
jcrozum commented 10 months ago

One more thing to note about this class is that there is a circular import issue, and there are some troubles importing the class from the top level. We should rename SuccessionDiagram.py to succession_diagram.py and move the SuccessionDiagram import in the SCC expansion to within the function call (or even better, come up with a good way to avoid needing the import at all).

jcrozum commented 9 months ago

Note #106 addresses points 1 & 2 above, but not 3.