Re: figtree autopkgtest

2017-12-14 Thread Andreas Tille
Dear Katerina,

[Somehow your text is really unreadable.  May be you try forcing
 GMail to use plain text.  You can possibly do so by marking your
 whole text using -A and than use the T_x icon on the bottom.]

On Thu, Dec 14, 2017 at 05:42:07PM +0200, Kalou.Katerina wrote:
> Dear Andreas,
> 
> I made the following changes in the figtree package : deleted (commented)
> the first suggested test which
> needs graphical output
> ​ and changed the last suggested test from 'gif' to 'png' output.  Finally
> , i manually exported
> the proper 'tree' files and added them to the 'experiments' folder, so that
> the 'autopkgtest -- null' is running succesfully
> on my machine.

Hmmm, despite the typo I fixed in cf1d7328b923a0485527a7b78a31cff51e8fe3e2 ?
;-)

I also changed the location of the examples.  For the packaging you
should *only* deal with the debian/ dir.  If you need to change / create
files in the upstream source tree you need to provide a quilt patch.
However, in this specific case I just moved the files to debian/examples
and added this to the debhelper install file.
 
> I tested around with the idea of starting
> xvfb-run
> ​and finding a way to export the proper '.tree' files
> without user interaction. I found the relative '
> ​​

I think that's really tricky if the application does not support this.
Just for the sake of interest I really managed this kind of test with
gdpc - but I think we are doing fine with the graphics export in the
figtree case.

> FigTreeNexusImporter​
> ​.java' function in the 'src' folder
> and tried to incorporate it in the test file ( as ' javac
> ​
> FigTreeNexusImporter​
> ​.java'
> but obviously i failed. I​
> ​f
> anyone who knows java wants to offer any help it would be a big help :)​

Hmmm, I can not help with Java and I think there is no need to.
 
> I think i messed up with the commit to the master branch of debian med in
> git.

What do you mean?  The commits seem to be OK.

> I should create
> a patch first and do 'git am' instead of that i did 'git push' , i was
> following a git tutorial and it was
> an accident. I am sorry about that. I will be more careful (and better
> prepared) next time.

Actually 'git push' is the way to go.
 
> I am looking for the next bug to close ( probably
> #879616
> ​ ?)​
> <879...@bugs.debian.org>

Please write a note to this bug report to inform others that you are
working on it.

> ​Thank you for all the help!​

You are welcome - thanks to you for the autopkgtest

   Andreas.

-- 
http://fam-tille.de



Re: figtree autopkgtest

2017-12-14 Thread Kalou.Katerina
Dear Andreas,

I made the following changes in the figtree package : deleted (commented)
the first suggested test which
needs graphical output
​ and changed the last suggested test from 'gif' to 'png' output.  Finally
, i manually exported
the proper 'tree' files and added them to the 'experiments' folder, so that
the 'autopkgtest -- null' is running succesfully
on my machine.

I tested around with the idea of starting
xvfb-run
​and finding a way to export the proper '.tree' files
without user interaction. I found the relative '
​​
FigTreeNexusImporter​
​.java' function in the 'src' folder
and tried to incorporate it in the test file ( as ' javac
​
FigTreeNexusImporter​
​.java'
but obviously i failed. I​
​f
anyone who knows java wants to offer any help it would be a big help :)​

I think i messed up with the commit to the master branch of debian med in
git. I should create
a patch first and do 'git am' instead of that i did 'git push' , i was
following a git tutorial and it was
an accident. I am sorry about that. I will be more careful (and better
prepared) next time.

I am looking for the next bug to close ( probably
#879616
​ ?)​
<879...@bugs.debian.org>

​Thank you for all the help!​


On Wed, Dec 13, 2017 at 5:30 PM, Andreas Tille  wrote:

> Hi Kate,
>
> cool, just take your time and let us know about problems.
>
> Thanks for your effort
>
>   Andreas.
>
> On Wed, Dec 13, 2017 at 09:14:06AM +0200, Kalou.Katerina wrote:
> > Hi Andreas,
> >
> > i'm really sorry i'm late-some real life problems kept me back.
> > I have already start working on it, i will have more news from me later
> > today!
> >
> > Hopefully this bug will be closed by tonight and i can start working on
> > another one :)
> >
> > kind regards,
> > kate
> >
> >
> > On Wed, Dec 13, 2017 at 9:02 AM, Andreas Tille  wrote:
> >
> > > Hi Kate,
> > >
> > > On Thu, Nov 30, 2017 at 03:23:18PM +0200, ka lou wrote:
> > > >
> > > > I am definitely going to keep on working on this, i 'll hit you up
> with
> > > > more comments and questions soon.
> > >
> > > Any news from the figtree autopkgtests?  I think the hints should have
> > > lead you to some progress and it would be great if we could close bug
> > > #879621 soon.
> > >
> > > Kind regards
> > >
> > >Andreas.
> > >
> > >
> > > --
> > > http://fam-tille.de
> > >
> > >
>
> --
> http://fam-tille.de
>


Re: figtree autopkgtest

2017-12-12 Thread Andreas Tille
Hi Kate,

On Thu, Nov 30, 2017 at 03:23:18PM +0200, ka lou wrote:
> 
> I am definitely going to keep on working on this, i 'll hit you up with
> more comments and questions soon.

Any news from the figtree autopkgtests?  I think the hints should have
lead you to some progress and it would be great if we could close bug
#879621 soon.

Kind regards

   Andreas.


-- 
http://fam-tille.de



Re: figtree autopkgtest

2017-11-30 Thread ka lou
Dear Andreas and Fabian
wow that's pretty wonderful - thank you for all the great comments!

Dear Andreas, yes - you are absolutely right, when i tested it in my local
linux machine
i had the second and third line (i.e the graphic outputs) commended out...
So,i tested only the first line, saw that it worked , got exited and
started immediately try and create the git patch.
Meanwhile , i commended out  the other two lines - thinking that i will
test them too - but i finally never did
(i forgot cause i was too nervous and exited  to send you guys the patch!).
I promise to be much more calm and precise in the future.

I am definitely going to keep on working on this, i 'll hit you up with
more comments and questions soon.

Thank you all again!
Kate


Re: figtree autopkgtest

2017-11-30 Thread Thorsten Alteholz

Hi Andreas,

On Thu, 30 Nov 2017, Andreas Tille wrote:

I'll open several bugs for missing tests soon which we can close in
our advent bug squashing party (Thorsten?)


yes, but don't forget the old poor souls :-).

  Thorsten



Re: figtree autopkgtest

2017-11-30 Thread Fabian Klötzl
Hi Andreas,

On 30.11.2017 10:59, Andreas Tille wrote:
> On Thu, Nov 30, 2017 at 10:42:36AM +0100, Fabian Klötzl wrote:
>> The output is a well rendered phylogeny.
> 
> Yes, but may be the GIF format was droped for pretty good reasons
> replaced by PNG without adapting the docs.  The resulting PNG is a well
> rendered tree as well.  Could you try PNG on your Arch Linux install
> for comparison?

I have to correct myself: In the GIF (Ubuntu) the text is botched; The
font is unreadable. PNG (Arch) is good.


Fabian



Re: figtree autopkgtest

2017-11-30 Thread Andreas Tille
Hi Fabian,

On Thu, Nov 30, 2017 at 10:42:36AM +0100, Fabian Klötzl wrote:
> On 30.11.2017 10:39, Andreas Tille wrote:
> >> GIF works just fine on my Ubuntu LTS‽
> > 
> > $ figtree -graphic GIF -width 320 -height 320 test.tree test.gif | head -n5
> > 
> > Argument, -graphic has a bad string value: GIF
> > 
> > 
> >  FigTree v1.4.3, 2006-2016
> > 
> > 
> > 
> > What version of figtree is in Ubuntu LTS?
> 
> FigTree v1.4.2, 2006-2014
> 
> The output is a well rendered phylogeny.

Yes, but may be the GIF format was droped for pretty good reasons
replaced by PNG without adapting the docs.  The resulting PNG is a well
rendered tree as well.  Could you try PNG on your Arch Linux install
for comparison?

Kind regards

Andreas.

-- 
http://fam-tille.de



Re: figtree autopkgtest

2017-11-30 Thread Fabian Klötzl


On 30.11.2017 10:39, Andreas Tille wrote:
>> GIF works just fine on my Ubuntu LTS‽
> 
> $ figtree -graphic GIF -width 320 -height 320 test.tree test.gif | head -n5
> 
> Argument, -graphic has a bad string value: GIF
> 
> 
>  FigTree v1.4.3, 2006-2016
> 
> 
> 
> What version of figtree is in Ubuntu LTS?

FigTree v1.4.2, 2006-2014

The output is a well rendered phylogeny.

Fabian



Re: figtree autopkgtest

2017-11-30 Thread Andreas Tille
Hi Fabian,

On Thu, Nov 30, 2017 at 10:26:24AM +0100, Fabian Klötzl wrote:
> > thanks for your comments.  I'd really love if more people become
> > involved in autopkgtests and teaching newcomers!
> 
> I am also a newcomer with respect to autopackage tests.

Even better. :-)
I'll open several bugs for missing tests soon which we can close in
our advent bug squashing party (Thorsten?)
 
> > On Wed, Nov 29, 2017 at 10:30:14PM +0100, Fabian Klötzl wrote:
> > successfully.  DEP-8 is not specifying this exactly but even very basic
> > testing is better than no testing at all.  I admit we should rather gain
> > for more detailed tests but for some GUI only programs this could be an
> > option, thought.
> 
> I think it would be an OK compromise for Debian Med to just check if a
> tool runs and leave the functionality testing to the upstream author,
> where it belongs. Afterall, it is call auto*pkg*tests.

ACK.
 
> > GIF does not work for me as well and I do not think that this is a
> > drawback since PNG is working instead.  May be that's a documentation
> > issue.  Someone might like to check SVG.
> 
> GIF works just fine on my Ubuntu LTS‽

$ figtree -graphic GIF -width 320 -height 320 test.tree test.gif | head -n5

Argument, -graphic has a bad string value: GIF


 FigTree v1.4.3, 2006-2016



What version of figtree is in Ubuntu LTS?

Kind regards

  Andreas.

-- 
http://fam-tille.de



Re: figtree autopkgtest

2017-11-30 Thread Fabian Klötzl
Ho,

On 30.11.2017 10:07, Andreas Tille wrote:
> thanks for your comments.  I'd really love if more people become
> involved in autopkgtests and teaching newcomers!

I am also a newcomer with respect to autopackage tests.

> On Wed, Nov 29, 2017 at 10:30:14PM +0100, Fabian Klötzl wrote:
>> One issue I have with DEP-8 (autopackagetest) is that it is unspecified
>> *what* shall be tested. Eg. how do we verify that figtree does indeed
>> produce a correct phylogeny and not just an empty file?
> 
> I have seen *very* simple autopkgtests that are just running a
> 
>program -h
> 
> successfully.  DEP-8 is not specifying this exactly but even very basic
> testing is better than no testing at all.  I admit we should rather gain
> for more detailed tests but for some GUI only programs this could be an
> option, thought.

I think it would be an OK compromise for Debian Med to just check if a
tool runs and leave the functionality testing to the upstream author,
where it belongs. Afterall, it is call auto*pkg*tests.

>>> I am attaching  the patch file - since it is my first try for writing a
>>> test and even using the 'git format-patch' command , any feedback will
>>> be much appreciated.
>>
>> I am kind of surprised to see that your third testcase actually works
>> (creating a gif). Because it doesn't work on my Arch Linux machine and I
>> even opened an issue upstream [1]. Looks like I have to do some
>> investigations.
> 
> GIF does not work for me as well and I do not think that this is a
> drawback since PNG is working instead.  May be that's a documentation
> issue.  Someone might like to check SVG.

GIF works just fine on my Ubuntu LTS‽

Fabian



Re: figtree autopkgtest

2017-11-30 Thread Andreas Tille
Hi Fabian,

thanks for your comments.  I'd really love if more people become
involved in autopkgtests and teaching newcomers!

On Wed, Nov 29, 2017 at 10:30:14PM +0100, Fabian Klötzl wrote:
> One issue I have with DEP-8 (autopackagetest) is that it is unspecified
> *what* shall be tested. Eg. how do we verify that figtree does indeed
> produce a correct phylogeny and not just an empty file?

I have seen *very* simple autopkgtests that are just running a

   program -h

successfully.  DEP-8 is not specifying this exactly but even very basic
testing is better than no testing at all.  I admit we should rather gain
for more detailed tests but for some GUI only programs this could be an
option, thought.

> Do we want to
> check whether it only runs, or can we test the full GUI?

That's definitely harder and I added xvfb as a very first step to the
suggested test ... even if I'm not convinced that this makes any real
sense I intended to bring in this idea into the discussion.

> The latter is
> harder, but should be our goal in an ideal world.

Please let me know if you found the path to that ideal world. :-P
 
> > I am attaching  the patch file - since it is my first try for writing a
> > test and even using the 'git format-patch' command , any feedback will
> > be much appreciated.
> 
> I am kind of surprised to see that your third testcase actually works
> (creating a gif). Because it doesn't work on my Arch Linux machine and I
> even opened an issue upstream [1]. Looks like I have to do some
> investigations.

GIF does not work for me as well and I do not think that this is a
drawback since PNG is working instead.  May be that's a documentation
issue.  Someone might like to check SVG.

Kind regards

  Andreas.

-- 
http://fam-tille.de



Re: figtree autopkgtest

2017-11-29 Thread Fabian Klötzl
Hi Kate,

Thanks for starting tests for figtree. It is my favourite way to produce
a phylogeny.

On 29.11.2017 21:56, ka lou wrote:
> I made my first attempt on providing a simple autopkgtest for the
> 'figtree' package , referring to the 879621
>  bug. It successfully runs in my local
> machine using the 'autopkgtest -- null' command.

One issue I have with DEP-8 (autopackagetest) is that it is unspecified
*what* shall be tested. Eg. how do we verify that figtree does indeed
produce a correct phylogeny and not just an empty file? Do we want to
check whether it only runs, or can we test the full GUI? The latter is
harder, but should be our goal in an ideal world.

> I am attaching  the patch file - since it is my first try for writing a
> test and even using the 'git format-patch' command , any feedback will
> be much appreciated.

I am kind of surprised to see that your third testcase actually works
(creating a gif). Because it doesn't work on my Arch Linux machine and I
even opened an issue upstream [1]. Looks like I have to do some
investigations.

Best,
Fabian

[1]: https://github.com/rambaut/figtree/issues/115



figtree autopkgtest

2017-11-29 Thread ka lou
Dear all,

I made my first attempt on providing a simple autopkgtest for the 'figtree'
package , referring to the 879621  bug. It
successfully runs in my local machine using the 'autopkgtest -- null'
command.

I am attaching  the patch file - since it is my first try for writing a
test and even using the 'git format-patch' command , any feedback will be
much appreciated.

I have created an Alioth account in case you like me to continue with
committing the tests.

All the best,
Kate
From 011643ffd65e56a08b0ff610641dccd2c57a52f0 Mon Sep 17 00:00:00 2001
From: Kalou 
Date: Wed, 29 Nov 2017 20:04:22 +0200
Subject: [PATCH 1/1] run-unit-test

---
 debian/tests/control   |  5 +
 debian/tests/run-unit-test | 18 ++
 2 files changed, 23 insertions(+)
 create mode 100644 debian/tests/control
 create mode 100644 debian/tests/run-unit-test

diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 000..5e354aa
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,5 @@
+Tests: run-unit-test
+Depends: @
+Restrictions: allow-stderr
+
+
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 000..5b70b7b
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,18 @@
+#!/bin/sh -e
+
+pkg=figtree
+
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=$(mktemp -d /tmp/${pkg}-test.XX)
+  trap "rm -rf $ADTTMP" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cd $ADTTMP
+
+cp -a /usr/share/doc/${pkg}/examples/* .
+gunzip -r *
+
+figtree HA_continuous_MCC.tre HA_discrete_MCC.tre
+figtree -graphic PDF test.tree test.pdf
+figtree -graphic GIF -width 320 -height 320 test.tree test.gif
+
-- 
2.7.4