Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-python-louvain for openSUSE:Factory checked in at 2022-10-14 15:42:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-python-louvain (Old) and /work/SRC/openSUSE:Factory/.python-python-louvain.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-louvain" Fri Oct 14 15:42:55 2022 rev:7 rq:1010639 version:0.16 Changes: -------- --- /work/SRC/openSUSE:Factory/python-python-louvain/python-python-louvain.changes 2021-04-24 23:10:00.227466980 +0200 +++ /work/SRC/openSUSE:Factory/.python-python-louvain.new.2275/python-python-louvain.changes 2022-10-14 15:44:07.856077867 +0200 @@ -1,0 +2,13 @@ +Fri Oct 14 09:09:53 UTC 2022 - Daniel Garcia <daniel.gar...@suse.com> + +- Update to 0.16: + * Fix #86. When computing the change in modularity after alternating the + block membership of a node, the resolution parameter was multiplied to the + wrong term. + As a result, the current code fails to correctly implement the Louvain + algorithm, except for the special case when the resolution parameter is set + to one. +- Add fix-test-karate.patch to fix tests with networkx<=2.7 + gh#taynaud/python-louvain#95 + +------------------------------------------------------------------- Old: ---- python-louvain-0.15.tar.gz New: ---- fix-test-karate.patch python-louvain-0.16.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-python-louvain.spec ++++++ --- /var/tmp/diff_new_pack.rSiv76/_old 2022-10-14 15:44:08.352078695 +0200 +++ /var/tmp/diff_new_pack.rSiv76/_new 2022-10-14 15:44:08.356078701 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-python-louvain # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,12 +20,14 @@ %define skip_python2 1 %define skip_python36 1 Name: python-python-louvain -Version: 0.15 +Version: 0.16 Release: 0 Summary: Louvain algorithm for community detection License: BSD-3-Clause URL: https://github.com/taynaud/python-louvain Source0: https://files.pythonhosted.org/packages/source/p/python-louvain/python-louvain-%{version}.tar.gz +# PATCH-FIX-UPSTREAM fix-test-karate.patch gh#taynaud/python-louvain#95 +Patch: fix-test-karate.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module numpy} BuildRequires: %{python_module setuptools} @@ -50,7 +52,7 @@ Statistical Mechanics: Theory and Experiment 2008(10), P10008 (12pp) %prep -%setup -q -n python-louvain-%{version} +%autosetup -p1 -n python-louvain-%{version} sed -i -e '/^#!\//, 1d' community/__init__.py %build ++++++ fix-test-karate.patch ++++++ Index: python-louvain-0.16/test_community.py =================================================================== --- python-louvain-0.16.orig/test_community.py +++ python-louvain-0.16/test_community.py @@ -203,7 +203,7 @@ class BestPartitionTest(unittest.TestCas self.assertAlmostEqual(co.modularity(part, graph), co.modularity(part_weight, graph, - "test_weight"), places=2) + "test_weight"), places=1) part_res_low = co.best_partition(graph, resolution=0.1) self.assertTrue( ++++++ python-louvain-0.15.tar.gz -> python-louvain-0.16.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-louvain-0.15/PKG-INFO new/python-louvain-0.16/PKG-INFO --- old/python-louvain-0.15/PKG-INFO 2020-12-27 16:27:04.887950700 +0100 +++ new/python-louvain-0.16/PKG-INFO 2022-01-29 16:53:00.890964000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: python-louvain -Version: 0.15 +Version: 0.16 Summary: Louvain algorithm for community detection Home-page: https://github.com/taynaud/python-louvain Author: Thomas Aynaud diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-louvain-0.15/README.rst new/python-louvain-0.16/README.rst --- old/python-louvain-0.15/README.rst 2020-12-27 16:17:46.000000000 +0100 +++ new/python-louvain-0.16/README.rst 2022-01-29 16:18:01.000000000 +0100 @@ -37,7 +37,7 @@ .. code-block:: python - import community as community_louvain + from community import community_louvain import matplotlib.cm as cm import matplotlib.pyplot as plt import networkx as nx diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-louvain-0.15/community/__init__.py new/python-louvain-0.16/community/__init__.py --- old/python-louvain-0.15/community/__init__.py 2020-12-27 16:18:16.000000000 +0100 +++ new/python-louvain-0.16/community/__init__.py 2022-01-29 16:35:56.000000000 +0100 @@ -15,7 +15,7 @@ load_binary, ) -__version__ = "0.15" +__version__ = "0.16" __author__ = """Thomas Aynaud (thomas.ayn...@lip6.fr)""" # Copyright (C) 2009 by # Thomas Aynaud <thomas.ayn...@lip6.fr> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-louvain-0.15/community/community_louvain.py new/python-louvain-0.16/community/community_louvain.py --- old/python-louvain-0.15/community/community_louvain.py 2020-12-27 16:17:46.000000000 +0100 +++ new/python-louvain-0.16/community/community_louvain.py 2022-01-29 16:18:01.000000000 +0100 @@ -203,7 +203,7 @@ Raises ------ NetworkXError - If the graph is not Eulerian. + If the graph is not undirected. See Also -------- @@ -241,7 +241,7 @@ >>> pos = nx.spring_layout(G) >>> # color the nodes according to their partition >>> cmap = cm.get_cmap('viridis', max(partition.values()) + 1) - >>> nx.draw_networkx_nodes(G, pos, partition.keys(), node_size=40, + >>> nx.draw_networkx_nodes(G, pos, partition.keys(), node_size=40, >>> cmap=cmap, node_color=list(partition.values())) >>> nx.draw_networkx_edges(G, pos, alpha=0.5) >>> plt.show() @@ -484,15 +484,15 @@ com_node = status.node2com[node] degc_totw = status.gdegrees.get(node, 0.) / (status.total_weight * 2.) # NOQA neigh_communities = __neighcom(node, graph, status, weight_key) - remove_cost = - resolution * neigh_communities.get(com_node,0) + \ - (status.degrees.get(com_node, 0.) - status.gdegrees.get(node, 0.)) * degc_totw + remove_cost = - neigh_communities.get(com_node,0) + \ + resolution * (status.degrees.get(com_node, 0.) - status.gdegrees.get(node, 0.)) * degc_totw __remove(node, com_node, neigh_communities.get(com_node, 0.), status) best_com = com_node best_increase = 0 for com, dnc in __randomize(neigh_communities.items(), random_state): - incr = remove_cost + resolution * dnc - \ - status.degrees.get(com, 0.) * degc_totw + incr = remove_cost + dnc - \ + resolution * status.degrees.get(com, 0.) * degc_totw if incr > best_increase: best_increase = incr best_com = com diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-louvain-0.15/docs/index.rst new/python-louvain-0.16/docs/index.rst --- old/python-louvain-0.15/docs/index.rst 2020-12-27 16:20:24.000000000 +0100 +++ new/python-louvain-0.16/docs/index.rst 2022-01-29 16:37:05.000000000 +0100 @@ -69,9 +69,6 @@ #first compute the best partition partition = community_louvain.best_partition(G) - # compute the best partition - partition = community_louvain.best_partition(G) - # draw the graph pos = nx.spring_layout(G) # color the nodes according to their partition @@ -87,6 +84,7 @@ Changelog : =========== +* 2020-12-27 : 0.16, Fix when using the resolution parameter. Doc fixes * 2020-12-27 : 0.15, Stop relabelling stable partitions, tests on power, doc fixes * 2020-04-06 : 0.14, bugfixes (on resolution parameter), optimization on random state * 2018-12-21 : 0.13, better random state, some files missing included, communities always in 0..N-1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-louvain-0.15/docs/release new/python-louvain-0.16/docs/release --- old/python-louvain-0.15/docs/release 2020-04-06 14:38:06.000000000 +0200 +++ new/python-louvain-0.16/docs/release 2022-01-29 16:21:03.000000000 +0100 @@ -5,4 +5,5 @@ * Run tests locally * Commit, push and wait for travis tests to pass * Check docs are updated +* Add a git tag * python setup.py sdist upload # To improve to use the new methods diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-louvain-0.15/python_louvain.egg-info/PKG-INFO new/python-louvain-0.16/python_louvain.egg-info/PKG-INFO --- old/python-louvain-0.15/python_louvain.egg-info/PKG-INFO 2020-12-27 16:27:04.000000000 +0100 +++ new/python-louvain-0.16/python_louvain.egg-info/PKG-INFO 2022-01-29 16:53:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: python-louvain -Version: 0.15 +Version: 0.16 Summary: Louvain algorithm for community detection Home-page: https://github.com/taynaud/python-louvain Author: Thomas Aynaud diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-louvain-0.15/setup.py new/python-louvain-0.16/setup.py --- old/python-louvain-0.15/setup.py 2020-12-27 16:18:27.000000000 +0100 +++ new/python-louvain-0.16/setup.py 2022-01-29 16:35:44.000000000 +0100 @@ -2,7 +2,7 @@ setup( name="python-louvain", - version="0.15", + version="0.16", author="Thomas Aynaud", author_email="tayn...@gmail.com", description="Louvain algorithm for community detection",