Re: [PATCH 2/2] gnu: multiqc: Update to 0.8.

2016-12-29 Thread Ben Woodcroft

Hi Raoul,


On 28/12/16 23:13, Ra wrote:

Hi Ben,
reading the comments from https://github.com/ewels/MultiQC/issues/376
it seems that in the upcoming release they will solve the problem.
Are we going to wait for the next v. 1.0 or include it now and update 
later ?


I just pushed an update to 0.9 as 
a29929b32caf9e437d18bdb0cd4d1b22bc096fed. I did not add nose as an input 
because the issue seems to be with matplotlib, not multiqc. 
Specifically, nose is listed in the 'requires.txt' file of matplotlib 
when should only be needed for testing.


So to test the updated package I ran
$ ./pre-inst-env guix environment --ad-hoc multiqc python python-nose 
glibc-locales -C --no-grafts --no-substitutes


[env] # LC_ALL=en_AU.UTF-8 LANG=en_AU.UTF-8 
GUIX_LOCPATH=/gnu/store/hyi7svs0ds79wrcg5l0nr36zzjikqj7i-glibc-locales-2.24/lib/locale/ 
multiqc -h


The use of click with python3 means that we must set locales or it will 
refuse to run. Please do tell if you find any issues with the update - 
I've not used this tool before so I only tested it superficially.

ben

PS. In future would you mind please bottom-posting your emails if 
possible? Around here, we've chosen a side of that debate :)


Re: [PATCH 2/2] gnu: multiqc: Update to 0.8.

2016-12-28 Thread Ra
Hi Ben,
reading the comments from https://github.com/ewels/MultiQC/issues/376
it seems that in the upcoming release they will solve the problem.
Are we going to wait for the next v. 1.0 or include it now and update later
?

--
Ra

On Mon, Dec 26, 2016 at 1:18 PM Ben Woodcroft  wrote:

> Hi Raoul,
>
>
> On 26/12/16 20:45, Ra wrote:
> > Hi Ben,
> > thanks I will investigate. Does it mean that multiqc is in stand by
> > for now ?
>
> It would be ideal I think to add tests, and because they are failing it
> would be good to know why. I thought the easiest simply to ask the
> maintainers if they knew why the tests were failing:
> https://github.com/ewels/MultiQC/issues/376
>
> I also submitted the exception catching patch here, which we should add
> to our patch if we decide to keep it before pushing our changes.
> https://github.com/ewels/MultiQC/pull/377
>
> I figure it makes sense to give them a week or two to respond, and
> reevaluate after that. I presume you have not observed any problems
> using multiqc after this update?
> Thanks,
> ben
>


Re: [PATCH 2/2] gnu: multiqc: Update to 0.8.

2016-12-26 Thread Ben Woodcroft

Hi Raoul,


On 26/12/16 20:45, Ra wrote:

Hi Ben,
thanks I will investigate. Does it mean that multiqc is in stand by 
for now ?


It would be ideal I think to add tests, and because they are failing it 
would be good to know why. I thought the easiest simply to ask the 
maintainers if they knew why the tests were failing:

https://github.com/ewels/MultiQC/issues/376

I also submitted the exception catching patch here, which we should add 
to our patch if we decide to keep it before pushing our changes.

https://github.com/ewels/MultiQC/pull/377

I figure it makes sense to give them a week or two to respond, and 
reevaluate after that. I presume you have not observed any problems 
using multiqc after this update?

Thanks,
ben



Re: Re: [PATCH 2/2] gnu: multiqc: Update to 0.8.

2016-12-26 Thread Ra
Hi Ben,
thanks I will investigate. Does it mean that multiqc is in stand by for now
?

On Fri, Dec 23, 2016 at 2:30 PM Ben Woodcroft  wrote:

> Hi Raoul,
>
> Thanks for the patches.
>
> On 19/12/16 07:36, Ra wrote:
> > [PATCH] gnu: multiqc: Update to 0.8.
> > is [PATCH 1/2] for this message, sorry for the mistake.
> > Running multiqc without [PATCH 2/2] systems say that matplotlib
> > requires nose>=0.11.1, so I added it to the propagated inputs.
> I notice that 0.9 is out too, so I tried updating to that version. I
> also added "python-nose" as a native-input rather than a
> propagated-input since it is only used at build time.
>
> However, the tests fail with this error:
>
> FileNotFoundError: [Errno 2] No such file or directory: 'git'
>
> The check phase is still successful so it doesn't stop - this problem is
> being fixed by others. I added a patch to ignore the FileNotFoundError,
> but then after all that the tests fail. Would you mind investigating
> further, perhaps by raising an issue on the multiqc GitHub? My efforts
> so far are in the attached patch.
>
> Thanks, ben.
>
>


Fwd: Re: [PATCH 2/2] gnu: multiqc: Update to 0.8.

2016-12-23 Thread Ben Woodcroft

Hi Raoul,

Thanks for the patches.

On 19/12/16 07:36, Ra wrote:

[PATCH] gnu: multiqc: Update to 0.8.
is [PATCH 1/2] for this message, sorry for the mistake.
Running multiqc without [PATCH 2/2] systems say that matplotlib
requires nose>=0.11.1, so I added it to the propagated inputs.

I notice that 0.9 is out too, so I tried updating to that version. I
also added "python-nose" as a native-input rather than a
propagated-input since it is only used at build time.

However, the tests fail with this error:

FileNotFoundError: [Errno 2] No such file or directory: 'git'

The check phase is still successful so it doesn't stop - this problem is
being fixed by others. I added a patch to ignore the FileNotFoundError,
but then after all that the tests fail. Would you mind investigating
further, perhaps by raising an issue on the multiqc GitHub? My efforts
so far are in the attached patch.

Thanks, ben.

>From d1c70ba0a701a31469dcae2b1a0efb624e5409d1 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft 
Date: Fri, 23 Dec 2016 22:13:33 +1000
Subject: [PATCH] gnu: multiqc: Update to 0.9.

* gnu/packages/bioinformatics.scm (multiqc): Update to 0.9.
[origin]: Add patch.
[arguments]: Run tests.
[native-inputs]: Add python-nose, multiqc-test-data.
* gnu/packages/patches/multiqc-fix-git-subprocess-error.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk   |  1 +
 gnu/packages/bioinformatics.scm| 28 --
 .../patches/multiqc-fix-git-subprocess-error.patch | 15 
 3 files changed, 42 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/multiqc-fix-git-subprocess-error.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index ee8f1e591..bde8bc235 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -727,6 +727,7 @@ dist_patch_DATA =		\
   %D%/packages/patches/mpc123-initialize-ao.patch		\
   %D%/packages/patches/mplayer2-theora-fix.patch		\
   %D%/packages/patches/module-init-tools-moduledir.patch	\
+  %D%/packages/patches/multiqc-fix-git-subprocess-error.patch	\
   %D%/packages/patches/mumps-build-parallelism.patch		\
   %D%/packages/patches/mupdf-build-with-openjpeg-2.1.patch	\
   %D%/packages/patches/mupen64plus-ui-console-notice.patch	\
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 912941e11..0cbbce1fc 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -7853,15 +7853,39 @@ replacement for strverscmp.")
 (define-public multiqc
   (package
 (name "multiqc")
-(version "0.6")
+(version "0.9")
 (source
  (origin
(method url-fetch)
(uri (pypi-uri "multiqc" version))
(sha256
 (base32
- "0avw11h63ldpxy5pizc3wl1wa01ha7q10wb240nggsjz3jaqvyiy"
+ "12gs1jw2jrxrij529rnl5kaqxfcqn15yzcsggxkfhdx634ml0cny"))
+   (patches (search-patches "multiqc-fix-git-subprocess-error.patch"
 (build-system python-build-system)
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (replace 'check
+   (lambda* (#:key inputs #:allow-other-keys)
+ (let ((data (assoc-ref inputs "multiqc-test-data")))
+   (setenv "PYTHONPATH"
+   (string-append (getcwd) ":" (getenv "PYTHONPATH")))
+   (with-directory-excursion data
+ (zero? (system* "python3" "-munittest" "discover")
+(native-inputs
+ `(("python-nose" ,python-nose)
+   ("multiqc-test-data"
+,(let ((commit "32bf18b4d7c46496ae50bfaf4c94a9df3afd0491"))
+   (origin
+ (method git-fetch)
+ (uri (git-reference
+   (url "https://github.com/ewels/MultiQC_TestData.git";)
+   (commit commit)))
+ (file-name (string-append "multiqc-test-data" commit "-checkout"))
+ (sha256
+  (base32
+   "079pcr6j2nk0v238qwsslgk480rv82xwsjyy4lf6v48l6zj4llm0")))
 (propagated-inputs
  `(("python-jinja2" ,python-jinja2)
("python-simplejson" ,python-simplejson)
diff --git a/gnu/packages/patches/multiqc-fix-git-subprocess-error.patch b/gnu/packages/patches/multiqc-fix-git-subprocess-error.patch
new file mode 100644
index 0..50807e2b7
--- /dev/null
+++ b/gnu/packages/patches/multiqc-fix-git-subprocess-error.patch
@@ -0,0 +1,15 @@
+Without this patch, the incorrect exception is caught when 'git' is not in PATH.
+
+diff --git a/multiqc/utils/config.py b/multiqc/utils/config.py
+index 01fa554..4a11793 100755
+--- a/multiqc/utils/config.py
 b/multiqc/utils/config.py
+@@ -28,7 +28,7 @@ try:
+ git_hash = subprocess.check_output(['git', 'rev-parse', 'HEAD'], stderr=subprocess.STDOUT)
+ git_hash_short = git_hash[:7]
+ version = '{} ({})'.format(version, git_hash_short)
+-except subprocess.CalledProcessError:
++except (subprocess.CalledProcessError, FileNotFoundError):
+ pass
+ os.chdir(cwd)
+