GNU bug report logs - #29137
[PATCH] gnu: Add python-clf.

Previous Next

Package: guix-patches;

Reported by: Oleg Pykhalov <go.wigust <at> gmail.com>

Date: Fri, 3 Nov 2017 16:38:02 UTC

Severity: normal

Tags: patch

Done: Oleg Pykhalov <go.wigust <at> gmail.com>

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 29137 in the body.
You can then email your comments to 29137 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#29137; Package guix-patches. (Fri, 03 Nov 2017 16:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Oleg Pykhalov <go.wigust <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 03 Nov 2017 16:38:02 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add python-clf.
Date: Fri, 03 Nov 2017 19:37:33 +0300
[0001-gnu-Add-python-clf.patch (text/x-patch, inline)]
From 96a78a88650481961083541c0cc93ef8c082c6bf Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust <at> gmail.com>
Date: Fri, 3 Nov 2017 18:39:17 +0300
Subject: [PATCH] gnu: Add python-clf.

* gnu/packages/web.scm (python-clf): New variable.
---
 gnu/packages/web.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index eea8bb63a..eed120eb2 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -5170,6 +5170,31 @@ internetarchive python module for programatic access to archive.org.")
   (package-with-python2
    (strip-python2-variant python-internetarchive)))
 
+(define-public python-clf
+  (package
+    (name "python-clf")
+    (version "0.5.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "clf" version))
+       (sha256
+        (base32
+         "0zlkzqnpz7a4iavsq5vaz0nf5nr7qm5znpg1vlpz6rwnx6hikjdb"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-docopt" ,python-docopt)
+       ("python-pygments" ,python-pygments)
+       ("python-requests" ,python-requests)))
+    (home-page "https://github.com/ncrocfer/clf")
+    (synopsis "Search code snippets on @url{commandlinefu.com}")
+    (description "@code{clf} is a command line tool for searching code
+snippets on @url{commandlinefu.com}")
+    (license l:expat)))
+
+(define-public python2-clf
+  (package-with-python2 python-clf))
+
 (define-public r-shiny
   (package
     (name "r-shiny")
-- 
2.14.3

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

Information forwarded to guix-patches <at> gnu.org:
bug#29137; Package guix-patches. (Sun, 05 Nov 2017 16:17:02 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <mbakke <at> fastmail.com>
To: Oleg Pykhalov <go.wigust <at> gmail.com>, 29137 <at> debbugs.gnu.org
Subject: Re: [bug#29137] [PATCH] gnu: Add python-clf.
Date: Sun, 05 Nov 2017 17:16:45 +0100
[Message part 1 (text/plain, inline)]
Oleg Pykhalov <go.wigust <at> gmail.com> writes:

> * gnu/packages/web.scm (python-clf): New variable.

[...]

> +(define-public python-clf
> +  (package
> +    (name "python-clf")
> +    (version "0.5.7")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "clf" version))
> +       (sha256
> +        (base32
> +         "0zlkzqnpz7a4iavsq5vaz0nf5nr7qm5znpg1vlpz6rwnx6hikjdb"))))
> +    (build-system python-build-system)
> +    (propagated-inputs
> +     `(("python-docopt" ,python-docopt)
> +       ("python-pygments" ,python-pygments)
> +       ("python-requests" ,python-requests)))
> +    (home-page "https://github.com/ncrocfer/clf")

I noticed in the '.travis.yml' that it has a test suite that can be run
with 'nosetests'.  Can you try overriding the check phase with one that
runs it?  That way we are likely to catch regressions early.

> +    (synopsis "Search code snippets on @url{commandlinefu.com}")
> +    (description "@code{clf} is a command line tool for searching code
> +snippets on @url{commandlinefu.com}")

Note: descriptions should end with a punctuation.  I think I'd also add
http:// to the @url{}s here for clarity.

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

Information forwarded to guix-patches <at> gnu.org:
bug#29137; Package guix-patches. (Fri, 17 Nov 2017 17:10:02 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>, 29137 <at> debbugs.gnu.org
Subject: Re: [bug#29137] [PATCH] gnu: Add python-clf.
Date: Fri, 17 Nov 2017 20:09:30 +0300
[Message part 1 (text/plain, inline)]
Hello Marius,

Apologies for the late reply and thank you for review!

Marius Bakke <mbakke <at> fastmail.com> writes:

> Oleg Pykhalov <go.wigust <at> gmail.com> writes:
>
>> * gnu/packages/web.scm (python-clf): New variable.
>
> [...]
>
>> +(define-public python-clf
>> +  (package
>> +    (name "python-clf")
>> +    (version "0.5.7")
>> +    (source
>> +     (origin
>> +       (method url-fetch)
>> +       (uri (pypi-uri "clf" version))
>> +       (sha256
>> +        (base32
>> +         "0zlkzqnpz7a4iavsq5vaz0nf5nr7qm5znpg1vlpz6rwnx6hikjdb"))))
>> +    (build-system python-build-system)
>> +    (propagated-inputs
>> +     `(("python-docopt" ,python-docopt)
>> +       ("python-pygments" ,python-pygments)
>> +       ("python-requests" ,python-requests)))
>> +    (home-page "https://github.com/ncrocfer/clf")
>
> I noticed in the '.travis.yml' that it has a test suite that can be run
> with 'nosetests'.  Can you try overriding the check phase with one that
> runs it?  That way we are likely to catch regressions early.

Release tarball from pypi doesn't include test_clf.py.  So I pulled it
from git master branch.  Almost all tests require internet connection.

[0001-gnu-Add-python-clf.patch (text/x-patch, inline)]
From d347266c2ceac106b13e114520c80ea6acf7d1b9 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust <at> gmail.com>
Date: Fri, 3 Nov 2017 18:39:17 +0300
Subject: [PATCH] gnu: Add python-clf.

* gnu/packages/web.scm (python-clf): New variable.
---
 gnu/packages/web.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index a78f5b6f0..98708f335 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -5203,6 +5203,58 @@ internetarchive python module for programatic access to archive.org.")
   (package-with-python2
    (strip-python2-variant python-internetarchive)))
 
+(define-public python-clf
+  (let ((commit-test-clf "d01d25923c599d3261910f79fb948825b4270d07")) ; 0.5.7
+    (package
+      (name "python-clf")
+      (version "0.5.7")
+      (source
+       (origin
+         (method url-fetch)
+         (uri (pypi-uri "clf" version))
+         (sha256
+          (base32
+           "0zlkzqnpz7a4iavsq5vaz0nf5nr7qm5znpg1vlpz6rwnx6hikjdb"))))
+      (build-system python-build-system)
+      (propagated-inputs
+       `(("python-docopt" ,python-docopt)
+         ("python-pygments" ,python-pygments)
+         ("python-requests" ,python-requests)
+         ("python-nose" ,python-nose)
+         ("python-lxml" ,python-lxml)
+         ("python-pyaml" ,python-pyaml)))
+      (inputs
+       `(("test-clf"
+          ,(origin
+             (method url-fetch)
+             (uri (string-append "https://raw.githubusercontent.com"
+                                 "/ncrocfer/clf/" commit-test-clf
+                                 "/test_clf.py"))
+             (sha256
+              (base32
+               "19lr5zdzsmxgkg7wrjq1yzkiahd03wi4k3dskssyhmjls8c10nqd"))))))
+      (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'get-tests
+             (lambda _
+               (copy-file (assoc-ref %build-inputs "test-clf") "test_clf.py")))
+           (replace 'check
+             (lambda _
+               (zero? (system* "nosetests"
+                               ;; These tests require internet connection
+                               "--exclude=test_browse"
+                               "--exclude=test_command"
+                               "--exclude=test_search")))))))
+      (home-page "https://github.com/ncrocfer/clf")
+      (synopsis "Search code snippets on @url{commandlinefu.com}")
+      (description "@code{clf} is a command line tool for searching code
+snippets on @url{https://commandlinefu.com}")
+      (license l:expat))))
+
+(define-public python2-clf
+  (package-with-python2 python-clf))
+
 (define-public r-shiny
   (package
     (name "r-shiny")
-- 
2.15.0

[Message part 3 (text/plain, inline)]
>> +    (synopsis "Search code snippets on @url{commandlinefu.com}")
>> +    (description "@code{clf} is a command line tool for searching code
>> +snippets on @url{commandlinefu.com}")
>
> Note: descriptions should end with a punctuation.

Ouch, "guix lint" didn't spot this.

> I think I'd also add http:// to the @url{}s here for clarity.

Sure, added "https://".

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

Information forwarded to guix-patches <at> gnu.org:
bug#29137; Package guix-patches. (Fri, 17 Nov 2017 19:46:01 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>, 29137 <at> debbugs.gnu.org
Subject: Re: [bug#29137] [PATCH] gnu: Add python-clf.
Date: Fri, 17 Nov 2017 22:44:59 +0300
Oh sorry, I forgot to insert a dot at the end of the description.




Information forwarded to guix-patches <at> gnu.org:
bug#29137; Package guix-patches. (Sun, 19 Nov 2017 17:15:02 GMT) Full text and rfc822 format available.

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

From: Marius Bakke <mbakke <at> fastmail.com>
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>, 29137 <at> debbugs.gnu.org
Subject: Re: [bug#29137] [PATCH] gnu: Add python-clf.
Date: Sun, 19 Nov 2017 18:14:28 +0100
[Message part 1 (text/plain, inline)]
Oleg Pykhalov <go.wigust <at> gmail.com> writes:

> Hello Marius,
>
> Apologies for the late reply and thank you for review!
>
> Marius Bakke <mbakke <at> fastmail.com> writes:
>
>> Oleg Pykhalov <go.wigust <at> gmail.com> writes:
>>
>>> * gnu/packages/web.scm (python-clf): New variable.
>>
>> [...]
>>
>>> +(define-public python-clf
>>> +  (package
>>> +    (name "python-clf")
>>> +    (version "0.5.7")
>>> +    (source
>>> +     (origin
>>> +       (method url-fetch)
>>> +       (uri (pypi-uri "clf" version))
>>> +       (sha256
>>> +        (base32
>>> +         "0zlkzqnpz7a4iavsq5vaz0nf5nr7qm5znpg1vlpz6rwnx6hikjdb"))))
>>> +    (build-system python-build-system)
>>> +    (propagated-inputs
>>> +     `(("python-docopt" ,python-docopt)
>>> +       ("python-pygments" ,python-pygments)
>>> +       ("python-requests" ,python-requests)))
>>> +    (home-page "https://github.com/ncrocfer/clf")
>>
>> I noticed in the '.travis.yml' that it has a test suite that can be run
>> with 'nosetests'.  Can you try overriding the check phase with one that
>> runs it?  That way we are likely to catch regressions early.
>
> Release tarball from pypi doesn't include test_clf.py.  So I pulled it
> from git master branch.  Almost all tests require internet connection.

Odd that this file would be taken out.  Anyway thanks for including it.
I wouldn't bother binding the package in a let for a variable that's
only used once as a native-input, but no strong opinion.  LGTM.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#29137; Package guix-patches. (Mon, 20 Nov 2017 06:34:02 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Marius Bakke <mbakke <at> fastmail.com>
Cc: Oleg Pykhalov <go.wigust <at> gmail.com>, 29137 <at> debbugs.gnu.org,
 29137-done <at> debbugs.gnu.org
Subject: Re: [bug#29137] [PATCH] gnu: Add python-clf.
Date: Mon, 20 Nov 2017 09:33:23 +0300
[Message part 1 (text/plain, inline)]
Hello Marius,

Marius Bakke <mbakke <at> fastmail.com> writes:

>> Release tarball from pypi doesn't include test_clf.py.  So I pulled it
>> from git master branch.  Almost all tests require internet connection.
>
> Odd that this file would be taken out.  Anyway thanks for including it.
> I wouldn't bother binding the package in a let for a variable that's
> only used once as a native-input, but no strong opinion.  LGTM.

OK, then I will finally add a dot at the end of the description and add
"https://" to synopsis url.

Pushed as 036f1eedcc46e50fda525a65eef5de1797ce4f4d

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

Reply sent to Oleg Pykhalov <go.wigust <at> gmail.com>:
You have taken responsibility. (Mon, 20 Nov 2017 06:34:02 GMT) Full text and rfc822 format available.

Notification sent to Oleg Pykhalov <go.wigust <at> gmail.com>:
bug acknowledged by developer. (Mon, 20 Nov 2017 06:34:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 18 Dec 2017 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 236 days ago.

Previous Next


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