diff mbox series

[bug#51432,3/4] gnu: Add marshmallow-jsonapi

Message ID 77232ac1914f40ac2d037ef20153d913@selfhosted.xyz
State Accepted
Headers show
Series gnu: Add flask-combo-jsonapi | expand

Checks

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

Commit Message

david larsson Oct. 27, 2021, 11:01 a.m. UTC
On 2021-10-27 12:52, david larsson wrote:
> Hi!
> This patch series is to add python-flask-combo-jsonapi and necessary
> dependencies.
> 
> Best regards,
> David

Adds the dependency on marshmallow-jsonapi.

Comments

Tobias Geerinckx-Rice Nov. 3, 2021, 1:34 p.m. UTC | #1
David,

> +        (base32
> +         "1d9pxcgmln4gls99vwj1h24qv0lz7fb2jqmqrsiv1pid1snc125x"))))
[…]
> +    (home-page
> +     "https://github.com/marshmallow-code/marshmallow-jsonapi")
> +    (synopsis
> +     "JSON API 1.0 (https://jsonapi.org) formatting with 
> marshmallow")

Nitpick: none of these need to be on separate lines (after 
removing the URL from the description).

Guix synopses and descriptions support (a comfortable subset of) 
Texinfo.  You can include hyperlinks in Texinfo with

  @uref{https://your.url/here, optional description}

For subjective reasons I decided to keep only the URL in the 
description.

> +    (description
> +     "JSON API 1.0 (https://jsonapi.org) formatting with 
> marshmallow")

Descriptions should consist of full sentences.  A single line is 
way too short.  Upstream has a fine description that fits our 
standards, so I adapted it:

+    (description
+     "The marshmallow-jsonapi package provides a simple way to 
produce
+@uref{https://jsonapi.org, JSON:API}-compliant data in any Python 
Web framework.
+It includes optional utilities to integrate with Flask.")

> +    (license license:expat))) ; MIT license

No need for this comment.

Thanks!

T G-R
diff mbox series

Patch

From bce66e910d26e1d9bc6b5156817fa56c57e9f0fa Mon Sep 17 00:00:00 2001
From: David Larsson <david.larsson@selfhosted.xyz>
Date: Tue, 26 Oct 2021 19:51:50 +0200
Subject: [PATCH 3/4] gnu: Add marshmallow-jsonapi.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9ca075e941..ea7ba72a6e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -19190,6 +19190,37 @@  Python datatypes")
 complex datatypes to and from native Python datatypes.")
     (license license:expat))) ; MIT license
 
+(define-public python-marshmallow-jsonapi
+  (package
+    (name "python-marshmallow-jsonapi")
+    (version "0.24.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "marshmallow-jsonapi" version))
+       (sha256
+        (base32
+         "1d9pxcgmln4gls99vwj1h24qv0lz7fb2jqmqrsiv1pid1snc125x"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-marshmallow" ,python-marshmallow-3.2)))
+    (native-inputs
+     `(("python-faker" ,python-faker)
+       ("python-flake8" ,python-flake8)
+       ("python-flake8-bugbear" ,python-flake8-bugbear)
+       ("python-flask" ,python-flask)
+       ("python-mock" ,python-mock)
+       ("python-pre-commit" ,python-pre-commit)
+       ("python-pytest" ,python-pytest)
+       ("python-tox" ,python-tox)))
+    (home-page
+     "https://github.com/marshmallow-code/marshmallow-jsonapi")
+    (synopsis
+     "JSON API 1.0 (https://jsonapi.org) formatting with marshmallow")
+    (description
+     "JSON API 1.0 (https://jsonapi.org) formatting with marshmallow")
+    (license license:expat))) ; MIT license
+
 (define-public python-apispec
   (package
     (name "python-apispec")
-- 
2.31.0