Commit Graph

3974 Commits

Author SHA1 Message Date
Simon Michael
7a7b26d93c tools: include benchmark script in tags 2015-09-26 15:59:11 -10:00
Simon Michael
2d4dc81999 latest benchmarking experiments 2015-09-26 15:58:46 -10:00
Simon Michael
5048d3bf06 lib: memoise accountNameApplyAliases too ?
This adds a accountNameApplyAliasesMemo, which memoises the result of
applying a set of aliases (simple and regex) to an account name. In
theory this should reduce more repetitive work, but in practice it
doesn't seem to make a difference, so it's unused for now.
2015-09-26 15:58:12 -10:00
Simon Michael
4326f88c26 lib: memoise aliasReplace for fast regex aliases (#244)
Roughly speaking, the time to apply regular expression account aliases
was O(aliases x transactions), and should now be O(aliases x accounts).
Also, the constant factor was reduced a lot by the recent commit
memoising toRegex. So now, regex aliases should be "free" like simple
aliases - use as many as you want, the slowdown shouldn't be noticeable.
2015-09-26 15:45:44 -10:00
Simon Michael
041541e466 lib: memoised versions of regexReplace[CI] (#244) 2015-09-26 15:45:17 -10:00
Simon Michael
f8f2d457b9 lib: memoize toRegex[CI] (#244)
The regex helpers were converting strings to regex-tdfa regular
expressions on the fly every time, but this appears to be quite
expensive. The simplest memoisation lib seems to solve it nicely.
2015-09-26 15:39:21 -10:00
Simon Michael
591abefe9e clarify modifiedaccountnamep 2015-09-24 14:23:52 -10:00
Simon Michael
f4c963b648 whitespace 2015-09-22 12:59:25 -07:00
Simon Michael
af33a5ac3d ui: f key toggles flat/tree mode 2015-09-13 14:34:46 -07:00
Simon Michael
135cf714ef ui: streamline help 2015-09-13 14:34:28 -07:00
Simon Michael
5504d70a41 ui: acc: accept = as an alias for the + key 2015-09-04 09:10:00 -07:00
Simon Michael
4a4fb13a95 ui: reg: g key reloads here too 2015-09-04 09:09:36 -07:00
Simon Michael
30cce4188f ui: acc: g key reloads the journal
On the accounts screen, the g key now reloads the journal if possible.
With large journals, there may be a noticeable delay before the screen updates.
If there's a problem reading the journal file(s), this has no effect.
2015-09-04 08:14:36 -07:00
Simon Michael
a61c9ad7c4 ui: acc: don't mention included files in title 2015-09-04 07:41:07 -07:00
Simon Michael
b9affbaee9 ui: acc: show enter key in bottom help 2015-09-04 07:36:23 -07:00
Simon Michael
d83b22028b ui: acc: show short account names in tree mode again
This broke for some reason.
2015-09-04 07:29:34 -07:00
Simon Michael
8685a78795 ui: acc: enter key also enters register, for now 2015-09-03 21:05:45 -07:00
Simon Michael
25a0a7c4dd ui: make keys bold in bottom help 2015-09-03 21:03:03 -07:00
Simon Michael
ebc4022888 ui: after exiting --register, select that account 2015-09-03 20:51:05 -07:00
Simon Michael
472b0aee75 ui: whitespace 2015-09-03 20:46:36 -07:00
Simon Michael
d46f511b79 ui: allow navigating to accounts after --register 2015-09-03 20:40:43 -07:00
Simon Michael
07041e1b65 ui: fix --ignore-assertions, perhaps more 2015-09-03 16:09:52 -07:00
Simon Michael
690181426d tools: add "make describe" (#269)
A make rule to handle some subtleties in getting an accurate stable
git-describe version string.
2015-09-03 12:42:14 -07:00
Simon Michael
e1f5023e30 tools: more PATCHLEVEL/git-describe fixes 2015-09-03 12:24:35 -07:00
Simon Michael
2ec55117c0 tools: better git describe command to set PATCHLEVEL 2015-09-03 12:13:37 -07:00
Simon Michael
821f1b7120 lib: fix tests for zero amount style (#230, #276) 2015-09-02 16:38:45 -07:00
Simon Michael
b770190942 lib: clarify flattenAccounts 2015-09-02 16:22:08 -07:00
Simon Michael
b8d75b7728 balance, etc: fix amount style loss (fixes #230, #276)
hledger-lib-0.24's "track the commodity of zero amounts when
possible (useful eg for hledger-web's multi-commodity charts)" preserved
the commodity when normalising a zero mixed amount, but not the amount
style. This showed up as occasionally incorrect amount style (commodity
symbol placement, decimal point character, etc.) in balance reports with
certain journals, like this:

  $ hledger bal
              €3000.00  a     <------ not using the canonical € style
              4000,58€    1
             -1000,58€    D
             -3000,00€  e
  --------------------
                     0

I thought this would require a big rewrite of amount arithmetic, but it
seems that just being a little more careful is enough. When normalising
a mixed amount containing multiple zeros in the same commodity, we now
preserve the last zero with its amount style, instead of replacing them
all with a new one.
2015-09-02 16:21:56 -07:00
Simon Michael
921a874e72 doc: front page: add gpl badge 2015-09-02 11:49:33 -07:00
Simon Michael
ca42d2b123 doc: readme: make gpl badge green 2015-09-02 11:49:14 -07:00
Simon Michael
dab12e2d10 add: note another algorithm 2015-08-28 17:57:16 -07:00
Simon Michael
9f2d59948e ui: styled amounts, smarter accounts column sizing 2015-08-28 17:55:50 -07:00
Simon Michael
323af10790 tools: add hpack yaml files to tags 2015-08-28 15:24:27 -07:00
Simon Michael
92038b7d72 web: fix options breakage, add test code to tags 2015-08-28 15:23:49 -07:00
Simon Michael
9e9aec957f print: --match shows the best match for a description
This was originally an add-on I used to guess account names for
ledger-autosync. It's nice for quickly looking up a recent transaction
with a guessed or partial description.
2015-08-28 15:10:51 -07:00
Simon Michael
a73c455570 add: fix a bug impairing similar txn matching
In some cases (when the same letter pair was repeated) it was not
picking the post similar past transaction. This was due to the
similarity algorithm using the order-dependent Data.List.intersect, when
it should use Set.intersection.

Also added a reference for the algorithm, which is known as the
Sørensen–Dice coefficient.
2015-08-28 13:54:51 -07:00
Simon Michael
74512814ec cli/ui/web: rename X.Options modules to X.XOptions
Make these modules' names more like the heavily-used types they
define (CliOpts, UIOpts, WebOpts). This is consistent with
RawOptions and ReportOptions, and helps with code navigation.
2015-08-28 12:43:51 -07:00
Simon Michael
8673332c8e ui, web: show fewer other accounts in acct register
To reduce noise in the "other accounts" field of hledger-ui's and
hledger-web's account register: if there are both real and virtual
postings to other accounts, show only the accounts posted to by real
postings.

Use case: in many transactions I have extra balanced-virtual postings
which adjust budget envelopes (subaccounts of checking). These clutter
up the register's other accounts field making it useless. Excluding them
(when there are also real postings) makes it more useful for me and
probably others.
2015-08-28 11:58:57 -07:00
Simon Michael
61f994e162 ui: update backlog 2015-08-28 11:43:29 -07:00
Simon Michael
8a343002f6 ui: fix vector-related breakage with GHC < 7.10 2015-08-28 11:39:23 -07:00
Simon Michael
570e340b7c ui: fix missing dependencies/bounds 2015-08-28 11:28:40 -07:00
Simon Michael
5792c67666 ui: refactor depth key handling 2015-08-28 11:28:22 -07:00
Simon Michael
f3dd5eb830 fix options breakage with GHC < 7.10 2015-08-28 11:17:49 -07:00
Simon Michael
2af8d7598e cli, web: fix options breakage 2015-08-28 10:49:43 -07:00
Simon Michael
c897c03469 ui: number keys > max depth clear the depth limit 2015-08-28 10:31:40 -07:00
Simon Michael
6b17305196 ui: +/- adjusts the depth limit (accounts screen) 2015-08-28 10:01:54 -07:00
Simon Michael
0d02262463 validate --depth/depth:'s argument is positive 2015-08-28 09:57:30 -07:00
Simon Michael
4dd1e9c725 clean up options validation a little 2015-08-28 09:57:01 -07:00
Simon Michael
4f351d6c9c ui: --register starts in the register screen 2015-08-28 08:48:40 -07:00
Simon Michael
eefa9c42a3 ui: remove debug code 2015-08-28 08:12:33 -07:00