Skip to content

Conversation

Praveer1981
Copy link
Contributor

Description of the Change

  1. The Louvain and Leiden algorithms now incorporate weight as an input parameter. Therefore, the documentation has been revised accordingly.
  2. Further in the process, the Louvain algorithm invokes the community_louvain.best_partition function which has an optional parameter partition, So it is important to pass the optional parameter partition directly through the Louvain algorithm.

@GiulioRossetti
Copy link
Owner

@Praveer1981 thanks for the PR.

Could you please integrate it with a dedicated unit test (extending the ones in https://github.com/GiulioRossetti/cdlib/blob/master/cdlib/test/test_community_discovery_models.py) to be sure that the introduction of the parameter does not break the method invocation?

@Praveer1981
Copy link
Contributor Author

@Praveer1981 thanks for the PR.

Could you please integrate it with a dedicated unit test (extending the ones in https://github.com/GiulioRossetti/cdlib/blob/master/cdlib/test/test_community_discovery_models.py) to be sure that the introduction of the parameter does not break the method invocation?

@GiulioRossetti Thanks for your response. I was expecting that as soon as I create a PR, it should automatically start running all the existing test cases.But, unfortunately, this is not the case in this environment.
I am sure that for this change, no new test case needs to be written; we already have a test case
test_louvain
We are passing the option parameter partition to the Louvain function, which internally calls best_partition and forwards the partition parameter to it.

@Praveer1981
Copy link
Contributor Author

@Praveer1981 thanks for the PR.
Could you please integrate it with a dedicated unit test (extending the ones in https://github.com/GiulioRossetti/cdlib/blob/master/cdlib/test/test_community_discovery_models.py) to be sure that the introduction of the parameter does not break the method invocation?

@GiulioRossetti Thanks for your response. I was expecting that as soon as I create a PR, it should automatically start running all the existing test cases.But, unfortunately, this is not the case in this environment. I am sure that for this change, no new test case needs to be written; we already have a test case test_louvain We are passing the option parameter partition to the Louvain function, which internally calls best_partition and forwards the partition parameter to it.

Hi @GiulioRossetti Any thought on it ?

@GiulioRossetti
Copy link
Owner

@Praveer1981 Sorry, I'll take a look into it as soon as I can - I haven't had the time yet.

The existing tests will not fail for sure; however, it would be a good practice to test if the additional parameter does not break the expected behavior.

The GitHub actions that execute the tests are run only when the maintainer approves them; they are not invoked in an automated fashion for external PR.

@Praveer1981
Copy link
Contributor Author

@GiulioRossetti Thanks for your response.

@Praveer1981
Copy link
Contributor Author

Hi @GiulioRossetti This PR has been hanging for quite a while now. I am sure that this change is useful. But if you think that the user of the Louvain API is not going to benefit from it, then we can just close it.

@GiulioRossetti GiulioRossetti merged commit d46a542 into GiulioRossetti:master May 13, 2024
@GiulioRossetti
Copy link
Owner

Sorry for coming back to this pull request after such a long time.
I merged it now in master: however, there where some issues due to the non way the partition parameter was passed (format conversion and homogeneity with the library community representation).

Best,
Giulio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants