Re: [Python-modules-team] Git-dpm help for tweepy

2016-02-11 Thread Barry Warsaw
On Feb 11, 2016, at 09:09 AM, Ross Gammon wrote:

>I was working last night on fixing the RC bug for tweepy, but got myself
>in a muddle with git-dpm.

Yep, git-dpm will do this some times. :/

>Tweepy is currently 3.4.0 & 3.5.0 is a new available release. I cloned,
>fixed the bug (just disabling the unit test), confirmed it was fixed and
>then looked at packaging 3.5.0 as a team upload. But git-dpm seemed to
>be unaware of 3.4.0 (claiming that 3.1.0 was the right tarball), that
>there were non-debian changes in the debian branch and wouldn't let me
>import 3.5.0. So I gave up on 3.5.0, and started trying to work out what
>was wrong with 3.4.0 in git-dpm.

Occasionally I find it necessary to blow away a clone and start over, but even
then, git-dpm sometimes does mysterious things.  (This is one of several
reasons I'm beginning to sour on it, though it works just fine in the majority
of cases.)

One thing I've found is that import-new-upstream will sometimes not record the
pristine-tar, even if you use --ptc.  It seems like this can happen if you
also --rebase and are required to resolve some conflicts.  After finally
git-dpm u-p'ing the pristine-tar will not have been recorded.  Though you have
to remember to do it, it's easy enough to pristine-tar commit the new
orig.tar.gz after the fact.

The main thing is that when you update to a new upstream, be sure to git-dpm
status (and/or prepare) to be sure everything's okay before you start to work
on further changes on top of the new upstream.

Another gotcha is that if you `git clone` the repo, you won't actually have a
pristine-tar or upstream tracking branch, and this will break git-dpm.  Much
better to use `gbp clone` which does the clone and then assures you have the
local tracking branches.  If you do git clone, just be sure to checkout the
pristine-tar branch before you start working on things (and upstream too,
though this matters less in practice).

(Aside: I'm not sure I'd say that disabling a unit test counts as a "fix" ;)

I don't know if any of the above is relevant for your case.  I've seen git-dpm
do weird things like take a single commit in the patches branch and turn it
into a quilt patch where the diff is present *twice*.  I think this was for a
simple fix in pyparsing (trying to change distutils.setup() into
setuptools.setup() in the setup.py), and though I tried a ton of different
things, I was never able to get git-dpm to generate a correct quilt patch
file.

>At this point, I somehow merged pristine-tar into master :-(

You'll be way better off restarting from a fresh clone than trying to fix your
busted one.  That way leads to madness. ;)

Cheers,
-Barry


pgptoBQfNWEsm.pgp
Description: OpenPGP digital signature


Please help auto_test for python-biom-format working

2016-02-11 Thread Andreas Tille
Hi,

I tried to get the dh_auto_test for python-biom-format[1] working but it
seems my way to copy the test data to the right place is not doing the
trick.  There are always errors like

dh_auto_test
I: pybuild base:184: cd 
/build/python-biom-format-2.1.5+dfsg/.pybuild/pythonX.Y_2.7/build; python2.7 -m 
nose tests
...E.E..

  
EEES.
==
ERROR: Correctly subsets samples in a hdf5 table
--
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/numpy/testing/decorators.py", line 
147, in skipper_func
return f(*args, **kwargs)
  File 
"/build/python-biom-format-2.1.5+dfsg/.pybuild/pythonX.Y_2.7/build/tests/test_cli/test_subset_table.py",
 line 82, in test_subset_observations_hdf5
json_table_str=None)
  File "biom/cli/table_subsetter.py", line 135, in _subset_table
with biom_open(hdf5_biom) as f:
  File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
  File "biom/util.py", line 440, in biom_open
if os.path.getsize(fp) == 0:
  File "/usr/lib/python2.7/genericpath.py", line 57, in getsize
return os.stat(filename).st_size
OSError: [Errno 2] No such file or directory: 'test_data/test.biom'


despite I did copy the test_data into {build_dir}.

Any help would be welcome.

Kind regards

 Andreas.


[1] git://anonscm.debian.org/debian-med/python-biom-format.git

-- 
http://fam-tille.de