Add python-sparse, Update python-cooler

  • Done
  • quality assurance status badge
Details
4 participants
  • Mădălin Ionel Patrașcu
  • Maxime Devos
  • Ricardo Wurmus
  • zimoun
Owner
unassigned
Submitted by
Mădălin Ionel Patrașcu
Severity
normal

Debbugs page

Mădălin Ionel Patrașcu wrote 4 years ago
(no subject)
(address . guix-patches@gnu.org)
76dfa82e-53e2-c4fc-d002-df71f348cdc8@mdc-berlin.de

Mădălin Ionel Patrașcu wrote 4 years ago
[PATCH 1/2] gnu: Add python-sparse.
(address . 46955@debbugs.gnu.org)(address . rekado@elephly.net)(name . Mădălin Ionel Patrașcu)(address . madalinionel.patrascu@mdc-berlin.de)
20210306005703.25479-1-madalinionel.patrascu@mdc-berlin.de
* gnu/packages/python-xyz.scm (python-sparse): New variable.
---
gnu/packages/python-xyz.scm | 41 ++++++++++++++++++++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)

Toggle diff (61 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index fbc9ad688d..b5274c39a9 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -67,7 +67,7 @@
;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
-;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
+;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
@@ -4719,6 +4719,45 @@ objects.")
(define-public python2-colormath
(package-with-python2 python-colormath))
+(define-public python-sparse
+ (package
+ (name "python-sparse")
+ (version "0.11.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "sparse" version))
+ (sha256
+ (base32
+ "0kw6ha83gk0dymayrxhh16xxk7aykiyiz3ksxdzj6hhjr3dkap5w"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-numba" ,python-numba)
+ ("python-numpy" ,python-numpy)
+ ("python-scipy" ,python-scipy)))
+ (native-inputs
+ `(("python-dask" ,python-dask)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-black" ,python-pytest-black)
+ ("python-pytest-cov" ,python-pytest-cov)))
+ (home-page "https://github.com/pydata/sparse/")
+ (synopsis "Library for multi-dimensional sparse arrays")
+ (description
+ "This package implements sparse arrays of arbitrary dimension on top of
+@code{numpy} and @code{scipy.sparse}. Sparse array is a matrix in which most
+of the elements are zero. @code{python-sparse} generalizes the
+@code{scipy.sparse.coo_matrix} and @code{scipy.sparse.dok_matrix} layouts, but
+extends beyond just rows and columns to an arbitrary number of dimensions.
+Additionally, this project maintains compatibility with the
+@code{numpy.ndarray} interface rather than the @code{numpy.matrix} interface
+used in @code{scipy.sparse}. These differences make this project useful in
+certain situations where @code{scipy.sparse} matrices are not well suited, but
+it should not be considered a full replacement. It lacks layouts that are not
+easily generalized like @dfn{compressed sparse row/column}(CSR/CSC) and
+depends on @code{scipy.sparse} for some computations.")
+ ;;https://github.com/pydata/sparse/blob/master/LICENSE
+ (license license:bsd-3)))
+
(define-public python-spectra
(package
(name "python-spectra")
--
2.30.1
Mădălin Ionel Patrașcu wrote 4 years ago
[PATCH 2/2] gnu: python-cooler: Update to 0.8.10.
(address . 46955@debbugs.gnu.org)(address . rekado@elephly.net)(name . Mădălin Ionel Patrașcu)(address . madalinionel.patrascu@mdc-berlin.de)
20210306005703.25479-2-madalinionel.patrascu@mdc-berlin.de
* gnu/packages/bioinformatics.scm (python-cooler): Update to 0.8.10/
---
gnu/packages/bioinformatics.scm | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)

Toggle diff (54 lines)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 6d21e14360..bc31d50e54 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -13636,35 +13636,38 @@ fasta subsequences.")
(define-public python-cooler
(package
(name "python-cooler")
- (version "0.8.7")
+ (version "0.8.10")
(source
(origin
(method url-fetch)
(uri (pypi-uri "cooler" version))
(sha256
(base32
- "01g6gqix9ba27sappz6nfyiwabzrlf8i5fn8kwcz8ra356cq9crp"))))
+ "1hi9anwz8b9p9wigzc5hypnwm6a4ikvlv69ixy3ki8939ngb1sj3"))))
(build-system python-build-system)
(propagated-inputs
`(("python-asciitree" ,python-asciitree)
- ("python-biopython" ,python-biopython)
("python-click" ,python-click)
("python-cytoolz" ,python-cytoolz)
- ("python-dask" ,python-dask)
("python-h5py" ,python-h5py)
("python-multiprocess" ,python-multiprocess)
("python-numpy" ,python-numpy)
("python-pandas" ,python-pandas)
("python-pyfaidx" ,python-pyfaidx)
("python-pypairix" ,python-pypairix)
- ("python-pysam" ,python-pysam)
("python-pyyaml" ,python-pyyaml)
("python-scipy" ,python-scipy)
- ("python-simplejson" ,python-simplejson)))
+ ("python-simplejson" ,python-simplejson)
+ ("python-six" ,python-six)))
(native-inputs
- `(("python-mock" ,python-mock)
- ("python-pytest" ,python-pytest)))
- (home-page "https://github.com/mirnylab/cooler")
+ `(("python-codecov" ,python-codecov)
+ ("python-dask" ,python-dask) ;;unittest.runner.TextTestResult
+ ("python-mock" ,python-mock)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,python-pytest-cov)
+ ("python-pytest-flake8" ,python-pytest-flake8)
+ ("python-sparse" ,python-sparse))) ;;unittest.runner.TextTestResult
+ (home-page "https://github.com/open2c/cooler")
(synopsis "Sparse binary format for genomic interaction matrices")
(description
"Cooler is a support library for a sparse, compressed, binary persistent
--
2.30.1
zimoun wrote 4 years ago
control message for bug #46955
(address . control@debbugs.gnu.org)
867dlxi6nn.fsf@gmail.com
retitle 46955 Add python-sparse, Update python-cooler
quit
Ricardo Wurmus wrote 4 years ago
Re: [PATCH 1/2] gnu: Add python-sparse.
(name . Mădălin Ionel Patrașcu)(address . madalinionel.patrascu@mdc-berlin.de)(address . 46955@debbugs.gnu.org)
878s622gc5.fsf@elephly.net
Hi Mădălin,

Toggle quote (2 lines)
> * gnu/packages/python-xyz.scm (python-sparse): New variable.

Thanks for the patch!

Toggle quote (6 lines)
> + (native-inputs
> + `(("python-dask" ,python-dask)
> + ("python-pytest" ,python-pytest)
> + ("python-pytest-black" ,python-pytest-black)
> + ("python-pytest-cov" ,python-pytest-cov)))

In spite of the addition of all these test inputs the test suite is not
run:

Toggle snippet (25 lines)
starting phase `check'
running "python setup.py" with command "test" and parameters ()
['numpy', 'scipy>=0.19', 'numba>=0.49']
['numpy', 'scipy>=0.19', 'numba>=0.49']
running test
running egg_info
writing sparse.egg-info/PKG-INFO
writing dependency_links to sparse.egg-info/dependency_links.txt
writing entry points to sparse.egg-info/entry_points.txt
writing requirements to sparse.egg-info/requires.txt
writing top-level names to sparse.egg-info/top_level.txt
reading manifest file 'sparse.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.html' under directory 'sparse'
no previously-included directories found matching 'docs/_build'
writing manifest file 'sparse.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
phase `check' succeeded after 1.5 seconds

Could you please take a look at this?

Toggle quote (3 lines)
> + (license license:bsd-3)))

No need to include this comment.

--
Ricardo
Ricardo Wurmus wrote 4 years ago
Re: [PATCH 2/2] gnu: python-cooler: Update to 0.8.10.
(name . Mădălin Ionel Patrașcu)(address . madalinionel.patrascu@mdc-berlin.de)(address . 46955@debbugs.gnu.org)
875z162ga9.fsf@elephly.net
Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de> writes:

Toggle quote (2 lines)
> * gnu/packages/bioinformatics.scm (python-cooler): Update to 0.8.10/

There’s a typo (“/” instead of “.”) and the changes to the
propagated-inputs, native-inputs, and home-page fields are not listed.

Could you please add them to the commit message?

Thanks!

--
Ricardo
Ricardo Wurmus wrote 4 years ago
Re: [PATCH 1/2] gnu: Add python-sparse.
(name . Mădălin Ionel Patrașcu)(address . madalinionel.patrascu@mdc-berlin.de)(address . 46955@debbugs.gnu.org)
8735wa2g7t.fsf@elephly.net
Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de> writes:

Toggle quote (1 lines)
> * gnu/packages/python-xyz.scm (python-sparse): New variable.
[…]
Toggle quote (5 lines)
> +(define-public python-sparse
> + (package
> + (name "python-sparse")
> + (version "0.11.2")

“guix lint” tells me:

python-sparse@0.11.2: can be upgraded to 0.12.0

Is there a reason why you picked 0.11.2? (Or did I just wait too long
to review your patch…?)

--
Ricardo
Mădălin Ionel Patrașcu wrote 4 years ago
Re: [ext] bug#46955: Acknowledgement ((no subject))
(address . 46955@debbugs.gnu.org)(name . Rekado Wurmus)(address . rekado@elephly.net)
be458c24-9a87-8c38-41d5-74e5378cfa7a@mdc-berlin.de
Hi guys,


Sorry for the delay!


I read all of Ricardo's comments and I made some changes to these patches.

I will send a new round of patches after this message because after I
tried to run python tests for the cooler package there was a need for a
new dependency.

Here are some short answers to Ricardo's comments/questions:

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
phase `check' succeeded after 1.5 seconds
Toggle snippet (43 lines)
Could you please take a look at this?

I fixed that! Please check the new patch! Thanks!

“guix lint” tells me:

python-sparse <at> 0.11.2: can be upgraded to 0.12.0

Is there a reason why you picked 0.11.2? (Or did I just wait too long
to review your patch…?)

At that time only version 0.11.2 was available.


All the best

     Mădălin!


On 06.03.2021 01:55, GNU bug Tracking System wrote:
> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
> guix-patches@gnu.org
>
> If you wish to submit further information on this problem, please
> send it to 46955@debbugs.gnu.org.
>
> Please do not send mail to help-debbugs@gnu.org unless you wish
> to report a problem with the Bug-tracking system.
>
--
System Administrator
Bioinformatics and Omics Data Science
BIMSB - MDC
Attachment: file
Mădălin Ionel Patrașcu wrote 4 years ago
[PATCH 1/3] gnu: Add python-sparse.
(address . 46955@debbugs.gnu.org)(address . rekado@elephly.net)(name . Mădălin Ionel Patrașcu)(address . madalinionel.patrascu@mdc-berlin.de)
20210603232503.29253-1-madalinionel.patrascu@mdc-berlin.de
* gnu/packages/python-xyz.scm(python-sparse): New variable.
---
gnu/packages/python-xyz.scm | 48 ++++++++++++++++++++++++++++++++++++-
1 file changed, 47 insertions(+), 1 deletion(-)

Toggle diff (68 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a5cc04edaf..35ce8d1cbe 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -67,7 +67,7 @@
;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
-;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
+;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
@@ -5132,6 +5132,52 @@ objects.")
(define-public python2-colormath
(package-with-python2 python-colormath))
+(define-public python-sparse
+ (package
+ (name "python-sparse")
+ (version "0.12.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "sparse" version))
+ (sha256
+ (base32
+ "05lmzckv69cvxavhdr36k803bgr5dl04cppglid1l880xswc759c"))))
+ (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 "pytest" "-vv")
+ #t)))))
+ (propagated-inputs
+ `(("python-numba" ,python-numba)
+ ("python-numpy" ,python-numpy)
+ ("python-scipy" ,python-scipy)))
+ (native-inputs
+ `(("python-dask" ,python-dask)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-black" ,python-pytest-black)
+ ("python-pytest-cov" ,python-pytest-cov)))
+ (home-page "https://github.com/pydata/sparse/")
+ (synopsis "Library for multi-dimensional sparse arrays")
+ (description
+ "This package implements sparse arrays of arbitrary dimension on top of
+@code{numpy} and @code{scipy.sparse}. Sparse array is a matrix in which most
+of the elements are zero. @code{python-sparse} generalizes the
+@code{scipy.sparse.coo_matrix} and @code{scipy.sparse.dok_matrix} layouts, but
+extends beyond just rows and columns to an arbitrary number of dimensions.
+Additionally, this project maintains compatibility with the
+@code{numpy.ndarray} interface rather than the @code{numpy.matrix} interface
+used in @code{scipy.sparse}. These differences make this project useful in
+certain situations where @code{scipy.sparse} matrices are not well suited, but
+it should not be considered a full replacement. It lacks layouts that are not
+easily generalized like @dfn{compressed sparse row/column}(CSR/CSC) and
+depends on @code{scipy.sparse} for some computations.")
+ (license license:bsd-3)))
+
(define-public python-spectra
(package
(name "python-spectra")
--
2.31.1
Mădălin Ionel Patrașcu wrote 4 years ago
[PATCH 2/3] gnu: Add python-ipytree.
(address . 46955@debbugs.gnu.org)(address . rekado@elephly.net)(name . Mădălin Ionel Patrașcu)(address . madalinionel.patrascu@mdc-berlin.de)
20210603232503.29253-2-madalinionel.patrascu@mdc-berlin.de
* gnu/packages/python-xyz.scm (python-ipytree): New variable.
---
gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 35ce8d1cbe..f416e3a2a8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -7568,6 +7568,32 @@ away.")
(define-public python2-ipython-genutils
(package-with-python2 python-ipython-genutils))
+(define-public python-ipytree
+ (package
+ (name "python-ipytree")
+ (version "0.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "ipytree" version))
+ (sha256
+ (base32
+ "0ss64kxa4la50irf7vy3474f1p924pn4da5gmb02zvhn2x0pra2j"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (propagated-inputs
+ `(("python-ipywidgets" ,python-ipywidgets)
+ ("python-jupyter-packaging" ,python-jupyter-packaging)))
+ (home-page "https://github.com/martinRenou/ipytree")
+ (synopsis "Tree widget using jsTree and Jupyter-widgets")
+ (description
+ "This package provides the possibility to create a tree using
+@code{Jupyter-widgets} protocol and @code{jsTree}. @code{Jupyter-widgets} is a
+way to create an interactive @dfn{graphical user interface} (GUI) for a Jupyter
+notebook. @code{JsTree} is a jquery plugin, that provides interactive trees.")
+ (license license:expat)))
+
(define-public python-ipyparallel
(package
(name "python-ipyparallel")
--
2.31.1
Mădălin Ionel Patrașcu wrote 4 years ago
[PATCH 3/3] gnu: python-cooler: Update to 0.8.11.
(address . 46955@debbugs.gnu.org)(address . rekado@elephly.net)(name . Mădălin Ionel Patrașcu)(address . madalinionel.patrascu@mdc-berlin.de)
20210603232503.29253-3-madalinionel.patrascu@mdc-berlin.de
* gnu/packages/bioinformatics.scm (python-cooler): Update to 0.8.11.
---
gnu/packages/bioinformatics.scm | 39 ++++++++++++++++++++++++++++-----
1 file changed, 33 insertions(+), 6 deletions(-)

Toggle diff (67 lines)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 94d15cc4c0..55e25ab486 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -11591,15 +11591,35 @@ fasta subsequences.")
(define-public python-cooler
(package
(name "python-cooler")
- (version "0.8.7")
+ (version "0.8.11")
(source
(origin
(method url-fetch)
(uri (pypi-uri "cooler" version))
(sha256
(base32
- "01g6gqix9ba27sappz6nfyiwabzrlf8i5fn8kwcz8ra356cq9crp"))))
+ "1i96fmpsimj4wrx51rxn8lw2gqxf5a2pvrj5rwdd6ivnm3pmhyrn"))))
(build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-tests
+ (lambda _
+ (substitute* "tests/test_create.py"
+ (("def test_roundtrip")
+ (string-append "@pytest.mark.skip(reason=\"requires network "
+ "access to genome.ucsc.edu\")\n"
+ "def test_roundtrip")))
+ (substitute* "tests/test_util.py"
+ (("def test_fetch_chromsizes")
+ (string-append "@pytest.mark.skip(reason=\"requires network "
+ "access to genome.ucsc.edu\")\n"
+ "def test_fetch_chromsizes")))
+ #t))
+ (replace 'check
+ (lambda _
+ (invoke "python" "-m" "pytest" "-v")
+ #t)))))
(propagated-inputs
`(("python-asciitree" ,python-asciitree)
("python-biopython" ,python-biopython)
@@ -11615,11 +11635,18 @@ fasta subsequences.")
("python-pysam" ,python-pysam)
("python-pyyaml" ,python-pyyaml)
("python-scipy" ,python-scipy)
- ("python-simplejson" ,python-simplejson)))
+ ("python-simplejson" ,python-simplejson)
+ ("python-six" ,python-six)
+ ("python-sparse" ,python-sparse)))
(native-inputs
- `(("python-mock" ,python-mock)
- ("python-pytest" ,python-pytest)))
- (home-page "https://github.com/mirnylab/cooler")
+ `(("python-codecov" ,python-codecov)
+ ("python-ipytree" ,python-ipytree)
+ ("python-mock" ,python-mock)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,python-pytest-cov)
+ ("python-pytest-flake8" ,python-pytest-flake8)))
+ ;;almost all the projects of the Mirnylab are moved under Open2C umbrella
+ (home-page "https://github.com/open2c/cooler")
(synopsis "Sparse binary format for genomic interaction matrices")
(description
"Cooler is a support library for a sparse, compressed, binary persistent
--
2.31.1
Maxime Devos wrote 4 years ago
(name . Mădălin Ionel Patrașcu)(address . madalinionel.patrascu@mdc-berlin.de)(address . 46955@debbugs.gnu.org)(address . rekado@elephly.net)
7c35e0fff0b83ca112cbeda0f6a391536fb2abf8.camel@telenet.be
A comment about a build phase.

Toggle quote (6 lines)
> [...]
> + (replace 'check
> + (lambda _
> + (invoke "python" "-m" "pytest" "-v")
> + #t)))))

This needs to be something like

+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "pytest" "-v"))))

By respecting 'tests?', the --without-tests build transformation can be used.
(Try "guix build python-cooler --without-tests=python-cooler").
This can also be important for cross-compilation (dunno if it applies here
though).

Trailing #t are not required anymore. The warning that results if it is removed
will disappear once core-updates is merged.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYLtMiRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qu1AP9vu8FgJvMl2eMkKjz3nIjdTEY7
J53G6QcOEn+ZYizsvwEA0aRfzmo6PvNgzyCJfZI14/PejpSO8kB/3G4/U3tPIg0=
=YCXP
-----END PGP SIGNATURE-----


Mădălin Ionel Patrașcu wrote 4 years ago
(address . 46955@debbugs.gnu.org)(address . rekado@elephly.net)(name . Maxime Devos)(address . maximedevos@telenet.be)
5ec8d2b3-811a-013b-28db-6e79b6d2b556@mdc-berlin.de
Hi Maxime,


Thanks for the explanation, now these things are clear to me!

I applied Maxime's advice and I have made some changes on two patches
(python-sparse and python-cooler). Because of this reason, I will send
again the whole series of patches and I will wait for a full review of them.

Thanks, Maxime!

On 05.06.2021 12:06, Maxime Devos wrote:
Toggle quote (25 lines)
> A comment about a build phase.
>
>> [...]
>> + (replace 'check
>> + (lambda _
>> + (invoke "python" "-m" "pytest" "-v")
>> + #t)))))
> This needs to be something like
>
> + (replace 'check
> + (lambda* (#:key tests? #:allow-other-keys)
> + (when tests?
> + (invoke "python" "-m" "pytest" "-v"))))
>
> By respecting 'tests?', the --without-tests build transformation can be used.
> (Try "guix build python-cooler --without-tests=python-cooler").
> This can also be important for cross-compilation (dunno if it applies here
> though).
>
> Trailing #t are not required anymore. The warning that results if it is removed
> will disappear once core-updates is merged.
>
> Greetings,
> Maxime.

--
System Administrator
Bioinformatics and Omics Data Science
BIMSB - MDC
Mădălin Ionel Patrașcu wrote 4 years ago
[PATCH 1/3] gnu: Add python-sparse.
(address . 46955@debbugs.gnu.org)(address . rekado@elephly.net)(name . Mădălin Ionel Patrașcu)(address . madalinionel.patrascu@mdc-berlin.de)
20210606000651.28252-1-madalinionel.patrascu@mdc-berlin.de
* gnu/packages/python-xyz.scm(python-sparse): New variable.
---
gnu/packages/python-xyz.scm | 47 ++++++++++++++++++++++++++++++++++++-
1 file changed, 46 insertions(+), 1 deletion(-)

Toggle diff (67 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b63c2852d5..a4fe31a01f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -67,7 +67,7 @@
;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
-;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
+;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
@@ -5147,6 +5147,51 @@ objects.")
(define-public python2-colormath
(package-with-python2 python-colormath))
+(define-public python-sparse
+ (package
+ (name "python-sparse")
+ (version "0.12.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "sparse" version))
+ (sha256
+ (base32
+ "05lmzckv69cvxavhdr36k803bgr5dl04cppglid1l880xswc759c"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "pytest" "-v")))))))
+ (propagated-inputs
+ `(("python-numba" ,python-numba)
+ ("python-numpy" ,python-numpy)
+ ("python-scipy" ,python-scipy)))
+ (native-inputs
+ `(("python-dask" ,python-dask)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-black" ,python-pytest-black)
+ ("python-pytest-cov" ,python-pytest-cov)))
+ (home-page "https://github.com/pydata/sparse/")
+ (synopsis "Library for multi-dimensional sparse arrays")
+ (description
+ "This package implements sparse arrays of arbitrary dimension on top of
+@code{numpy} and @code{scipy.sparse}. Sparse array is a matrix in which most
+of the elements are zero. @code{python-sparse} generalizes the
+@code{scipy.sparse.coo_matrix} and @code{scipy.sparse.dok_matrix} layouts, but
+extends beyond just rows and columns to an arbitrary number of dimensions.
+Additionally, this project maintains compatibility with the
+@code{numpy.ndarray} interface rather than the @code{numpy.matrix} interface
+used in @code{scipy.sparse}. These differences make this project useful in
+certain situations where @code{scipy.sparse} matrices are not well suited, but
+it should not be considered a full replacement. It lacks layouts that are not
+easily generalized like @dfn{compressed sparse row/column}(CSR/CSC) and
+depends on @code{scipy.sparse} for some computations.")
+ (license license:bsd-3)))
+
(define-public python-spectra
(package
(name "python-spectra")
--
2.31.1
Mădălin Ionel Patrașcu wrote 4 years ago
[PATCH 2/3] gnu: Add python-ipytree.
(address . 46955@debbugs.gnu.org)(address . rekado@elephly.net)(name . Mădălin Ionel Patrașcu)(address . madalinionel.patrascu@mdc-berlin.de)
20210606000651.28252-2-madalinionel.patrascu@mdc-berlin.de
* gnu/packages/python-xyz.scm (python-ipytree): New variable.
---
gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a4fe31a01f..8ee43b1176 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -7582,6 +7582,32 @@ away.")
(define-public python2-ipython-genutils
(package-with-python2 python-ipython-genutils))
+(define-public python-ipytree
+ (package
+ (name "python-ipytree")
+ (version "0.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "ipytree" version))
+ (sha256
+ (base32
+ "0ss64kxa4la50irf7vy3474f1p924pn4da5gmb02zvhn2x0pra2j"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (propagated-inputs
+ `(("python-ipywidgets" ,python-ipywidgets)
+ ("python-jupyter-packaging" ,python-jupyter-packaging)))
+ (home-page "https://github.com/martinRenou/ipytree")
+ (synopsis "Tree widget using jsTree and Jupyter-widgets")
+ (description
+ "This package provides the possibility to create a tree using
+@code{Jupyter-widgets} protocol and @code{jsTree}. @code{Jupyter-widgets} is a
+way to create an interactive @dfn{graphical user interface} (GUI) for a Jupyter
+notebook. @code{JsTree} is a jquery plugin, that provides interactive trees.")
+ (license license:expat)))
+
(define-public python-ipyparallel
(package
(name "python-ipyparallel")
--
2.31.1
Mădălin Ionel Patrașcu wrote 4 years ago
[PATCH 3/3] gnu: python-cooler: Update to 0.8.11.
(address . 46955@debbugs.gnu.org)(address . rekado@elephly.net)(name . Mădălin Ionel Patrașcu)(address . madalinionel.patrascu@mdc-berlin.de)
20210606000651.28252-3-madalinionel.patrascu@mdc-berlin.de
* gnu/packages/bioinformatics.scm (python-cooler): Update to 0.8.11.
---
gnu/packages/bioinformatics.scm | 38 +++++++++++++++++++++++++++------
1 file changed, 32 insertions(+), 6 deletions(-)

Toggle diff (66 lines)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index dab097381a..988f663ceb 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -11717,15 +11717,34 @@ fasta subsequences.")
(define-public python-cooler
(package
(name "python-cooler")
- (version "0.8.7")
+ (version "0.8.11")
(source
(origin
(method url-fetch)
(uri (pypi-uri "cooler" version))
(sha256
(base32
- "01g6gqix9ba27sappz6nfyiwabzrlf8i5fn8kwcz8ra356cq9crp"))))
+ "1i96fmpsimj4wrx51rxn8lw2gqxf5a2pvrj5rwdd6ivnm3pmhyrn"))))
(build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-tests
+ (lambda _
+ (substitute* "tests/test_create.py"
+ (("def test_roundtrip")
+ (string-append "@pytest.mark.skip(reason=\"requires network "
+ "access to genome.ucsc.edu\")\n"
+ "def test_roundtrip")))
+ (substitute* "tests/test_util.py"
+ (("def test_fetch_chromsizes")
+ (string-append "@pytest.mark.skip(reason=\"requires network "
+ "access to genome.ucsc.edu\")\n"
+ "def test_fetch_chromsizes")))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "-m" "pytest" "-v")))))))
(propagated-inputs
`(("python-asciitree" ,python-asciitree)
("python-biopython" ,python-biopython)
@@ -11741,11 +11760,18 @@ fasta subsequences.")
("python-pysam" ,python-pysam)
("python-pyyaml" ,python-pyyaml)
("python-scipy" ,python-scipy)
- ("python-simplejson" ,python-simplejson)))
+ ("python-simplejson" ,python-simplejson)
+ ("python-six" ,python-six)
+ ("python-sparse" ,python-sparse)))
(native-inputs
- `(("python-mock" ,python-mock)
- ("python-pytest" ,python-pytest)))
- (home-page "https://github.com/mirnylab/cooler")
+ `(("python-codecov" ,python-codecov)
+ ("python-ipytree" ,python-ipytree)
+ ("python-mock" ,python-mock)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,python-pytest-cov)
+ ("python-pytest-flake8" ,python-pytest-flake8)))
+ ;;almost all the projects of the Mirnylab are moved under Open2C umbrella
+ (home-page "https://github.com/open2c/cooler")
(synopsis "Sparse binary format for genomic interaction matrices")
(description
"Cooler is a support library for a sparse, compressed, binary persistent
--
2.31.1
Ricardo Wurmus wrote 4 years ago
Re: [PATCH 2/3] gnu: Add python-ipytree.
(name . Mădălin Ionel Patrașcu)(address . madalinionel.patrascu@mdc-berlin.de)(address . 46955@debbugs.gnu.org)
87lf7ntstj.fsf@elephly.net
Hi Mădălin,

Toggle quote (2 lines)
> * gnu/packages/python-xyz.scm (python-ipytree): New variable.

ipytree contains minified JavaScript that should be built from
source instead. We can usually minify JavaScript sources with
esbuild.

Could you please check if the sources for all minified JavaScript
are included and then

1. delete all minified JavaScript in a source snippet
2. add a build phase to minify the JavaScript from readable source
code?

Thanks!

--
Ricardo
Ricardo Wurmus wrote 4 years ago
Re: [PATCH 3/3] gnu: python-cooler: Update to 0.8.11.
(name . Mădălin Ionel Patrașcu)(address . madalinionel.patrascu@mdc-berlin.de)(address . 46955-done@debbugs.gnu.org)
87im2rts7g.fsf@elephly.net
Hi Mădălin,

thanks for the patches!

Toggle quote (3 lines)
> * gnu/packages/bioinformatics.scm (python-cooler): Update to
> 0.8.11.

I changed the commit message to mention all changes, including
those in arguments, propagated-inputs, and native-inputs.

I disabled the one test that needs ipytree and removed ipytree
from the inputs.

Pushed to the “master” branch with commit d1e7b50dbf (except
ipytree).

(One more thing: please send updated patches with “git
format-patch -v2” (or “git send-email -v2”), so that we can
distinguish different versions of patch series automatically and
download them in one batch.)

--
Ricardo
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 46955@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 46955
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help