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

Aeon 1.0 #94

Closed daemontus closed 9 months ago

daemontus commented 9 months ago

This PR migrates balm to the version 1.0 of biodivine_aeon. As part of the migration, several major changes are introduced:

Other miscellaneous changes:

petri_net_translation.xlsx bfs_full_expansion.xlsx attractors_scc_expansion.xlsx

github-actions[bot] commented 9 months ago

Coverage

Coverage Report
FileStmtsMissCoverMissing
balm
   SuccessionDiagram.py2114280%6, 126–133, 139–146, 159, 166, 173, 181, 184, 190–221, 308, 448–450, 456, 582
   control.py1231489%48, 57, 61, 67, 81, 90–106, 329, 332, 345
   interaction_graph_utils.py54591%6–8, 47, 165–166
   motif_avoidant.py152299%24, 120
   petri_net_translation.py1171091%17–19, 49, 85, 133–134, 158–159, 168, 272
   space_utils.py129497%24–26, 251, 277
   symbolic_utils.py26388%10–12, 44
   trappist_core.py1872686%10–12, 40, 42, 82, 128, 193, 195, 197, 232–234, 254–260, 318, 320, 350, 390, 392, 423, 452
balm/_sd_algorithms
   compute_attractor_seeds.py30197%8
   expand_attractor_seeds.py51590%6, 42, 95–100
   expand_bfs.py28196%6
   expand_dfs.py30197%6
   expand_minimal_spaces.py37295%6, 31
   expand_source_SCCs.py163597%20, 90, 100, 142, 285
   expand_to_target.py31390%6, 38, 43
TOTAL139812491% 

Tests Skipped Failures Errors Time
363 0 :zzz: 0 :x: 0 :fire: 48.723s :stopwatch:
jcrozum commented 9 months ago

This is great! While you're overhauling the SCC expansion, watch out for the import cycle. Maybe with the new approach, there will be a nicer way to resolve it. Basically, the SuccessionDiagram.py needs to import the methods in expand_source_SCC.py file to get the expansion method for the SuccessionDiagram class, but those methods construct a new SuccessionDiagram. This is causing problems for the automatic documentation. My solution on that branch was to import the SuccessionDiagram class from within the expansion methods at runtime, but hopefully there is a better way. On slightly a related note, we should rename the files to conform to PEP8 standars (all files should be written_like_this.py).

jcrozum commented 9 months ago

I just pushed some formatting changes to this PR. We should probably add black to our CI pipeline. I also added a # type: ignore to a type error that I got locally but which our CI seemed to miss for some reason.

daemontus commented 9 months ago

Ok, I don't know what happened exactly, maybe I screwed up something during testing (I was experimenting with the percolation when I did the preliminary tests for SCC expansion), but the latest commit is actually faster on SCC expansion than the original version, roughly in line with the improvements we got for the "full" expansion. So I guess that issue is closed.

Furthermore, I tested control: Anything that was able to finish under 10 minutes on the new version was slower on the older version. So I think we should be fine in terms of performance.

I'll be merging this, and we can solve the rest as we go.