From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?G=C3=A1bor_Boskovits?= Subject: Re: [External] Re: New outreachy participant introduction Date: Wed, 16 Oct 2019 10:00:14 +0200 Message-ID: References: <1570119118548.1674@iu.edu> <1570504991415.84097@iu.edu> <87a7abag1z.fsf@cbaines.net> <1570927278147.77440@iu.edu> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000008f19fd0595027e5a" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:42314) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKeEU-0008Ax-4N for guix-devel@gnu.org; Wed, 16 Oct 2019 04:00:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKeER-0006qE-J2 for guix-devel@gnu.org; Wed, 16 Oct 2019 04:00:34 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:37112) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iKeER-0006o5-68 for guix-devel@gnu.org; Wed, 16 Oct 2019 04:00:31 -0400 Received: by mail-ed1-x52d.google.com with SMTP id r4so20552970edy.4 for ; Wed, 16 Oct 2019 01:00:30 -0700 (PDT) In-Reply-To: <1570927278147.77440@iu.edu> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: "Asfaw, Nardos" Cc: Guix Devel --0000000000008f19fd0595027e5a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Nardos, We have not heard from you for a while. Should you need any help, please feel free to reach out to us. Asfaw, Nardos ezt =C3=ADrta (id=C5=91pont: 2019. okt. 13., = Vas 2:41): > Thank you Zimon. > > This has been very helpful. > ________________________________________ > From: zimoun > Sent: Tuesday, October 8, 2019 9:24 AM > To: Christopher Baines > Cc: Asfaw, Nardos; Guix Devel > Subject: Re: [External] Re: New outreachy participant introduction > > Hi Nardos, > > Welcome ! :-) > > > On Tue, 8 Oct 2019 at 08:48, Christopher Baines wrote: > > > One good starting point would be an importer, there are a set of > > importers included in Guix that take a package definition from somewher= e > > else (like the Python package index, or Rubygems) and try to generate a > > Guix package definition. If you're familiar with some packages from one > > of the collections with a corresponding importer, that might be a good > > place to start. > > As an example, let consider packages from BioConductor [1] (mainly R > packages used in bioinformatics field). If I have right, then 2002 > packages are still missing in Guix, so there is materials. ;-) > > Well, let's pick one which is not packaged yet: zinbwave [2]. Then it is > easy: > > guix import cran -r -a bioconductor zinbwave > > This will download TAR archives and automatically compute the hash. It > corresponds to the manual: > > guix download > > https://bioconductor.org/packages/release/bioc/src/contrib/zinbwave_1.6.0= .tar.gz > > > [1] https://bioconductor.org/ > [2] https://bioconductor.org/packages/release/bioc/html/zinbwave.html > > > Moreover, the importer provides the definition of the package: > > --8<---------------cut here---------------start------------->8--- > (define-public r-zinbwave > (package > (name "r-zinbwave") > (version "1.6.0") > (source > (origin > (method url-fetch) > (uri (bioconductor-uri "zinbwave" version)) > (sha256 > (base32 > "187r7l9jf2q74qaqx63df5zx6iphmvl817448balvfv9vqyhrp2j")))) > (properties `((upstream-name . "zinbwave"))) > (build-system r-build-system) > (propagated-inputs > `(("r-biocparallel" ,r-biocparallel) > ("r-copula" ,r-copula) > ("r-edger" ,r-edger) > ("r-genefilter" ,r-genefilter) > ("r-glmnet" ,r-glmnet) > ("r-matrix" ,r-matrix) > ("r-singlecellexperiment" > ,r-singlecellexperiment) > ("r-softimpute" ,r-softimpute) > ("r-summarizedexperiment" > ,r-summarizedexperiment))) > (home-page > "https://bioconductor.org/packages/zinbwave") > (synopsis > "Zero-Inflated Negative Binomial Model for RNA-Seq Data") > (description > " Implements a general and flexible zero-inflated negative > binomial model that can be used to provide a low-dimensional > representations of single-cell RNA-seq data. The model accounts for > zero inflation (dropouts), over-dispersion, and the count nature of > the data. The model also accounts for the difference in library sizes > and optionally for batch effects and/or other covariates, avoiding the > need for pre-normalize the data.") > (license artistic2.0))) > --8<---------------cut here---------------end--------------->8--- > > In the propagated input, you can see the package `r-copula` which is > not yet packaged neither. But, the nice option --recursive does the > job for you and it also gives you the package definition. > > Now, let add them to the Guix source. Clone the repo and go in the > folder. The command: > > guix environment guix > > will download the dependencies to build Guix and setup all the > variables correctly. Well, refer to the documentation to compile Guix > from source. Basically: > > ./bootstrap > ./configure --localstatedir=3D/var > make > > Now, you can run this version with ./pre-inst-env, for example: > > ./pre-inst-env guix describe > > > Well, ready to add one package! For example, add `r-copula` to the > file gnu/package/cran.scm then recompile with make. Check if it is ok: > > ./pre-inst-env guile show r-copula > > Ouch! `r-psline` is missing so let also add it (the definition was > provided by the importer), run make again. Now "./pre-inst-env guix > show r-copula" should work. > Add the package definition of zinbwave to the file > gnu/package/bioconductor.scm. > > Let build them: > > ./pre-inst-env guix build r-zinbwave > > and time to breath. ;-) > > > If something fails, try to investigate by yourself and do not hesitate > to ask advices or help. > If everything is ok, the package still needs some polishing: synopsis, > description, indentation, etc and really important: check the license > field. > > The next step is to commit the changes. In this case, three commits > (one per package) seem nice. Give a look to previous commits as > example of commit message (ChangeLog format, etc.). Now, it is time to > prepare the submission: > > git format-patch --cover-letter - o patches master > > this will create the 3 patches in the folder patches/ and one cover > letter. Edit the cover letter to describe what the patches are about > then submit it to the bug tracker: > > git send-email --to=3Dguix-patches@gnu.org patches/0000-cover-letter.pa= tch > > Wait the answer to the bug tracker. > You should receive an email (if your .gitconfig is ok) with the bug > number. Last submit the patches: > > git send-email --to=3DABCDEF@debbugs.gnu.org patches/000{1,2,3}-* > > where ABCDEF is the bug number. > > > > Well, if you need some inspiration to find unpackaged tools from > BioConductor: > > wget https://git.bioconductor.org -qO - | sed -ne > '/packages\/[a-zA-Z]/{s,^.*R.*packages/,,p}' > bioc_manifest > ./pre-inst-env guile --no-auto-compile missing-bioconductor.scm > bioc_manifest > > where the file `missing-bioconductor.scm` is given by: > > --8<---------------cut here---------------start------------->8--- > (use-modules ((guix import utils) #:select (guix-name)) > (gnu packages) > (srfi srfi-1) ;lists > (ice-9 textual-ports)) > > (define (fetch-names manifest) > "Return a list of strings, each corresponding to a name from the > input file MANIFEST." > (call-with-input-file manifest > (lambda (port) > (let loop ((lines '()) > (line (get-line port))) > (if (eof-object? line) > (reverse lines) > (loop (cons line lines) > (get-line port))))))) > > ;;; Start! > > (map (lambda (name) > (when (null? (find-packages-by-name (guix-name "r-" name))) > (begin > (display name) > (newline)))) > (fetch-names (cadr (command-line)))) > > ;; wget https://git.bioconductor.org -qO - | sed -ne > '/packages\/[a-zA-Z]/{s,^.*R.*packages/,,p}' > bioc_manifest > ;; ./pre-inst-env guile --no-auto-compile missing-bioconductor.scm > bioc_manifest > --8<---------------cut here---------------end--------------->8--- > > > Hope that help. > > All the best, > simon > > --0000000000008f19fd0595027e5a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Nardos,

We have not heard from you for a while. Should you need any help, please = feel free to reach out to us.

Asfaw, Nardos <nasfaw@iu.edu> ezt =C3=ADrta (id=C5=91pont: 2019. okt. 13= ., Vas 2:41):
Thank you Zimon.

This has been very helpful.
________________________________________
From: zimoun <zimon.toutoune@gmail.com>
Sent: Tuesday, October 8, 2019 9:24 AM
To: Christopher Baines
Cc: Asfaw, Nardos; Guix Devel
Subject: Re: [External] Re: New outreachy participant introduction

Hi Nardos,

Welcome ! :-)


On Tue, 8 Oct 2019 at 08:48, Christopher Baines <mail@cbaines.net> = wrote:

> One good starting point would be an importer, there are a set of
> importers included in Guix that take a package definition from somewhe= re
> else (like the Python package index, or Rubygems) and try to generate = a
> Guix package definition. If you're familiar with some packages fro= m one
> of the collections with a corresponding importer, that might be a good=
> place to start.

As an example, let consider packages from BioConductor [1] (mainly R
packages used in bioinformatics field). If I have right, then 2002
packages are still missing in Guix, so there is materials. ;-)

Well, let's pick one which is not packaged yet: zinbwave [2]. Then it i= s easy:

=C2=A0 guix import cran -r -a bioconductor zinbwave

This will download TAR archives and automatically compute the hash. It
corresponds to the manual:

=C2=A0 guix download
https://b= ioconductor.org/packages/release/bioc/src/contrib/zinbwave_1.6.0.tar.gz=


[1] https://bioconductor.org/
[2] https://bioconductor= .org/packages/release/bioc/html/zinbwave.html


Moreover, the importer provides the definition of the package:

--8<---------------cut here---------------start------------->8---
(define-public r-zinbwave
=C2=A0 (package
=C2=A0 =C2=A0 (name "r-zinbwave")
=C2=A0 =C2=A0 (version "1.6.0")
=C2=A0 =C2=A0 (source
=C2=A0 =C2=A0 =C2=A0 (origin
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (method url-fetch)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (uri (bioconductor-uri "zinbwave" ver= sion))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (sha256
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (base32
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "187r7l9jf2q74qaqx63df5zx6ip= hmvl817448balvfv9vqyhrp2j"))))
=C2=A0 =C2=A0 (properties `((upstream-name . "zinbwave")))
=C2=A0 =C2=A0 (build-system r-build-system)
=C2=A0 =C2=A0 (propagated-inputs
=C2=A0 =C2=A0 =C2=A0 `(("r-biocparallel" ,r-biocparallel)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("r-copula" ,r-copula)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("r-edger" ,r-edger)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("r-genefilter" ,r-genefilter)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("r-glmnet" ,r-glmnet)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("r-matrix" ,r-matrix)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("r-singlecellexperiment"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0,r-singlecellexperiment)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("r-softimpute" ,r-softimpute)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("r-summarizedexperiment"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0,r-summarizedexperiment)))
=C2=A0 =C2=A0 (home-page
=C2=A0 =C2=A0 =C2=A0 "https://bioconductor= .org/packages/zinbwave")
=C2=A0 =C2=A0 (synopsis
=C2=A0 =C2=A0 =C2=A0 "Zero-Inflated Negative Binomial Model for RNA-Se= q Data")
=C2=A0 =C2=A0 (description
=C2=A0 =C2=A0 =C2=A0 " Implements a general and flexible zero-inflated= negative
binomial model that can be used to provide a low-dimensional
representations of single-cell RNA-seq data.=C2=A0 The model accounts for zero inflation (dropouts), over-dispersion, and the count nature of
the data.=C2=A0 The model also accounts for the difference in library sizes=
and optionally for batch effects and/or other covariates, avoiding the
need for pre-normalize the data.")
=C2=A0 =C2=A0 (license artistic2.0)))
--8<---------------cut here---------------end--------------->8---

In the propagated input, you can see the package `r-copula` which is
not yet packaged neither. But, the nice option --recursive does the
job for you and it also gives you the package definition.

Now, let add them to the Guix source. Clone the repo and go in the
folder. The command:

=C2=A0 guix environment guix

will download the dependencies to build Guix and setup all the
variables correctly. Well, refer to the documentation to compile Guix
from source. Basically:

=C2=A0 ./bootstrap
=C2=A0 ./configure --localstatedir=3D/var
=C2=A0 make

Now, you can run this version with ./pre-inst-env, for example:

=C2=A0 =C2=A0./pre-inst-env guix describe


Well, ready to add one package! For example, add `r-copula` to the
file gnu/package/cran.scm then recompile with make. Check if it is ok:

=C2=A0 ./pre-inst-env guile show r-copula

Ouch! `r-psline` is missing so let also add it (the definition was
provided by the importer), run make again. Now "./pre-inst-env guix show r-copula" should work.
Add the package definition of zinbwave to the file gnu/package/bioconductor= .scm.

Let build them:

=C2=A0 ./pre-inst-env guix build r-zinbwave

and time to breath. ;-)


If something fails, try to investigate by yourself and do not hesitate
to ask advices or help.
If everything is ok, the package still needs some polishing: synopsis,
description, indentation, etc and really important: check the license
field.

The next step is to commit the changes. In this case, three commits
(one per package) seem nice. Give a look to previous commits as
example of commit message (ChangeLog format, etc.). Now, it is time to
prepare the submission:

=C2=A0 git format-patch --cover-letter - o patches master

this will create the 3 patches in the folder patches/ and one cover
letter. Edit the cover letter to describe what the patches are about
then submit it to the bug tracker:

=C2=A0 git send-email --to=3Dguix-patches@gnu.org patches/0000-cover-= letter.patch

Wait the answer to the bug tracker.
You should receive an email (if your .gitconfig is ok) with the bug
number. Last submit the patches:

=C2=A0 git send-email --to=3DABCDEF@debbugs.gnu.org patches/000{1,2= ,3}-*

where ABCDEF is the bug number.



Well, if you need some inspiration to find unpackaged tools from BioConduct= or:

=C2=A0 wget https://git.bioconductor.org -qO - | sed -ne<= br> '/packages\/[a-zA-Z]/{s,^.*R.*packages/,,p}' > bioc_manifest
=C2=A0 ./pre-inst-env guile --no-auto-compile missing-bioconductor.scm bioc= _manifest

where the file `missing-bioconductor.scm` is given by:

--8<---------------cut here---------------start------------->8---
(use-modules ((guix import utils) #:select (guix-name))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(gnu packages)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(srfi srfi-1)=C2=A0 ;lists<= br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(ice-9 textual-ports))

(define (fetch-names manifest)
=C2=A0 "Return a list of strings, each corresponding to a name from th= e
input file MANIFEST."
=C2=A0 (call-with-input-file manifest
=C2=A0 =C2=A0 (lambda (port)
=C2=A0 =C2=A0 =C2=A0 (let loop ((lines '())
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(line (get-li= ne port)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (if (eof-object? line)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (reverse lines)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (loop (cons line lines)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (get-line po= rt)))))))

;;; Start!

(map (lambda (name)
=C2=A0 =C2=A0 =C2=A0 =C2=A0(when (null? (find-packages-by-name (guix-name &= quot;r-" name)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(begin
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(display name)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(newline))))
=C2=A0 =C2=A0 =C2=A0(fetch-names (cadr (command-line))))

;; wget https://git.bioconductor.org -qO - | sed -ne
'/packages\/[a-zA-Z]/{s,^.*R.*packages/,,p}' > bioc_manifest
;; ./pre-inst-env guile --no-auto-compile missing-bioconductor.scm bioc_man= ifest
--8<---------------cut here---------------end--------------->8---


Hope that help.

All the best,
simon

--0000000000008f19fd0595027e5a--