dev-cap/MLCAT

non-structural (global) code in some modules

Closed this issue · 3 comments

Some modules have python code written outside of a function scope. The files having such code are:

lib/util/graph_leaf_nodes.py
lib/util/snaa_curve_fit_layout.py
lib/util/thread_graph_nx.py

How do we utilize this code? If the code is being used, how do we refactor the code to functions?

Yes, I came across a few modules written outside of a function scope when I was trying to automate document generation. Most of these are not being used currently and hence they haven't been refactored to be in function scope.

  • lib/util/graph_leaf_nodes.py: Identify leaf nodes in any tree graph. Not being used currently.
  • lib/util/snaa_curve_fit_layout.py: For generating a panel of graphs for SNAA. I felt this will be useful for future publications.
    lib/util/thread_graph_nx.py: This uses nx to save thread graphs to an image file. Only use case is to manually analyze networks.

We can just wrap everything around in a function, as the parameters are clearly present at the begiinning of each module.

Resolved in #63. Merge conflicts need to be sorted out.

Merge conflicts have been sorted out.