GNU bug report logs - #39396
[PATCH] gnu: Add grip.

Previous Next

Package: guix-patches;

Reported by: Jakub Kądziołka <kuba <at> kadziolka.net>

Date: Sun, 2 Feb 2020 19:36:02 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39396 in the body.
You can then email your comments to 39396 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#39396; Package guix-patches. (Sun, 02 Feb 2020 19:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jakub Kądziołka <kuba <at> kadziolka.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 02 Feb 2020 19:36:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add grip.
Date: Sun,  2 Feb 2020 20:35:45 +0100
* gnu/packages/python-web.scm (grip, python-path-and-address): New
  variables.
---
 gnu/packages/python-web.scm | 59 +++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 9464021d82..a6b1e97ba1 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -31,6 +31,7 @@
 ;;; Copyright © 2019 Brendan Tildesley <mail <at> brendan.scot>
 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy <at> bioneland.org>
+;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3494,3 +3495,61 @@ is part of the Weblate translation platform.")
     (description "This package provides an extended library for interacting
 with GitLab instances through their API.")
     (license license:lgpl3+)))
+
+(define-public python-path-and-address
+  (package
+    (name "python-path-and-address")
+    (version "2.0.1")
+    (source
+     (origin
+       ;; Use git-fetch because pypi-url fails.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/joeyespo/path-and-address")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/joeyespo/path-and-address")
+    (synopsis "Functions for command-line server tools used by humans")
+    (description "Path-and-address resolves ambiguities of command-line
+interfaces, inferring which argument is the path, and which is the address.")
+    (license license:expat)))
+
+(define-public grip
+  ;; No release by upstream for quite some time, some bugs fixed since. See:
+  ;; https://github.com/joeyespo/grip/issues/304
+  (let ((commit "27a4d6d87ea1d0ea7f7f120de55baabee3de73e3"))
+    (package
+      (name "grip")
+      (version (git-version "4.5.2" "1" commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/joeyespo/grip")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0kx5hgb3q19i4l18a4vqdq9af390xgpk88lp2ay75qi96k0dc68w"))))
+      (build-system python-build-system)
+      (propagated-inputs
+       `(("python-docopt" ,python-docopt)
+         ("python-flask" ,python-flask)
+         ("python-markdown" ,python-markdown)
+         ("python-path-and-address" ,python-path-and-address)
+         ("python-pygments" ,python-pygments)
+         ("python-requests" ,python-requests)))
+      (native-inputs
+       `(("python-responses" ,python-responses)))
+      (home-page "https://github.com/joeyespo/grip")
+      (synopsis "Preview Markdown files using the GitHub API")
+      (description "Grip is a command-line server application written in Python
+that uses the GitHub Markdown API to render a local Markdown file.  The styles
+and rendering come directly from GitHub, so you'll know exactly how it will
+appear.  Changes you make to the file will be instantly reflected in the browser
+without requiring a page refresh.")
+      (license license:expat))))
-- 
2.25.0





Information forwarded to guix-patches <at> gnu.org:
bug#39396; Package guix-patches. (Sun, 02 Feb 2020 19:58:01 GMT) Full text and rfc822 format available.

Message #8 received at 39396 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Jakub Kądziołka <kuba <at> kadziolka.net>
Cc: 39396 <at> debbugs.gnu.org
Subject: Re: [bug#39396] [PATCH] gnu: Add grip.
Date: Sun, 2 Feb 2020 21:56:25 +0200
[Message part 1 (text/plain, inline)]
On Sun, Feb 02, 2020 at 08:35:45PM +0100, Jakub Kądziołka wrote:
> * gnu/packages/python-web.scm (grip, python-path-and-address): New
>   variables.

Please split this into two patches.

> ---
>  gnu/packages/python-web.scm | 59 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 59 insertions(+)
> 
> diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
> index 9464021d82..a6b1e97ba1 100644
> --- a/gnu/packages/python-web.scm
> +++ b/gnu/packages/python-web.scm
> @@ -31,6 +31,7 @@
>  ;;; Copyright © 2019 Brendan Tildesley <mail <at> brendan.scot>
>  ;;; Copyright © 2019 Pierre Langlois <pierre.langlois <at> gmx.com>
>  ;;; Copyright © 2019 Tanguy Le Carrour <tanguy <at> bioneland.org>
> +;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -3494,3 +3495,61 @@ is part of the Weblate translation platform.")
>      (description "This package provides an extended library for interacting
>  with GitLab instances through their API.")
>      (license license:lgpl3+)))
> +
> +(define-public python-path-and-address
> +  (package
> +    (name "python-path-and-address")
> +    (version "2.0.1")
> +    (source
> +     (origin
> +       ;; Use git-fetch because pypi-url fails.

I managed to get the pypi importer to work:
guix environment --ad-hoc unzip -- guix import pypi path-and-address
just make sure to add the ".zip" at the end of the uri of the generated
package.

> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/joeyespo/path-and-address")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32
> +         "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
> +    (build-system python-build-system)

This package didn't show any tests run, so after some experimentation I
ended up with the following addition:

(arguments
 `(#:phases
   (modify-phases %standard-phases
     (replace 'check
       (lambda* (#:key inputs outputs #:allow-other-keys)
         (add-installed-pythonpath inputs outputs)
         (invoke "py.test"))))))
(native-inputs
 `(("python-pytest" ,python-pytest)))

> +    (home-page "https://github.com/joeyespo/path-and-address")
> +    (synopsis "Functions for command-line server tools used by humans")
> +    (description "Path-and-address resolves ambiguities of command-line
> +interfaces, inferring which argument is the path, and which is the address.")
> +    (license license:expat)))
> +

This package I also didn't see run any tests. I'd suggest checking out
the .travis.yml file to see what they do for the tests.

> +(define-public grip
> +  ;; No release by upstream for quite some time, some bugs fixed since. See:
> +  ;; https://github.com/joeyespo/grip/issues/304
> +  (let ((commit "27a4d6d87ea1d0ea7f7f120de55baabee3de73e3"))
> +    (package
> +      (name "grip")
> +      (version (git-version "4.5.2" "1" commit))
> +      (source
> +       (origin
> +         (method git-fetch)
> +         (uri (git-reference
> +               (url "https://github.com/joeyespo/grip")
> +               (commit commit)))
> +         (file-name (git-file-name name version))
> +         (sha256
> +          (base32
> +           "0kx5hgb3q19i4l18a4vqdq9af390xgpk88lp2ay75qi96k0dc68w"))))
> +      (build-system python-build-system)
> +      (propagated-inputs
> +       `(("python-docopt" ,python-docopt)
> +         ("python-flask" ,python-flask)
> +         ("python-markdown" ,python-markdown)
> +         ("python-path-and-address" ,python-path-and-address)
> +         ("python-pygments" ,python-pygments)
> +         ("python-requests" ,python-requests)))
> +      (native-inputs
> +       `(("python-responses" ,python-responses)))
> +      (home-page "https://github.com/joeyespo/grip")
> +      (synopsis "Preview Markdown files using the GitHub API")
> +      (description "Grip is a command-line server application written in Python
> +that uses the GitHub Markdown API to render a local Markdown file.  The styles
> +and rendering come directly from GitHub, so you'll know exactly how it will
> +appear.  Changes you make to the file will be instantly reflected in the browser
> +without requiring a page refresh.")
> +      (license license:expat))))
> -- 
> 2.25.0
> 
> 
> 
> 

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#39396; Package guix-patches. (Sun, 02 Feb 2020 22:52:02 GMT) Full text and rfc822 format available.

Message #11 received at 39396 <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: 39396 <at> debbugs.gnu.org, efraim <at> flashner.co.il
Subject: [PATCH v2 1/2] gnu: Add python-path-and-address.
Date: Sun, 2 Feb 2020 23:51:39 +0100
[Message part 1 (text/plain, inline)]
* gnu/packages/python-web.scm (python-path-and-address): New variable.
---
I believe I have addressed all of your concerns, Efraim. I wouldn't have
thought to check if tests are being ran, nice catch.
[git am will remove this note automatically]
---
 gnu/packages/python-web.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 9464021d82..3e5253489b 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -31,6 +31,7 @@
 ;;; Copyright © 2019 Brendan Tildesley <mail <at> brendan.scot>
 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy <at> bioneland.org>
+;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3494,3 +3495,35 @@ is part of the Weblate translation platform.")
     (description "This package provides an extended library for interacting
 with GitLab instances through their API.")
     (license license:lgpl3+)))
+
+(define-public python-path-and-address
+  (package
+    (name "python-path-and-address")
+    (version "2.0.1")
+    (source
+     (origin
+       ;; Use git-fetch because the source distributed on PyPI doesn't include
+       ;; tests.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/joeyespo/path-and-address")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (add-installed-pythonpath inputs outputs)
+             (invoke "py.test"))))))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (home-page "https://github.com/joeyespo/path-and-address")
+    (synopsis "Functions for command-line server tools used by humans")
+    (description "Path-and-address resolves ambiguities of command-line
+interfaces, inferring which argument is the path, and which is the address.")
+    (license license:expat)))
-- 
2.25.0

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#39396; Package guix-patches. (Sun, 02 Feb 2020 22:52:02 GMT) Full text and rfc822 format available.

Message #14 received at 39396 <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: 39396 <at> debbugs.gnu.org, efraim <at> flashner.co.il
Subject: [PATCH v2 2/2] gnu: Add grip.
Date: Sun, 2 Feb 2020 23:51:57 +0100
[Message part 1 (text/plain, inline)]
* gnu/packages/python-web.scm (grip): New variable.
---
 gnu/packages/python-web.scm | 49 +++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 3e5253489b..35c168948c 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -3527,3 +3527,52 @@ with GitLab instances through their API.")
     (description "Path-and-address resolves ambiguities of command-line
 interfaces, inferring which argument is the path, and which is the address.")
     (license license:expat)))
+
+(define-public grip
+  ;; No release by upstream for quite some time, some bugs fixed since. See:
+  ;; https://github.com/joeyespo/grip/issues/304
+  (let ((commit "27a4d6d87ea1d0ea7f7f120de55baabee3de73e3"))
+    (package
+      (name "grip")
+      (version (git-version "4.5.2" "1" commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/joeyespo/grip")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0kx5hgb3q19i4l18a4vqdq9af390xgpk88lp2ay75qi96k0dc68w"))))
+      (build-system python-build-system)
+      (propagated-inputs
+       `(("python-docopt" ,python-docopt)
+         ("python-flask" ,python-flask)
+         ("python-markdown" ,python-markdown)
+         ("python-path-and-address" ,python-path-and-address)
+         ("python-pygments" ,python-pygments)
+         ("python-requests" ,python-requests)))
+      (native-inputs
+       `(("python-responses" ,python-responses)
+         ("python-pytest" ,python-pytest)))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           ;; Run 'check after 'install so that the grip binary is available.
+           (delete 'check)
+           (add-after 'install 'check
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (add-installed-pythonpath inputs outputs)
+               (setenv "PATH" (string-append
+                                (getenv "PATH") ":"
+                                (assoc-ref %outputs "out") "/bin"))
+               (invoke "py.test" "-m" "not assumption"))))))
+      (home-page "https://github.com/joeyespo/grip")
+      (synopsis "Preview Markdown files using the GitHub API")
+      (description "Grip is a command-line server application written in Python
+that uses the GitHub Markdown API to render a local Markdown file.  The styles
+and rendering come directly from GitHub, so you'll know exactly how it will
+appear.  Changes you make to the file will be instantly reflected in the browser
+without requiring a page refresh.")
+      (license license:expat))))
-- 
2.25.0

[signature.asc (application/pgp-signature, inline)]

Reply sent to Efraim Flashner <efraim <at> flashner.co.il>:
You have taken responsibility. (Tue, 04 Feb 2020 10:14:01 GMT) Full text and rfc822 format available.

Notification sent to Jakub Kądziołka <kuba <at> kadziolka.net>:
bug acknowledged by developer. (Tue, 04 Feb 2020 10:14:01 GMT) Full text and rfc822 format available.

Message #19 received at 39396-done <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Jakub Kądziołka <kuba <at> kadziolka.net>
Cc: 39396-done <at> debbugs.gnu.org
Subject: Re: [PATCH v2 2/2] gnu: Add grip.
Date: Tue, 4 Feb 2020 12:13:11 +0200
[Message part 1 (text/plain, inline)]
I re-ordered the native-inputs so they'd be alphabetical and I changed
the custom 'check phase to replace the stock 'check phase. It's been a
while now that in the python-build-system the 'check phase comes after
the 'install phase.

Patches pushed. Thanks!


-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 03 Mar 2020 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 105 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.