From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Asfaw, Nardos" Subject: Re: [External] Re: New outreachy participant introduction Date: Wed, 16 Oct 2019 14:16:19 +0000 Message-ID: <1571235380174.94278@iu.edu> 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="_000_157123538017494278iuedu_" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38479) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKk6m-0008F0-FM for guix-devel@gnu.org; Wed, 16 Oct 2019 10:17:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKk6h-0001kO-DP for guix-devel@gnu.org; Wed, 16 Oct 2019 10:16:58 -0400 Received: from reubens.uits.indiana.edu ([129.79.1.193]:17088 helo=hartman.uits.indiana.edu) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iKk6g-0001jC-Px for guix-devel@gnu.org; Wed, 16 Oct 2019 10:16:55 -0400 In-Reply-To: Content-Language: en-US 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: =?iso-8859-2?Q?G=E1bor_Boskovits?= Cc: Guix Devel --_000_157123538017494278iuedu_ Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Hi Gabor, Thanks for reaching out. I am still hanging. I am learning a lot on what it= means to be a developer outside of university courses. I am going through = the documentation (and examples provided in the email by simon) and the cha= t logs to sees if my questions have been asked before I come with questions= and solutions I have tried. Thanks, Nardos ________________________________ From: G=E1bor Boskovits Sent: Wednesday, October 16, 2019 4:00 AM To: Asfaw, Nardos Cc: zimoun; Christopher Baines; Guix Devel Subject: Re: [External] Re: New outreachy participant introduction Hello Nardos, We have not heard from you for a while. Should you need any help, please fe= el free to reach out to us. Asfaw, Nardos > ezt =EDrta (id=F5pont: = 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 somewhere > 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 ea= sy: 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.t= ar.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 p= atches/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: 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: 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_mani= fest 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_man= ifest --8<---------------cut here---------------end--------------->8--- Hope that help. All the best, simon --_000_157123538017494278iuedu_ Content-Type: text/html; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable

Hi Gabor,


Thanks for reaching out. I am still hanging. I am learning a l= ot on what it means to be a developer outside of university courses.&n= bsp;I am going through the documentation (and examples provided in the emai= l by simon) and the chat logs to sees if my questions have been asked before I come with questions and solutions I have tri= ed. 


Thanks,

Nardos


From: G=E1bor Boskovits <= ;boskovits@gmail.com>
Sent: Wednesday, October 16, 2019 4:00 AM
To: Asfaw, Nardos
Cc: zimoun; Christopher Baines; Guix Devel
Subject: Re: [External] Re: New outreachy participant introduction
 
Hello Nardos,

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

Asfaw, Nardos <nasfaw@iu.edu> ezt =EDrta (id=F5pont: 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 from on= e
> 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 ea= sy:

  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://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
  (package
    (name "r-zinbwave")
    (version "1.6.0")
    (source
      (origin
        (method url-fetch)
        (uri (bioconductor-uri "zinbwave" ver= sion))
        (sha256
          (base32
            "187r7l9jf2q74qaqx63df5zx6ip= hmvl817448balvfv9vqyhrp2j"))))
    (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-Se= q 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.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:

  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:

  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<= br>              (ice-9 textual-ports))

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

;;; Start!

(map (lambda (name)
       (when (null? (find-packages-by-name (guix-name &= quot;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_man= ifest
--8<---------------cut here---------------end--------------->8---


Hope that help.

All the best,
simon

--_000_157123538017494278iuedu_--