Becksteinlab / kda

Python package used for the analysis of biochemical kinetic diagrams.
GNU General Public License v3.0
3 stars 1 forks source link

CI, BUG: Tests Failing on Python 3.9 #71

Closed nawtrey closed 11 months ago

nawtrey commented 11 months ago

Recent CI run failed on Python 3.9.

It appears there is an issue with test_kda.py::test_get_ordered_cycle_all_node_cycles (output pasted below) where a cycle is now considered ambiguous based on the original diagram.

FAILED kda/tests/test_kda.py::test_get_ordered_cycle_all_node_cycles - kda.exceptions.CycleError: Distinct ordered cycle could not be determined. Input diagram has multiple unique cycles that contain all nodes in the input cycle ([0, 4, 3, 2, 1]). To fix ambiguity, please input a cycle with the nodes in the correct orientation. Select one of the following possibilities: [[0, 1, 2, 3, 4], [0, 1, 2, 4, 3], [0, 1, 3, 2, 4], [0, 1, 3, 4, 2], [0, 1, 4, 2, 3], [0, 1, 4, 3, 2], [0, 2, 1, 3, 4], [0, 2, 1, 4, 3], [0, 2, 3, 1, 4], [0, 2, 4, 1, 3], [0, 3, 1, 2, 4], [0, 3, 2, 1, 4]]

I'm guessing this is due to a change in the NetworkX library. This should be fixed before addressing #70.

nawtrey commented 11 months ago

It appears changes were made to the nx.simple_cycles() function earlier this year which change the order of the returned node lists. It's not clear to me which changes had this effect, but it breaks the test cases for Python 3.9 (and likely 3.10) since they are hard-coded. I'll see if I can change which cycles run for these cases based on python version.