hledger/hledger-lib
Simon Michael e0fab4f882
Merge pull request #1256 from Xitian9/balanceReport
SMorgan: 
This PR aims to accomplish two major goals:

-    Get boring parent ellision working for multiBalanceReport
-    Remove the special BalanceReport code, and just use multiBalanceReport

I believe it does both, with the following additional benefits:

    A refactor of multiBalanceReportWith, to make the structure easier to follow, and with a clearer division of responsibilities
    All decisions for how an account name is to be displayed are now made in multiBalanceReport, rather than scattered around the code base
    Some miscellaneous improvements in account name rendering, including --drop now working with MultiBalanceReports, and addressing some of #373

Algorithmic changes:

-    Using HashMap AccountName (Map DateSpan Account) instead of [[MixedAmount]] is new. I admit I didn't profile this change (though given the nubs and lookups, I thought it was appropriate), so I'm glad it produces a speedup.
-    Producing the starting balances no longer calls the whole balanceReport, just the first few functions to get what it needs.
-    displayedAccounts is completely rewritten. Perhaps one subtle thing to note is that in tree mode it no longer excludes nodes with zero inclusive balance unless they also have zero exclusive balance.

SMichael: 
I'll mark the passing of the old multiBalanceReport, into which I poured many an hour :). It is in a way the heart (brain ?) of hledger - the key feature of ledgerlikes (balance report) and a key improvement introduced by hledger (tabular multiperiod balance reports). You have split that 300-line though well documented function into modular parts, which could be a little harder to understand in detail but are easier to understand in the large and more amenable to further refactoring. Then you fixed some old limitations (boring parent eliding in multi period balance reports, --drop with tree mode reports), allowing us to drop the old balanceReport and focus on just the new multiBalanceReport. And for representing the tabular data you replaced the semantically correct but inefficient list of lists with a map of maps, speeding up many-columned balance reports significantly (~40%). Last and not least you made it really easy to review. Thanks @Xitian9, great work.
2020-06-23 06:42:22 -07:00
..
Hledger Merge pull request #1256 from Xitian9/balanceReport 2020-06-23 06:42:22 -07:00
other/ledger-parse lib: restrict imports, avoiding GHCI clashes 2016-11-20 10:27:16 -08:00
test ci: --pedantic is too much for now 2020-03-07 14:53:12 -08:00
Text cli:Fixed NoLine column rendering after previous commit 2020-02-29 12:56:35 -08:00
.ghci tools: .ghci for each package, sets shorter prompt 2016-04-15 16:06:45 -07:00
.version bump to dev version 2020-06-21 10:35:52 -07:00
CHANGES.md ;changelogs 2020-06-22 12:24:01 -07:00
defs.m4 bump to dev version 2020-06-21 10:35:52 -07:00
hledger_csv.5 ;regen manuals 2020-06-22 12:20:14 -07:00
hledger_csv.info ;regen manuals 2020-06-22 12:20:14 -07:00
hledger_csv.m4.md lib: condition tables in csv rules + tests 2020-06-22 12:10:47 -07:00
hledger_csv.txt ;regen manuals 2020-06-22 12:20:14 -07:00
hledger_journal.5 ;doc: regen manuals 2020-06-21 10:36:21 -07:00
hledger_journal.info ;doc: regen manuals 2020-06-21 10:36:21 -07:00
hledger_journal.m4.md journal: doc: document recursive wildcards 2020-06-20 17:12:30 -07:00
hledger_journal.txt ;doc: regen manuals 2020-06-21 10:36:21 -07:00
hledger_timeclock.5 ;doc: regen manuals 2020-06-21 10:36:21 -07:00
hledger_timeclock.info ;doc: regen manuals 2020-06-21 10:36:21 -07:00
hledger_timeclock.m4.md ;doc: drop redundant version message from web manuals 2020-01-25 19:33:12 -08:00
hledger_timeclock.txt ;doc: regen manuals 2020-06-21 10:36:21 -07:00
hledger_timedot.5 ;doc: regen manuals 2020-06-21 10:36:21 -07:00
hledger_timedot.info ;doc: regen manuals 2020-06-21 10:36:21 -07:00
hledger_timedot.m4.md ;timedot: update docs 2020-03-01 14:06:29 -08:00
hledger_timedot.txt ;doc: regen manuals 2020-06-21 10:36:21 -07:00
hledger-lib.cabal lib: multiBalanceReport: Break calculateAccountChanges and acctChangesFromPostings separate functions. 2020-06-22 21:43:30 +10:00
Hledger.hs rename easytests_* to tests_* 2018-09-06 13:13:26 -07:00
LICENSE split off hledger-lib package, containing core types & utils 2010-03-22 01:44:59 +00:00
package.yaml lib: multiBalanceReport: Break calculateAccountChanges and acctChangesFromPostings separate functions. 2020-06-22 21:43:30 +10:00
README.md ;doc: more tweaks to package readmes, hackage descriptions 2020-03-22 10:49:02 -07:00
Setup.hs Revert "remove Setup.hs files again, fixing a yesod devel warning" 2014-05-24 13:39:09 -07:00

hledger-lib

A reusable library containing hledgers core functionality. This is used by most hledger* packages so that they support the same common file formats, command line options, reports etc.

See also: the project README and home page.