diff mbox series

[bug#53019,3/3] gnu: Add python-aerich.

Message ID 20220305231459.22969-3-goodoldpaul@autistici.org
State New
Headers show
Series [bug#53019,1/3] gnu: Add python-codeclimate-test-reporter. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Giacomo Leidi March 5, 2022, 11:14 p.m. UTC
* gnu/packages/databases.scm (python-aerich): New variable.
---
 gnu/packages/databases.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

Comments

M March 6, 2022, 10:21 a.m. UTC | #1
Giacomo Leidi via Guix-patches via schreef op zo 06-03-2022 om 00:14
[+0100]:
> +    (arguments
> +     ;; Tests are not packaged in the Pypi tarball and
> +     ;; require a poetry environment to be run from source.
> +     `(#:tests? #f))

If they are not packaged in the pypi tarball, then it can
be built from git instead.  I also don't see how it required poetry.

Greetings,
Maxime.
M March 6, 2022, 10:31 a.m. UTC | #2
Giacomo Leidi via Guix-patches via schreef op zo 06-03-2022 om 00:14
[+0100]:
> +    (synopsis "Database migrations tool for Tortoise ORM")
> +    (description
> +      "This package provides @code{aerich} a Python database migrations tool for
> +Tortoise ORM.")

(comma missing before 'a')

This description is a bit short and it does not introduce the acronym
ORM, see (guix)Synopsis and Descriptions:

   Descriptions should take between five and ten lines.  Use full
sentences, and avoid using acronyms without first introducing them.
[...]

Greetings,
Maxime
M March 6, 2022, 10:32 a.m. UTC | #3
Giacomo Leidi via Guix-patches via schreef op zo 06-03-2022 om 00:14
[+0100]:
> +    (description
> +      "This package provides @code{aerich} a Python database migrations tool for
> +Tortoise ORM.")

Is it a tool, or a library?  If it's a tool, the 'python-' prefix can
be dropped and the inputs depropagated.

Greetings,
Maxime.
Giacomo Leidi March 14, 2022, 10:30 p.m. UTC | #4
On 3/6/22 11:21, Maxime Devos wrote:
> Giacomo Leidi via Guix-patches via schreef op zo 06-03-2022 om 00:14
> [+0100]:
>> +    (arguments
>> +     ;; Tests are not packaged in the Pypi tarball and
>> +     ;; require a poetry environment to be run from source.
>> +     `(#:tests? #f))
> If they are not packaged in the pypi tarball, then it can
> be built from git instead.  I also don't see how it required poetry.

The source tarball does not contain tests but has a setup.py generated 
by poetry, the git repository has the tests suite but lacks a setup.py, 
forcing a dependency on poetry to get a suitable setup.py. I fixed this 
by generating a setup.py with poetry.

Greetings,

Giacomo
Giacomo Leidi March 14, 2022, 10:34 p.m. UTC | #5
Dear Maxime,

On 3/6/22 11:31, Maxime Devos wrote:
> Giacomo Leidi via Guix-patches via schreef op zo 06-03-2022 om 00:14
> [+0100]:
>> +    (synopsis "Database migrations tool for Tortoise ORM")
>> +    (description
>> +      "This package provides @code{aerich} a Python database migrations tool for
>> +Tortoise ORM.")
> (comma missing before 'a')
>
> This description is a bit short and it does not introduce the acronym
> ORM, see (guix)Synopsis and Descriptions:
>
>     Descriptions should take between five and ten lines.  Use full
> sentences, and avoid using acronyms without first introducing them.
> [...]

Fixed, thank you!

Giacomo
Giacomo Leidi March 14, 2022, 10:35 p.m. UTC | #6
Dear Maxime,

On 3/6/22 11:32, Maxime Devos wrote:
> Giacomo Leidi via Guix-patches via schreef op zo 06-03-2022 om 00:14
> [+0100]:
>> +    (description
>> +      "This package provides @code{aerich} a Python database migrations tool for
>> +Tortoise ORM.")
> Is it a tool, or a library?  If it's a tool, the 'python-' prefix can
> be dropped and the inputs depropagated.

It's actually both, but I guess that as dynaconf lacks 'python-' this 
should also be renamed. Fixed, thank you. I'm sending an updated patch 
set rebased on master.

Thank you for your time,

Giacomo
diff mbox series

Patch

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 8e9431016f..f47f738336 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -56,6 +56,7 @@ 
 ;;; Copyright © 2021 jgart <jgart@dismail.de>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
 ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
+;;; Copyright © 2022 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3015,6 +3016,36 @@  (define-public python-tortoise-orm
 with relational data.")
     (license license:asl2.0)))
 
+(define-public python-aerich
+  (package
+    (name "python-aerich")
+    (version "0.6.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "aerich" version))
+        (sha256
+          (base32 "19bvx5icsmmf9ylxyqrxw4wjv77shg5r8pjgdg7plzhn937bzlch"))))
+    (build-system python-build-system)
+    (arguments
+     ;; Tests are not packaged in the Pypi tarball and
+     ;; require a poetry environment to be run from source.
+     `(#:tests? #f))
+    (propagated-inputs
+      (list python-asyncmy
+            python-asyncpg
+            python-click
+            python-ddlparse
+            python-dictdiffer
+            python-tomlkit
+            python-tortoise-orm))
+    (home-page "https://github.com/tortoise/aerich")
+    (synopsis "Database migrations tool for Tortoise ORM")
+    (description
+      "This package provides @code{aerich} a Python database migrations tool for
+Tortoise ORM.")
+    (license license:asl2.0)))
+
 (define-public sqlcipher
   (package
     (name "sqlcipher")