vtraag / leidenalg

Implementation of the Leiden algorithm for various quality functions to be used with igraph in Python.
GNU General Public License v3.0
596 stars 78 forks source link

Fix optimise_partition_multiplex() kwargs inconsistency #42

Closed ragibson closed 4 years ago

ragibson commented 4 years ago

This fixes https://github.com/vtraag/leidenalg/issues/41.

In fa3fa0b8060362ec188b576a24357d97cb216de1, @iosonofabio added a fixed_nodes keyword argument to optimise_partition_multiplex before the n_iterations argument. This PR changes the ordering of these two arguments to be consistent with optimise_partition.

That is, it fixes the argument ordering inconsistency between https://github.com/vtraag/leidenalg/blob/5bdff65c446faccda9c996cc11b57965ba3ff222/src/Optimiser.py#L232 https://github.com/vtraag/leidenalg/blob/5bdff65c446faccda9c996cc11b57965ba3ff222/src/Optimiser.py#L290

Some of the Python code depended on the old ordering, for example https://github.com/vtraag/leidenalg/blob/5bdff65c446faccda9c996cc11b57965ba3ff222/src/functions.py#L161 so in the current version n_iterations gets passed in as fixed_nodes, which causes the crash in https://github.com/vtraag/leidenalg/issues/41.

ragibson commented 4 years ago

Once again, the CI failures do not seem real. They fail with

downloading mingw64.db...
downloading mingw64.db.sig...
error: mingw64: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
error: failed to update mingw64 (invalid or corrupted database (PGP signature))
downloading msys.db...
downloading msys.db.sig...
error: msys: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
error: failed to update msys (invalid or corrupted database (PGP signature))
error: failed to synchronize all databases

so they should be rerun once this is fixed.