unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#68492] [PATCH] gnu: Add python-fastapi-pagination.
@ 2024-01-15 23:25 Giacomo Leidi via Guix-patches via
  2024-01-19 12:00 ` Sharlatan Hellseher
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Giacomo Leidi via Guix-patches via @ 2024-01-15 23:25 UTC (permalink / raw)
  To: 68492; +Cc: Giacomo Leidi

* gnu/packages/python-web.scm (python-fastapi-pagination): New variable.

Change-Id: I335d984607ebb954032dd4b1eedccf436584c59d
---
 gnu/packages/python-web.scm | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 418100c084..ecb546ca8e 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -39,7 +39,7 @@
 ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
 ;;; Copyright © 2020, 2021, 2022, 2023 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Konrad Hinsen <konrad.hinsen@fastmail.net>
-;;; Copyright © 2020, 2022 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2020, 2022, 2024 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
 ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
@@ -8663,6 +8663,35 @@ (define-public python-fastapi-csrf-protect
 pattern.")
     (license license:expat)))
 
+(define-public python-fastapi-pagination
+  (package
+    (name "python-fastapi-pagination")
+    (version "0.12.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/uriyyo/fastapi-pagination")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0qkcphjk1qy680v1hkmqbs4p7srvx020wy39b97anrn9dyyi5ah6"))))
+    (build-system pyproject-build-system)
+    (arguments
+     ;; Tests depend on python-cassandra
+     `(#:tests? #f))
+    (native-inputs
+     (list poetry))
+    (propagated-inputs (list python-fastapi
+                             python-pydantic))
+    (home-page "https://github.com/uriyyo/fastapi-pagination")
+    (synopsis "FastAPI pagination library")
+    (description "@code{fastapi-pagination} is a Python library designed to
+simplify pagination in FastAPI applications.  It provides a set of utility
+functions and data models to help you paginate your database queries and
+return paginated responses to your clients.")
+    (license license:expat)))
+
 (define-public python-pyactiveresource
   (package
     (name "python-pyactiveresource")

base-commit: 19db1551dc6f6180d2cda9084c2dec37bf4923c9
-- 
2.41.0





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

* [bug#68492] [PATCH] gnu: Add python-fastapi-pagination.
  2024-01-15 23:25 [bug#68492] [PATCH] gnu: Add python-fastapi-pagination Giacomo Leidi via Guix-patches via
@ 2024-01-19 12:00 ` Sharlatan Hellseher
  2024-02-28 23:34 ` paul via Guix-patches via
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Sharlatan Hellseher @ 2024-01-19 12:00 UTC (permalink / raw)
  To: 68492

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

Hi,

Package is LGTM.

> ;; Tests depend on python-cassandra
> + `(#:tests? #f))
May you mention that it's not packed yet in Guix, please?
It would help to prioritize  missing package in next update cycle.

Did you check if we can activate any optional dependencies?

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
pydantic = ">=1.9.1"
fastapi = ">=0.93.0"
typing-extensions = "^4.8.0"
SQLAlchemy = { version = ">=1.3.20", optional = true }
databases = { version = ">=0.6.0", optional = true }
orm = { version = ">=0.3.1", optional = true }
tortoise-orm = { version = ">=0.16.18,<0.21.0", optional = true }
asyncpg = { version = ">=0.24.0", optional = true }
ormar = { version = ">=0.11.2", optional = true}
django = { version = "<5.0.0", optional = true}
piccolo = { version = ">=0.89,<0.122", optional = true}
motor =  { version = ">=2.5.1,<4.0.0", optional = true }
mongoengine = {version = ">=0.23.1,<0.28.0", optional = true}
sqlmodel = { version = ">=0.0.8,<0.0.15", optional = true}
pony = { version = "^0.7.16", optional = true}
beanie = { version = "^1.11.9", optional = true}
sqlakeyset = { version = "^2.0.1680321678", optional = true }
scylla-driver = {version = "^3.25.6", optional = true}
bunnet = {version = "^1.1.0", optional = true}

Thanks,
Oleg

[-- Attachment #2: Type: text/html, Size: 2498 bytes --]

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

* [bug#68492] [PATCH] gnu: Add python-fastapi-pagination.
  2024-01-15 23:25 [bug#68492] [PATCH] gnu: Add python-fastapi-pagination Giacomo Leidi via Guix-patches via
  2024-01-19 12:00 ` Sharlatan Hellseher
@ 2024-02-28 23:34 ` paul via Guix-patches via
  2024-02-28 23:35 ` [bug#68492] [PATCH v2 1/2] gnu: Add python-fastapi-pagination-minimal Giacomo Leidi via Guix-patches via
  2024-03-01  7:34 ` bug#68492: [PATCH] " Sharlatan Hellseher
  3 siblings, 0 replies; 6+ messages in thread
From: paul via Guix-patches via @ 2024-02-28 23:34 UTC (permalink / raw)
  To: 68492; +Cc: Sharlatan Hellseher

Hi Sharlatan,

thank you for your review. To prevent input bloat I added a 
python-fastapi-pagination-minimal with only the required dependencies 
and a python-fastapi-pagination with all available optional dependencies.

Thank you for your time, I'm sending a v2.


giacomo





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

* [bug#68492] [PATCH v2 1/2] gnu: Add python-fastapi-pagination-minimal.
  2024-01-15 23:25 [bug#68492] [PATCH] gnu: Add python-fastapi-pagination Giacomo Leidi via Guix-patches via
  2024-01-19 12:00 ` Sharlatan Hellseher
  2024-02-28 23:34 ` paul via Guix-patches via
@ 2024-02-28 23:35 ` Giacomo Leidi via Guix-patches via
  2024-02-28 23:35   ` [bug#68492] [PATCH v2 2/2] gnu: Add python-fastapi-pagination Giacomo Leidi via Guix-patches via
  2024-03-01  7:34 ` bug#68492: [PATCH] " Sharlatan Hellseher
  3 siblings, 1 reply; 6+ messages in thread
From: Giacomo Leidi via Guix-patches via @ 2024-02-28 23:35 UTC (permalink / raw)
  To: 68492
  Cc: Giacomo Leidi, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	Sharlatan Hellseher, jgart

* gnu/packages/python-web.scm
(python-fastapi-pagination-minimal): New variable.

Change-Id: I69e06ba405bce57409d83f3545e6db2905d3c6a4
---
 gnu/packages/python-web.scm | 35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index cde4ac4f58..1ff5d1009d 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -39,7 +39,7 @@
 ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
 ;;; Copyright © 2020, 2021, 2022, 2023 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2020 Konrad Hinsen <konrad.hinsen@fastmail.net>
-;;; Copyright © 2020, 2022 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2020, 2022, 2024 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
 ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
@@ -8791,6 +8791,39 @@ (define-public python-fastapi-csrf-protect
 pattern.")
     (license license:expat)))
 
+(define-public python-fastapi-pagination-minimal
+  (package
+    (name "python-fastapi-pagination-minimal")
+    (version "0.12.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/uriyyo/fastapi-pagination")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0qkcphjk1qy680v1hkmqbs4p7srvx020wy39b97anrn9dyyi5ah6"))))
+    (build-system pyproject-build-system)
+    (arguments
+     ;; Tests depend on python-cassandra,
+     ;; which is not yet packaged in Guix.
+     `(#:tests? #f))
+    (native-inputs
+     (list poetry))
+    ;; These are the only required dependencies,
+    ;; please add all optional dependencies to the
+    ;; full python-fastapi-pagination below.
+    (propagated-inputs (list python-fastapi
+                             python-pydantic))
+    (home-page "https://github.com/uriyyo/fastapi-pagination")
+    (synopsis "FastAPI pagination library")
+    (description "@code{fastapi-pagination} is a Python library designed to
+simplify pagination in FastAPI applications.  It provides a set of utility
+functions and data models to help you paginate your database queries and
+return paginated responses to your clients.")
+    (license license:expat)))
+
 (define-public python-pyactiveresource
   (package
     (name "python-pyactiveresource")

base-commit: 23283c50e96d7812a42b1272329fa3ba05a5a6e6
-- 
2.41.0





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

* [bug#68492] [PATCH v2 2/2] gnu: Add python-fastapi-pagination.
  2024-02-28 23:35 ` [bug#68492] [PATCH v2 1/2] gnu: Add python-fastapi-pagination-minimal Giacomo Leidi via Guix-patches via
@ 2024-02-28 23:35   ` Giacomo Leidi via Guix-patches via
  0 siblings, 0 replies; 6+ messages in thread
From: Giacomo Leidi via Guix-patches via @ 2024-02-28 23:35 UTC (permalink / raw)
  To: 68492
  Cc: Giacomo Leidi, Lars-Dominik Braun, Marius Bakke, Munyoki Kilyungi,
	Sharlatan Hellseher, jgart

* gnu/packages/python-web.scm (python-fastapi-pagination): New variable.

Change-Id: I3d5563baf7167e0bd0718cdbfc4a869a0bc96911
---
 gnu/packages/python-web.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 1ff5d1009d..8d0c5c278b 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -8824,6 +8824,38 @@ (define-public python-fastapi-pagination-minimal
 return paginated responses to your clients.")
     (license license:expat)))
 
+(define-public python-fastapi-pagination
+  (package
+    (inherit python-fastapi-pagination-minimal)
+    (name "python-fastapi-pagination")
+    (propagated-inputs
+     (modify-inputs (package-propagated-inputs
+                     python-fastapi-pagination-minimal)
+       (prepend python-asyncpg
+                python-databases
+                python-django
+                python-fastapi
+                python-pydantic
+                python-sqlalchemy
+                (package
+                  (inherit python-tortoise-orm)
+                  (arguments
+                   (substitute-keyword-arguments (package-arguments
+                                                  python-tortoise-orm)
+                     ((#:phases phases '%standard-phases)
+                      `(modify-phases ,phases
+                        (delete 'sanity-check)))))
+                  (propagated-inputs
+                   (modify-inputs (package-propagated-inputs python-tortoise-orm)
+                     (replace "python-aiosqlite" python-aiosqlite)))))))
+    (description
+     (string-append (package-description python-fastapi-pagination-minimal)
+                    "
+
+This package, as opposed to @code{python-fastapi-pagination-minimal}, depends on
+all available optional dependencies supported by mainline
+@code{fastapi-pagination}."))))
+
 (define-public python-pyactiveresource
   (package
     (name "python-pyactiveresource")
-- 
2.41.0





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

* bug#68492: [PATCH] gnu: Add python-fastapi-pagination.
  2024-01-15 23:25 [bug#68492] [PATCH] gnu: Add python-fastapi-pagination Giacomo Leidi via Guix-patches via
                   ` (2 preceding siblings ...)
  2024-02-28 23:35 ` [bug#68492] [PATCH v2 1/2] gnu: Add python-fastapi-pagination-minimal Giacomo Leidi via Guix-patches via
@ 2024-03-01  7:34 ` Sharlatan Hellseher
  3 siblings, 0 replies; 6+ messages in thread
From: Sharlatan Hellseher @ 2024-03-01  7:34 UTC (permalink / raw)
  To: 68492-done

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


Hi,

Pushed as d6dbb923d8..a9b91cbc9c to master.

--
Oleg

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

end of thread, other threads:[~2024-03-01  7:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-15 23:25 [bug#68492] [PATCH] gnu: Add python-fastapi-pagination Giacomo Leidi via Guix-patches via
2024-01-19 12:00 ` Sharlatan Hellseher
2024-02-28 23:34 ` paul via Guix-patches via
2024-02-28 23:35 ` [bug#68492] [PATCH v2 1/2] gnu: Add python-fastapi-pagination-minimal Giacomo Leidi via Guix-patches via
2024-02-28 23:35   ` [bug#68492] [PATCH v2 2/2] gnu: Add python-fastapi-pagination Giacomo Leidi via Guix-patches via
2024-03-01  7:34 ` bug#68492: [PATCH] " Sharlatan Hellseher

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).