When I send an interrupt, this is what I get. Perhaps it will help:
Traceback (most recent call last):
File "/Users/user/sources/project_____________/hasse.py", line 68, in <module>
plot_hasse(matrix, keys)
File "/Users/user/sources/project_____________/venv/lib/python3.12/site-packages/hassediagram/hasse_diagram.py", line 67, in plot_hasse
data, labels_dict, ranks = _hasse_matrix(data, labels, transitive_reduction)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/sources/project_____________/venv/lib/python3.12/site-packages/hassediagram/hasse_diagram.py", line 39, in _hasse_matrix
data, labels_dict = _find_and_merge_cycles(data, labels_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/sources/project_____________/venv/lib/python3.12/site-packages/hassediagram/cycles.py", line 25, in _find_and_merge_cycles
all_cycles = list(nx.simple_cycles(G))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/sources/project_____________/venv/lib/python3.12/site-packages/networkx/algorithms/cycles.py", line 235, in simple_cycles
yield from _directed_cycle_search(G, length_bound)
File "/Users/user/sources/project_____________/venv/lib/python3.12/site-packages/networkx/algorithms/cycles.py", line 282, in _directed_cycle_search
yield from _johnson_cycle_search(Gc, [v])
File "/Users/user/sources/project_____________/venv/lib/python3.12/site-packages/networkx/algorithms/cycles.py", line 406, in _johnson_cycle_search
u = unblock_stack.pop()
^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt
This code hangs. Could there be an infinite loop somewhere? (Edit: eventually the memory usage grows until the OS kills the process)
When I send an interrupt, this is what I get. Perhaps it will help: