GNU bug report logs - #59239
[PATCH] gnu: Add python-synapseclient.

Previous Next

Package: guix-patches;

Reported by: Mădălin Ionel Patrașcu <madalinionel.patrascu <at> mdc-berlin.de>

Date: Sun, 13 Nov 2022 05:44:02 UTC

Severity: normal

Tags: moreinfo, patch

To reply to this bug, email your comments to 59239 AT debbugs.gnu.org.

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

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


Report forwarded to rekado <at> elephly.net, guix-patches <at> gnu.org:
bug#59239; Package guix-patches. (Sun, 13 Nov 2022 05:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mădălin Ionel Patrașcu <madalinionel.patrascu <at> mdc-berlin.de>:
New bug report received and forwarded. Copy sent to rekado <at> elephly.net, guix-patches <at> gnu.org. (Sun, 13 Nov 2022 05:44:02 GMT) Full text and rfc822 format available.

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

From: Mădălin Ionel Patrașcu
 <madalinionel.patrascu <at> mdc-berlin.de>
To: <guix-patches <at> gnu.org>
Subject: [PATCH] gnu: Add python-synapseclient.
Date: Sun, 13 Nov 2022 06:43:08 +0100
* gnu/packages/python-xyz.scm (python-synapseclient): New variable.
---
 gnu/packages/python-xyz.scm | 60 +++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e26656fa32..b599a2e4ed 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10383,6 +10383,66 @@ (define-public python-sympy
 as possible in order to be comprehensible and easily extensible.")
     (license license:bsd-3)))
 
+(define-public python-synapseclient
+  (package
+    (name "python-synapseclient")
+    (version "2.7.0")
+    (source (origin
+              ;; git version contains tests
+              (method git-fetch)
+              (uri (git-reference
+                    (url
+                     "https://github.com/Sage-Bionetworks/synapsePythonClient")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0v2yyjpmxlxmbn1xbxzx1l1bs45ir9p4i51dlf847irnrrmifxcd"))))
+              ;;(method url-fetch)
+              ;;(uri (pypi-uri "synapseclient" version))
+              ;;(sha256
+              ;; (base32
+              ;;  "1g2n5bbq5vkvprk4ap3sbz2q39cjwl8igy3krlskg34c1q7if7r4"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'relax-version-requirements
+           (lambda _
+             (substitute* "setup.py"
+               (("keyring>=15,<23\\.5") "keyring>=15")
+               (("keyrings\\.alt==3\\.1") "keyrings.alt>=3.1"))))
+         (add-before 'build 'set-homeless-shelter
+           (lambda _
+             ;; could not create '/homeless-shelter': Permission denied
+             (setenv "HOME" "/tmp")))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               ;; these tests require server authentification  SynapseNoCredentialsError
+               (delete-file-recursively "tests/integration/synapseclient")
+               (delete-file-recursively "tests/integration/synapseutils")
+               (invoke "pytest")))))))
+    (propagated-inputs
+     (list python-deprecated
+           python-keyring
+           python-keyrings.alt
+           python-requests))
+    (native-inputs
+     (list python-boto3
+           python-flake8-3.8
+           python-pandas
+           python-psutil
+           python-pytest
+           python-pytest-mock
+           python-pytest-xdist-next))
+    (home-page "https://www.synapse.org")
+    (synopsis "Client for Synapse, a collaborative compute space")
+    (description
+     "This package provides a client for @code{Synapse}, a collaborative compute
+space that allows scientists to share and analyze data together.")
+    (license license:asl2.0)))
+
 (define-public python-q
   (package
     (name "python-q")

base-commit: c4025af8c11c3e9ea0c2747b6c475c916fb61d80
-- 
2.38.1





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

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

From: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
To: 59239 <at> debbugs.gnu.org
Subject: [PATCH] gnu: Add python-synapseclient.
Date: Thu, 17 Nov 2022 11:14:52 +0100
Hi Mandalin,

I think there are some leftovers included in the patch:
https://issues.guix.gnu.org/59239#0-lineno29

~Jonathan




Information forwarded to guix-patches <at> gnu.org:
bug#59239; Package guix-patches. (Thu, 17 Nov 2022 11:29:01 GMT) Full text and rfc822 format available.

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

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Mădălin Ionel Patrașcu
 <madalinionel.patrascu <at> mdc-berlin.de>
Cc: 59239 <at> debbugs.gnu.org
Subject: Re: [bug#59239] [PATCH] gnu: Add python-synapseclient.
Date: Thu, 17 Nov 2022 12:24:27 +0100
Hi Mădălin,

> * gnu/packages/python-xyz.scm (python-synapseclient): New variable.
[…]

> +              ;;(method url-fetch)
> +              ;;(uri (pypi-uri "synapseclient" version))
> +              ;;(sha256
> +              ;; (base32
> +              ;;  "1g2n5bbq5vkvprk4ap3sbz2q39cjwl8igy3krlskg34c1q7if7r4"))))

Please remove this commented code.

> +    (build-system python-build-system)
> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'relax-version-requirements
> +           (lambda _
> +             (substitute* "setup.py"
> +               (("keyring>=15,<23\\.5") "keyring>=15")

Is this really a good idea?  Upper bounds usually exist for a reason.
We currently have version 23.9.  Can you please clear this with upstream
first?

> +               (("keyrings\\.alt==3\\.1") "keyrings.alt>=3.1"))))
> +         (add-before 'build 'set-homeless-shelter
> +           (lambda _
> +             ;; could not create '/homeless-shelter': Permission denied
> +             (setenv "HOME" "/tmp")))

We’re setting HOME, not homeless-shelter.

> +         (replace 'check
> +           (lambda* (#:key tests? #:allow-other-keys)
> +             (when tests?
> +               ;; these tests require server authentification  SynapseNoCredentialsError
> +               (delete-file-recursively "tests/integration/synapseclient")
> +               (delete-file-recursively "tests/integration/synapseutils")
> +               (invoke "pytest")))))))

typo: “authentication”.  What exactly does this error mean?  Does it
talk to the internet?  How are these tests supposed to be run?

Is it possible to disable these tests with an option to pytest?  That
would seem better than conditionally deleting them.

Finally, I think the test files should be deleted unconditionally, so
that “tests?” only governs whether the tests are *run* instead of also
causing other side effects.

-- 
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#59239; Package guix-patches. (Tue, 21 Mar 2023 13:07:01 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 59239 <at> debbugs.gnu.org,
 Mădălin Ionel Patrașcu
 <madalinionel.patrascu <at> mdc-berlin.de>
Subject: Re: bug#59239: [PATCH] gnu: Add python-synapseclient.
Date: Tue, 21 Mar 2023 09:06:09 -0400
Hello Mădălin,

Ricardo Wurmus <rekado <at> elephly.net> writes:

> Hi Mădălin,
>
>> * gnu/packages/python-xyz.scm (python-synapseclient): New variable.
> […]
>
>> +              ;;(method url-fetch)
>> +              ;;(uri (pypi-uri "synapseclient" version))
>> +              ;;(sha256
>> +              ;; (base32
>> +              ;;  "1g2n5bbq5vkvprk4ap3sbz2q39cjwl8igy3krlskg34c1q7if7r4"))))
>
> Please remove this commented code.
>
>> +    (build-system python-build-system)
>> +    (arguments
>> +     '(#:phases
>> +       (modify-phases %standard-phases
>> +         (add-after 'unpack 'relax-version-requirements
>> +           (lambda _
>> +             (substitute* "setup.py"
>> +               (("keyring>=15,<23\\.5") "keyring>=15")
>
> Is this really a good idea?  Upper bounds usually exist for a reason.
> We currently have version 23.9.  Can you please clear this with upstream
> first?
>
>> +               (("keyrings\\.alt==3\\.1") "keyrings.alt>=3.1"))))
>> +         (add-before 'build 'set-homeless-shelter
>> +           (lambda _
>> +             ;; could not create '/homeless-shelter': Permission denied
>> +             (setenv "HOME" "/tmp")))
>
> We’re setting HOME, not homeless-shelter.
>
>> +         (replace 'check
>> +           (lambda* (#:key tests? #:allow-other-keys)
>> +             (when tests?
>> +               ;; these tests require server authentification  SynapseNoCredentialsError
>> +               (delete-file-recursively "tests/integration/synapseclient")
>> +               (delete-file-recursively "tests/integration/synapseutils")
>> +               (invoke "pytest")))))))
>
> typo: “authentication”.  What exactly does this error mean?  Does it
> talk to the internet?  How are these tests supposed to be run?
>
> Is it possible to disable these tests with an option to pytest?  That
> would seem better than conditionally deleting them.
>
> Finally, I think the test files should be deleted unconditionally, so
> that “tests?” only governs whether the tests are *run* instead of also
> causing other side effects.

Genle ping.  Could you please send a v2 with the above suggested
changes?

-- 
Thanks,
Maxim




Added tag(s) moreinfo. Request was from Maxim Cournoyer <maxim.cournoyer <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 21 Mar 2023 19:52:01 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 85 days ago.

Previous Next


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