all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#50836] [PATCH 0/5] Python logic programming packages
@ 2021-09-27  2:17 Ryan Prior via Guix-patches via
  2021-09-27  2:20 ` [bug#50836] [PATCH 1/5] gnu: Add python-multipledispatch Ryan Prior via Guix-patches via
  2021-11-15 13:42 ` bug#50836: [PATCH 0/5] Python logic programming packages Ludovic Courtès
  0 siblings, 2 replies; 8+ messages in thread
From: Ryan Prior via Guix-patches via @ 2021-09-27  2:17 UTC (permalink / raw)
  To: 50836

Hi Guix! Here's a series of patches for software I use for logic programming in Python.

Ryan Prior (5):
  gnu: Add python-multipledispatch.
  gnu: Add python-logical-unification.
  gnu: Add python-cons.
  gnu: Add python-etuples.
  gnu: Add python-minikanren.

 gnu/packages/python-xyz.scm | 139 ++++++++++++++++++++++++++++++++++++
 1 file changed, 139 insertions(+)

--
2.33.0






^ permalink raw reply	[flat|nested] 8+ messages in thread

* [bug#50836] [PATCH 1/5] gnu: Add python-multipledispatch.
  2021-09-27  2:17 [bug#50836] [PATCH 0/5] Python logic programming packages Ryan Prior via Guix-patches via
@ 2021-09-27  2:20 ` Ryan Prior via Guix-patches via
  2021-09-27  2:20   ` [bug#50836] [PATCH 2/5] gnu: Add python-logical-unification Ryan Prior via Guix-patches via
                     ` (4 more replies)
  2021-11-15 13:42 ` bug#50836: [PATCH 0/5] Python logic programming packages Ludovic Courtès
  1 sibling, 5 replies; 8+ messages in thread
From: Ryan Prior via Guix-patches via @ 2021-09-27  2:20 UTC (permalink / raw)
  To: 50836

* gnu/packages/python-xyz.scm (python-multipledispatch): New variable.
---
 gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a34c444a87..c833c95b5a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26584,6 +26584,26 @@ objects in the combined source, and how they define or use each other.  The
 graph can be output for rendering by GraphViz or yEd.")
     (license license:gpl2)))

+(define-public python-multipledispatch
+  (package
+    (name "python-multipledispatch")
+    (version "0.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "multipledispatch" version))
+       (sha256
+        (base32
+         "1slblghfjg9fdi9zpd7gmrkvfbv20nrdgnrymcnbky8bzm8i9ax7"))))
+    (build-system python-build-system)
+    (propagated-inputs `(("six" ,python-six)))
+    (home-page
+     "http://github.com/mrocklin/multipledispatch/")
+    (synopsis "Multiple dispatch for Python based on pattern matching")
+    (description "This library provides an efficient mechanism for overloading
+function implementations based on the types of the arguments.")
+    (license license:bsd-3)))
+
 (define-public date2name
   (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
         (revision "1"))
--
2.33.0






^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#50836] [PATCH 2/5] gnu: Add python-logical-unification.
  2021-09-27  2:20 ` [bug#50836] [PATCH 1/5] gnu: Add python-multipledispatch Ryan Prior via Guix-patches via
@ 2021-09-27  2:20   ` Ryan Prior via Guix-patches via
  2021-09-27  2:20   ` [bug#50836] [PATCH 3/5] gnu: Add python-cons Ryan Prior via Guix-patches via
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Ryan Prior via Guix-patches via @ 2021-09-27  2:20 UTC (permalink / raw)
  To: 50836

gnu/packages/python-xyz.scm (python-logical-unification): New variable.
---
 gnu/packages/python-xyz.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c833c95b5a..bc5ab67e6b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26604,6 +26604,28 @@ graph can be output for rendering by GraphViz or yEd.")
 function implementations based on the types of the arguments.")
     (license license:bsd-3)))

+(define-public python-logical-unification
+  (package
+    (name "python-logical-unification")
+    (version "0.4.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "logical-unification" version))
+       (sha256
+        (base32
+         "0j57953hi7kg2rl0163vzjzsvzdyjimnklhx6idf5vaqqf1d3p1j"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("multipledispatch" ,python-multipledispatch)
+       ("toolz" ,python-toolz)))
+    (home-page
+     "http://github.com/pythological/unification/")
+    (synopsis "Logical unification in Python for solving symbolic expressions")
+    (description "This library provides algorithms and data types for solving
+symbolic expressions in pure Python using the technique of logical unification.")
+    (license license:bsd-3)))
+
 (define-public date2name
   (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
         (revision "1"))
--
2.33.0






^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#50836] [PATCH 3/5] gnu: Add python-cons.
  2021-09-27  2:20 ` [bug#50836] [PATCH 1/5] gnu: Add python-multipledispatch Ryan Prior via Guix-patches via
  2021-09-27  2:20   ` [bug#50836] [PATCH 2/5] gnu: Add python-logical-unification Ryan Prior via Guix-patches via
@ 2021-09-27  2:20   ` Ryan Prior via Guix-patches via
  2021-09-27  2:20   ` [bug#50836] [PATCH 4/5] gnu: Add python-etuples Ryan Prior via Guix-patches via
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Ryan Prior via Guix-patches via @ 2021-09-27  2:20 UTC (permalink / raw)
  To: 50836

gnu/packages/python-xyz.scm (python-cons): New variable.
---
 gnu/packages/python-xyz.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index bc5ab67e6b..1f6388d2bc 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26626,6 +26626,33 @@ function implementations based on the types of the arguments.")
 symbolic expressions in pure Python using the technique of logical unification.")
     (license license:bsd-3)))

+(define-public python-cons
+  (package
+    (name "python-cons")
+    (version "0.4.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "cons" version))
+       (sha256
+        (base32
+         "0w9giq196wps7mbm47c4shdzs5yvwvqajqzkim2p92i51sm5qgvm"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("pytest@6.2.4" ,python-pytest-6)
+       ("toml@0.10.2" ,python-toml)))
+    (propagated-inputs
+     `(("python-logical-unification"
+        ,python-logical-unification)))
+    (home-page
+     "https://github.com/pythological/python-cons")
+    (synopsis
+     "Cons cell data structures and related algorithms for Python")
+    (description
+     "This library implements algorithms and data structures for Lisp-style
+cons cells in Python.")
+    (license license:lgpl3+)))
+
 (define-public date2name
   (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
         (revision "1"))
--
2.33.0






^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#50836] [PATCH 4/5] gnu: Add python-etuples.
  2021-09-27  2:20 ` [bug#50836] [PATCH 1/5] gnu: Add python-multipledispatch Ryan Prior via Guix-patches via
  2021-09-27  2:20   ` [bug#50836] [PATCH 2/5] gnu: Add python-logical-unification Ryan Prior via Guix-patches via
  2021-09-27  2:20   ` [bug#50836] [PATCH 3/5] gnu: Add python-cons Ryan Prior via Guix-patches via
@ 2021-09-27  2:20   ` Ryan Prior via Guix-patches via
  2021-09-27  2:20   ` [bug#50836] [PATCH 5/5] gnu: Add python-minikanren Ryan Prior via Guix-patches via
  2021-09-27 10:28   ` [bug#50836] [PATCH 1/5] gnu: Add python-multipledispatch Maxime Devos
  4 siblings, 0 replies; 8+ messages in thread
From: Ryan Prior via Guix-patches via @ 2021-09-27  2:20 UTC (permalink / raw)
  To: 50836

gnu/packages/python-xyz.scm (python-etuples): New variable.
---
 gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 1f6388d2bc..0b002c42dc 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26653,6 +26653,30 @@ symbolic expressions in pure Python using the technique of logical unification."
 cons cells in Python.")
     (license license:lgpl3+)))

+(define-public python-etuples
+  (package
+    (name "python-etuples")
+    (version "0.3.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "etuples" version))
+       (sha256
+        (base32
+         "0jhfyp177v37rl0i7wqfx7q6s5qkz027hl283d1x8d0vm3w0zqc8"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-cons" ,python-cons)
+       ("python-multipledispatch"
+        ,python-multipledispatch)))
+    (home-page
+     "http://github.com/pythological/etuples")
+    (synopsis
+     "S-expressions in Python")
+    (description
+     "This library implements eval'able S-expression in Python using tuple-like objects.")
+    (license license:asl2.0)))
+
 (define-public date2name
   (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
         (revision "1"))
--
2.33.0






^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#50836] [PATCH 5/5] gnu: Add python-minikanren.
  2021-09-27  2:20 ` [bug#50836] [PATCH 1/5] gnu: Add python-multipledispatch Ryan Prior via Guix-patches via
                     ` (2 preceding siblings ...)
  2021-09-27  2:20   ` [bug#50836] [PATCH 4/5] gnu: Add python-etuples Ryan Prior via Guix-patches via
@ 2021-09-27  2:20   ` Ryan Prior via Guix-patches via
  2021-09-27 10:28   ` [bug#50836] [PATCH 1/5] gnu: Add python-multipledispatch Maxime Devos
  4 siblings, 0 replies; 8+ messages in thread
From: Ryan Prior via Guix-patches via @ 2021-09-27  2:20 UTC (permalink / raw)
  To: 50836

gnu/packages/python-xyz.scm (python-minikanren): New variable.
---
 gnu/packages/python-xyz.scm | 46 +++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0b002c42dc..4437de6374 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26677,6 +26677,52 @@ cons cells in Python.")
      "This library implements eval'able S-expression in Python using tuple-like objects.")
     (license license:asl2.0)))

+(define-public python-minikanren
+  (package
+    (name "python-minikanren")
+    (version "1.0.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/pythological/kanren")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0g7wfj5hxalwz7k1301nsjqhjpzsif1bj6wjm2x2kavlm2ypv9jc"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases (modify-phases %standard-phases
+                  (replace 'check
+                    (lambda* (#:key tests? #:allow-other-keys)
+                      (when tests?
+                        (invoke "python" "-m" "pytest" "-v" "tests/" "kanren/"))
+                      #t)))))
+    (native-inputs
+     `(("python-coveralls" ,python-coveralls)
+       ("python-pydocstyle" ,python-pydocstyle)
+       ("python-pytest@6.2.4" ,python-pytest)
+       ("python-pytest-cov@2.8.1" ,python-pytest-cov)
+       ("python-pylint@2.5.3" ,python-pylint)
+       ("python-black@20.8b1" ,python-black)
+       ("python-sympy@1.7.1" ,python-sympy)
+       ("python-versioneer@0.19" ,python-versioneer)
+       ("python-coverage@5.2.1" ,python-coverage)
+       ("python-pre-commit@2.10.0" ,python-pre-commit)))
+    (propagated-inputs
+     `(("toolz@0.11.1" ,python-toolz)
+       ("cons" ,python-cons)
+       ("multipledispatch" ,python-multipledispatch)
+       ("etuples" ,python-etuples)
+       ("logical-unification" ,python-logical-unification)))
+    (home-page "https://github.com/pythological/kanren")
+    (synopsis "Relational logic programming in pure Python")
+    (description
+     "The minikanren library provides an algorithmic core for computer algebra
+systems in Python.")
+    (license license:bsd-3)))
+
+
 (define-public date2name
   (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
         (revision "1"))
--
2.33.0






^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [bug#50836] [PATCH 1/5] gnu: Add python-multipledispatch.
  2021-09-27  2:20 ` [bug#50836] [PATCH 1/5] gnu: Add python-multipledispatch Ryan Prior via Guix-patches via
                     ` (3 preceding siblings ...)
  2021-09-27  2:20   ` [bug#50836] [PATCH 5/5] gnu: Add python-minikanren Ryan Prior via Guix-patches via
@ 2021-09-27 10:28   ` Maxime Devos
  4 siblings, 0 replies; 8+ messages in thread
From: Maxime Devos @ 2021-09-27 10:28 UTC (permalink / raw)
  To: Ryan Prior, 50836

[-- Attachment #1: Type: text/plain, Size: 1629 bytes --]

Ryan Prior via Guix-patches via schreef op ma 27-09-2021 om 02:20 [+0000]:
> * gnu/packages/python-xyz.scm (python-multipledispatch): New variable.
> ---
>  gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index a34c444a87..c833c95b5a 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -26584,6 +26584,26 @@ objects in the combined source, and how they define or use each other.  The
>  graph can be output for rendering by GraphViz or yEd.")
>      (license license:gpl2)))
> 
> +(define-public python-multipledispatch
> +  (package
> +    (name "python-multipledispatch")
> +    (version "0.6.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "multipledispatch" version))
> +       (sha256
> +        (base32
> +         "1slblghfjg9fdi9zpd7gmrkvfbv20nrdgnrymcnbky8bzm8i9ax7"))))
> +    (build-system python-build-system)
> +    (propagated-inputs `(("six" ,python-six)))

The convention is to use the package name of the input package as input
label ("python-six" instead of "six" in this case).  This is important for
the "guix style" in <https://issues.guix.gnu.org/49169>, which, when it will
be in master, allows writing this package definition as

(define-public python-multipledispatch
  (package
    (name "python-multipledispatch")
    ...
    (propagated-inputs (list python-six))
    ...))

(The long-term goal appears to be to remove input labels completely.)

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#50836: [PATCH 0/5] Python logic programming packages
  2021-09-27  2:17 [bug#50836] [PATCH 0/5] Python logic programming packages Ryan Prior via Guix-patches via
  2021-09-27  2:20 ` [bug#50836] [PATCH 1/5] gnu: Add python-multipledispatch Ryan Prior via Guix-patches via
@ 2021-11-15 13:42 ` Ludovic Courtès
  1 sibling, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2021-11-15 13:42 UTC (permalink / raw)
  To: Ryan Prior; +Cc: 50836-done

Hi,

Ryan Prior <rprior@protonmail.com> skribis:

>   gnu: Add python-multipledispatch.
>   gnu: Add python-logical-unification.
>   gnu: Add python-cons.
>   gnu: Add python-etuples.
>   gnu: Add python-minikanren.

I adjusted input labels as Maxime suggested, addressed minor issues
reported by ‘guix lint’, and committed the whole thing.

I didn’t know miniKanren (and ‘cons’ :-)) had been ported to Python,
sweet!

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-11-15 13:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27  2:17 [bug#50836] [PATCH 0/5] Python logic programming packages Ryan Prior via Guix-patches via
2021-09-27  2:20 ` [bug#50836] [PATCH 1/5] gnu: Add python-multipledispatch Ryan Prior via Guix-patches via
2021-09-27  2:20   ` [bug#50836] [PATCH 2/5] gnu: Add python-logical-unification Ryan Prior via Guix-patches via
2021-09-27  2:20   ` [bug#50836] [PATCH 3/5] gnu: Add python-cons Ryan Prior via Guix-patches via
2021-09-27  2:20   ` [bug#50836] [PATCH 4/5] gnu: Add python-etuples Ryan Prior via Guix-patches via
2021-09-27  2:20   ` [bug#50836] [PATCH 5/5] gnu: Add python-minikanren Ryan Prior via Guix-patches via
2021-09-27 10:28   ` [bug#50836] [PATCH 1/5] gnu: Add python-multipledispatch Maxime Devos
2021-11-15 13:42 ` bug#50836: [PATCH 0/5] Python logic programming packages Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.