On Sun, Jul 24, 2016 at 7:45 PM, Mattijs Hoitink <[email protected]> wrote:
> Hi, > > I've started using beancount just a short while ago, reading the > documentation first and now trying my hand at some custom importers. This > is going pretty well and I'm getting my transactions extracted. > > I'd like to get some insights in what is going on under the hood and how > data flows through the beancount code. I was hoping to get some tips on > debugging importers and beancount in general. > Check out the section on regression testing from this doc: https://docs.google.com/document/d/11EwQdujzEo2cxqaF5PgxCEZXWfKKQCYSMfdJowp_1S8/edit#heading=h.re9y2huiep1o This is what I use to test my own. In one sentence, the easiest (laziest) way to write these tests is to use real downloaded files and to compare the output of the importer against an expected file, and ensure that as you change your importer those don't change. Of course, a good coverage with unit tests would be better, but in practice these importers have many unspecified quirks and no specification and can be unreasonably time-consuming or even impossible to test comprehensively. So I encourage you to be scrappy and just write the minimum you need and incrementally fix your importers when unexpected inputs appear. So far I've used vim + pdb and also trying to get the PyCharm debugger to > work. > The usual Python tools should all work. > > cheers, > mattijs > > -- > You received this message because you are subscribed to the Google Groups > "Beancount" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beancount/ff4b9186-5ceb-4c68-9ffd-2431b5a8e980%40googlegroups.com > <https://groups.google.com/d/msgid/beancount/ff4b9186-5ceb-4c68-9ffd-2431b5a8e980%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAK21%2BhOen0%2Bd_Mh9FvU%2BqRdXiAqPBPuo_-97JZRB0GOip0jpOw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
