- 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 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-python-louvain?expand=0&rev=18
This commit is contained in:
13
fix-test-karate.patch
Normal file
13
fix-test-karate.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
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(
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2a856edfbe29952a60a5538a84bb78cca18f6884a88b9325e85a11c8dd4917eb
|
||||
size 204601
|
||||
3
python-louvain-0.16.tar.gz
Normal file
3
python-louvain-0.16.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b7ba2df5002fd28d3ee789a49532baad11fe648e4f2117cf0798e7520a1da56b
|
||||
size 204641
|
||||
@@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 14 09:09:53 UTC 2022 - Daniel Garcia <daniel.garcia@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
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 23 05:57:36 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
|
||||
@@ -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 @@ Guillaume, Renaud Lambiotte, Renaud Lefebvre, Journal of
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user