From: Joseph LaFreniere <joseph@lafreniere.xyz>
To: 43912@debbugs.gnu.org
Subject: [bug#43912] [PATCH] gnu: Add python-grandalf.
Date: Sat, 10 Oct 2020 11:57:21 -0500 [thread overview]
Message-ID: <87362mt3wu.fsf@odyssey.lafreniere.xyz> (raw)
[-- Attachment #1: Type: text/plain, Size: 46 bytes --]
Patch file is attached.
--
Joseph LaFreniere
[-- Attachment #2: 0001-gnu-Add-python-grandalf.patch --]
[-- Type: text/x-patch, Size: 3105 bytes --]
From 4275d4429b84f7b338dfef6299cf0e5a2072fe40 Mon Sep 17 00:00:00 2001
From: Joseph LaFreniere <joseph@lafreniere.xyz>
Date: Sat, 10 Oct 2020 11:56:02 -0500
Subject: [PATCH] gnu: Add python-grandalf.
* gnu/packages/python-xyz.scm (python-grandalf): New variable.
---
gnu/packages/python-xyz.scm | 54 +++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0670eb7e08..08ecaa791f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -6036,6 +6036,60 @@ memoizing PEG/Packrat parser in Python.")
(define-public python2-grako
(package-with-python2 python-grako))
+(define-public python-grandalf
+ (package
+ (name "python-grandalf")
+ (version "0.7")
+ (source
+ (origin
+ ;; There's no source tarball on PyPI.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/bdcht/grandalf")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (invoke "python" "setup.py" "pytest"))))))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)
+ ("python-pytest-runner" ,python-pytest-runner)))
+ (propagated-inputs
+ `(("python-numpy" ,python-numpy)
+ ("python-ply" ,python-ply)))
+ (home-page "https://github.com/bdcht/grandalf")
+ (synopsis "Graph and drawing algorithms framework")
+ (description
+ "Grandalf is a Python package made for experimentations with graphs
+drawing algorithms. It is written in pure Python, and currently implements
+two layouts: the Sugiyama hierarchical layout and the force-driven or energy
+minimization approach. While not as fast or featured as graphviz or other
+libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
+than thousands of nodes, while keeping the source code simple enough to tweak
+and hack any part of it for experimental purpose. With a total of about 1500
+lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
+in less than 600 lines. The energy minimization approach is comprised of only
+250 lines!
+
+Grandalf does only 2 not-so-simple things:
+@itemize
+@item computing the nodes (x,y) coordinates (based on provided nodes
+dimensions, and a chosen layout)
+@item routing the edges with lines or nurbs
+@end itemize
+
+It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
+will help you find where to draw things like nodes and edges, but it’s up to
+you to actually draw things with your favorite toolkit.")
+ (license (list license:gpl2 license:epl1.0))))
+
(define-public python-gridmap
(package
(name "python-gridmap")
--
2.28.0
next reply other threads:[~2020-10-10 16:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-10 16:57 Joseph LaFreniere [this message]
2020-10-18 21:27 ` bug#43912: [PATCH] gnu: Add python-grandalf Marius Bakke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87362mt3wu.fsf@odyssey.lafreniere.xyz \
--to=joseph@lafreniere.xyz \
--cc=43912@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).