On Mon, May 14, 2012 at 06:20:37PM +0200, Daniel Dehennin wrote: > Guido Günther <[email protected]> writes: > > > I'd start of simple with a Control class that has some attributes to > > query the name of the source and binary packages. We can extend that as > > we move on as needed. > > Ok, I'll provide separate patch for this. > > [...] > > > I think movving spawn_dch as a static method to ChagenLog for now would > > do the trick for now. > > Ok, I'm moving spawn_dch as a staticmethod in ChangeLog. > > I'll use gbp.command_wrapper instead of the system def in scripts/dch.py. > > I move too: > > - add_changelog_entry() -> ChangeLog.add_entry() > > - add_changelog_section() -> ChangeLog.add_section()
Yes, but these should be methods operating on objects not static methods. > > I think the following could be done at the same time > > TODO: > > - gbp.scripts.dch.get_author_email() -> > gbp.git.GitRepository.get_author_email() > > - gbp.scripts.dch.fixup_trailer(repo, git_author, dch_options) > -> ChangLog.fixup_trailer(author, email, dch_options) > The caller is responsible of setting author name and email. > > - gbp.scripts.dch.snapshot_version() -> ChangeLog.snapshot_version() > > - gbp.scripts.dch.mangle_changelog() -> ChangeLog.mangle() > > - gbp.scripts.dch.do_release() -> ChangeLog.do_release() > > - gbp.scripts.dch.do_snapshot() -> ChangeLog.do_snapshot() > > - gbp.scripts.dch.parse_commit() -> gbp.dch.parse_commit() > > - gbp.scripts.dch.guess_snapshot_commit() -> gbp.dch.guess_snapshot_commit() Sounds good. But let's take this step by step (method by method) and add tests along the way. > [...] > > >> This permit to use the code from my git repository, I should use a > >> wrapper to set PYTHONPATH like in debian/rules. > > > > Yes. I think that's better. You can also just invoke: > > > > python setup.py nosetests > > > > and it will do the right thing. > > I'm not used to python test framwork, the setup.cfg excludes numbered > tests. What are you refering to? Nosetest is supposed to pick up all the tests automatically, if we're missing some of them that's a bug (since we're invoking it that way from debian/rules). Can you point to a particular test case that gets missed? Cheers, -- Guido > > Regards. > -- > Daniel Dehennin > Récupérer ma clef GPG: > gpg --keyserver pgp.mit.edu --recv-keys 0x7A6FE2DF -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

