The old loading strategy didn't load options, which yielded some
spurious errors. It also created awkward duplication of plugin
information in the code as well as the books.
Implement a new loading strategy that works by reading one of the
"main files" under the books/ subdirectory and includes entries
for additional FYs beyond that.
This is still not ideal in a lot of ways. In particular, Beancount can't
cache any results, causing any load to be slower than it theoretically could
be. I expect more commits to follow. But some of them might require
restructuring the books, and that should happen separately.
This module basically reimplements the old payment-report+income-report,
in a single tool (after setting aside some of the checks that have moved
to the plugin). The aging report can be implemented here too when we need
that.
I believe we still want this in principle, but we're not currently enforcing
it the way I thought we were, and we very regularly write Payables without
this supporting documentation (for trip reimbursement, regular service fees,
etc.). Enforcing this now would be way too noisy in the books, we need to
devise a separate plan to enforce this if we want it.
This makes methods like _replace available in real code, and caught the
bug where we can't use @functools.lru_cache with Transaction arguments,
because they're unhashable due to their mutable members.
This gets closer to our real intentions: anything that checks link
metadata should check rt-id. MetaRepoLinks is the exception, not
the rule, in ignoring rt-id.
Unfortunately this is becoming more trouble than it's worth as we
call more and more untyped Beancount functions.
disallow_untyped_defs provides most of the value of what we really
want here, so go ahead and turn this off.
Ultimately I would like to make it possible to configure the software
entirely through this file, rather than the hodgepodge system we have
now. But that can come later.