summaryrefslogtreecommitdiff
path: root/gnu/packages/graph.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/graph.scm')
-rw-r--r--gnu/packages/graph.scm86
1 files changed, 83 insertions, 3 deletions
diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm
index d2e4c875a1..c9486935ae 100644
--- a/gnu/packages/graph.scm
+++ b/gnu/packages/graph.scm
@@ -6,6 +6,8 @@
;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2020 Alexander Krotov <krotov@iitp.ru>
;;; Copyright © 2020 Pierre Langlois <pierre.langlos@gmx.com>
+;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2021 Alexandre Hannud Abdo <abdo@member.fsf.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -37,13 +39,18 @@
#:use-module (gnu packages autotools)
#:use-module (gnu packages bioconductor)
#:use-module (gnu packages bioinformatics)
+ #:use-module (gnu packages boost)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages cran)
+ #:use-module (gnu packages datastructures)
#:use-module (gnu packages gd)
+ #:use-module (gnu packages graphics)
#:use-module (gnu packages graphviz)
+ #:use-module (gnu packages gtk)
#:use-module (gnu packages maths)
#:use-module (gnu packages multiprecision)
+ #:use-module (gnu packages ncurses)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-science)
@@ -225,12 +232,30 @@ subplots, multiple-axes, polar charts, and bubble charts. ")
(arguments
'(#:tests? #f)))) ; The tests are not distributed in the release
-(define-public python2-plotly
- (package-with-python2 python-plotly-2.4.1))
-
(define-public python-louvain
(package
(name "python-louvain")
+ (version "0.15")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "python-louvain" version))
+ (sha256
+ (base32 "1sqp97fwh4asx0jr72x8hil8z8fcg2xq92jklmh2m599pvgnx19a"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-networkx" ,python-networkx)
+ ("python-numpy" ,python-numpy)))
+ (home-page "https://github.com/taynaud/python-louvain")
+ (synopsis "Louvain algorithm for community detection")
+ (description
+ "This package provides a pure Python implementation of the Louvain
+algorithm for community detection in large networks.")
+ (license license:bsd-3)))
+
+(define-public python-louvain-0.6
+ (package
+ (name "python-louvain")
(version "0.6.1")
;; The tarball on Pypi does not include the tests.
(source (origin
@@ -510,3 +535,58 @@ MSCs need not be complicated to create or use. Mscgen aims to provide a simple
text language that is clear to create, edit and understand, which can also be
transformed into common image formats for display or printing.")
(license license:gpl2+)))
+
+(define-public python-graph-tool
+ (package
+ (name "python-graph-tool")
+ (version "2.43")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://downloads.skewed.de/graph-tool/graph-tool-"
+ version ".tar.bz2"))
+ (sha256
+ (base32
+ "0v58in4rwk9fhjarjw6xfxpx5zz2z13sy3yvd14b5kr0884yw6sz"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:configure-flags
+ (list (string-append "--with-boost="
+ (assoc-ref %build-inputs "boost"))
+ (string-append "--with-python-module-path="
+ (assoc-ref %outputs "out")
+ "/lib/python"
+ ,(version-major+minor
+ (package-version
+ (car (assoc-ref
+ (package-inputs this-package)
+ "python"))))
+ "/site-packages/"))))
+ (native-inputs
+ `(("gcc-10" ,gcc-10)
+ ("ncurses" ,ncurses)
+ ("pkg-config" ,pkg-config)))
+ (inputs
+ `(("boost" ,boost)
+ ("cairomm" ,cairomm)
+ ("cgal" ,cgal)
+ ("expat" ,expat)
+ ("gmp" ,gmp)
+ ("gtk+" ,gtk+)
+ ("python" ,python-wrapper)
+ ("sparsehash" ,sparsehash)))
+ (propagated-inputs
+ `(("python-matplotlib" ,python-matplotlib)
+ ("python-numpy" ,python-numpy)
+ ("python-pycairo" ,python-pycairo)
+ ("python-scipy" ,python-scipy)))
+ (synopsis "Manipulate and analyze graphs with Python efficiently")
+ (description "Graph-tool is an efficient Python module for manipulation
+and statistical analysis of graphs (a.k.a. networks). Contrary to most other
+Python modules with similar functionality, the core data structures and
+algorithms are implemented in C++, making extensive use of template
+metaprogramming, based heavily on the Boost Graph Library. This confers it a
+level of performance that is comparable (both in memory usage and computation
+time) to that of a pure C/C++ library.")
+ (home-page "https://graph-tool.skewed.de/")
+ (license license:lgpl3+)))