flow_stability icon indicating copy to clipboard operation
flow_stability copied to clipboard

wip on FlowStability instance

Open j-i-l opened this issue 9 months ago • 3 comments

j-i-l avatar Feb 17 '25 00:02 j-i-l

It might make sense to split up src/flowstab/flow_stability.py into a clustering and into a analysis management part. The sub-module is already quite large.

j-i-l avatar Feb 17 '25 00:02 j-i-l

Coverage report

Click to see where and how coverage changed
FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/flowstab
  flow_stability.py 72, 74, 76, 78, 80, 197, 271-275, 294, 412-417, 436-461, 473, 491-501, 513, 531-541, 558-601, 619-640
  helpers.py
  logger.py
  network_clustering.py 55-56, 97-124, 135, 150-157, 169-173, 189-192, 208-232, 243-244, 248, 262-275, 338-425, 449-457, 472-498, 519-521, 540, 574-607, 638-676, 682, 700-702, 712-812, 826-865, 871-885, 904-992, 996-1007, 1011, 1016, 1020, 1024, 1028-1029, 1033-1036, 1041-1043, 1048, 1103-1114, 1125-1128, 1139-1156, 1168-1185, 1199-1218, 1229-1331, 1339-1345, 1353, 1359, 1372-1405, 1408-1416, 1420, 1425, 1429, 1433, 1437, 1441, 1446, 1463-1477, 1536-1620, 1631, 1644-1647, 1658-1675, 1687-1698, 1712-1723, 1735-1747, 1751, 1809-1935, 1941-1958, 1971-2067, 2121-2149, 2158-2183, 2200-2256, 2270-2341, 2353-2373, 2415-2492, 2499, 2528-2549, 2556-2589
  parallel_clustering.py
  state_tracking.py 73, 78, 84, 134-142, 154-156, 368-373, 384-389
  temporal_network.py 161-174, 180, 1326, 1384, 1390, 1397, 1405-1410, 1430, 1443-1446, 1476, 1485, 1495, 1507, 1515-1520, 1552, 1564, 1589, 1621, 1626-1628, 1656-1657, 1682, 1690, 1710, 1717-1719, 1737-1738, 1749, 1760-1762, 1777, 1992, 2044-2045, 2100, 2311, 2326, 2333
  src/flowstab/scripts
  run_clusterings.py 59
  run_laplacians_transmats.py 42
Project Total  

This report was generated by python-coverage-comment-action

github-actions[bot] avatar Feb 17 '25 00:02 github-actions[bot]

We should provide a single method to preforms all the steps, up to find_luvain_clustering form FlowIntegralClustering.

A compact way of running an analysis would then look like this:

  • create a FlosStability instance
  • fully parametrize it (either setting each parameter individually or loading parameters from a json)
  • call flowstab.run(direction=1) (direction choices -1: backwards, 0: both, 1: forward)
  • done

In addition it should be possible to run each step individually or adapt some parameter and re-run only the affected parts.

j-i-l avatar May 11 '25 22:05 j-i-l

@alexbovet The interface class is functional and the documentation is adapted:

README.md

Then the docs:

quickstart

flowstab module

flow_stability sub-module

Should we merge this?

j-i-l avatar May 27 '25 15:05 j-i-l

Very nice! Thanks a lot. Could you add some info/doc on how a "my_contacts.csv" should be formatted?

alexbovet avatar May 28 '25 06:05 alexbovet