Commit Graph

12294 Commits

Author SHA1 Message Date
Simon Michael
31241bc968 ;just: more benchmarks 2024-01-26 17:14:25 -10:00
Simon Michael
12e67e4859 dev: postingAddInferredEquityPostings: cleanup 2024-01-26 15:04:44 -10:00
Simon Michael
4c7abc3d2f just:samplejournals: more, faster, better 2024-01-26 14:41:15 -10:00
Simon Michael
21adfe2c25 fix: really fix slowdown with many accounts [#2153]
The previous #2153 fix used accountNameTreeFrom, but it turns out this
has always had O(n^2) performance, so our tests with 10k accounts ran
even slower than before. Now it's faster, the main #2153 slowdown
should really be fixed, and other commands which build an account tree
should also be free of this slowdown when there are very many accounts.
2024-01-26 13:53:47 -10:00
Simon Michael
a38af98c9e fix: a slowdown with many txns and many accounts since 1.29 [#2153]
When processing costs and equity postings in transactions during
journal finalisation, we now pass just the conversion account name(s)
rather than the entire map of account types. This slowdown was severe
for some users/data/machines.
2024-01-25 13:49:49 -10:00
Simon Michael
53431d9ac6 ;just: note GNU/linux portability issue 2024-01-25 13:21:38 -10:00
Simon Michael
70ec71edd7 ;tools: bench5k.sh 2024-01-24 23:50:01 -10:00
Simon Michael
78f3655dd5 ;just: symlink-binary: -f 2024-01-24 23:05:20 -10:00
Simon Michael
0f43946646 ;just: portability fix, 2 2024-01-24 23:03:26 -10:00
Simon Michael
80cc54cc27 just: portability fix 2024-01-24 22:46:14 -10:00
Simon Michael
d969421c21 ;tools: standard 1k, 10k, 100k-txn benchmarks 2024-01-24 22:31:01 -10:00
Simon Michael
b5cdc295b4 ;just: find GNU tar more portably 2024-01-24 22:06:59 -10:00
Simon Michael
04bbcc076d ;tools: bench.sh: simplify default benchmarks 2024-01-24 21:59:58 -10:00
Simon Michael
492dfb0cdc ;just: bench: improve 2024-01-24 21:55:08 -10:00
Simon Michael
08dc13aca0 ;just: get-binaries 2024-01-24 21:49:27 -10:00
Simon Michael
94c9317670 ;examples:multi-year:readme: clarify/warn about print --equity losing directives 2024-01-23 23:52:52 -10:00
Simon Michael
508ccfc7d2 imp: balance assertions error: show costs detail with --debug=2 2024-01-23 22:18:34 -10:00
Simon Michael
54c60b4de9 imp: balance assertions error: clarify wording 2024-01-23 22:18:34 -10:00
Simon Michael
e694e7869d fix: check mixed-cost balances correctly again; cleanup (#2150)
The code is a bit clearer, and it no longer discards amounts other
than the first when the running balance contains multiple costs.
(This bug was exposed by the fix for #2039).
2024-01-23 21:35:07 -10:00
Simon Michael
8ec46baec9 dev: clarify behaviour of filterMixedAmountByCommodity, showMixedAmount* 2024-01-23 21:35:06 -10:00
Simon Michael
df79aa5e35 dev: distinguish oneLineFmt and oneLineNoCostFmt; add fullZeroFmt 2024-01-23 21:35:06 -10:00
Simon Michael
999cba8c31 dev: cleanup; add showAmountWith, showMixedAmountWith 2024-01-23 21:35:06 -10:00
Simon Michael
0cb382cf0e dev: rename AmountDisplayOpts -> AmountFormat, and related constants
noColour          -> defaultFmt
noCost            -> noCostFmt
oneLine           -> oneLineFmt
csvDisplay        -> machineFmt
2024-01-23 21:35:06 -10:00
Simon Michael
e2ed2b3b6d dev: clarify showAmountsCostB 2024-01-23 21:35:06 -10:00
Simon Michael
ca55c2f0f8 dev: rename other Price helpers to Cost
showAmountWithoutPrice             -> showAmountWithoutCost
mixedAmountStripPrices             -> mixedAmountStripCosts
showMixedAmountWithoutPrice        -> showMixedAmountWithoutCost
showMixedAmountOneLineWithoutPrice -> showMixedAmountOneLineWithoutCost
2024-01-23 21:35:06 -10:00
Simon Michael
323f87b3e9 dev: Amount: aprice -> acost
Acked-by: Simon Michael <simon@joyful.com>
2024-01-23 21:35:06 -10:00
Simon Michael
8102bd9c2b dev: AmountPrice,UnitPrice,TotalPrice -> AmountCost,UnitCost,TotalCost; related renames 2024-01-23 21:35:06 -10:00
Simon Michael
e201775e93 dev: amountStripPrices -> amountStripCost 2024-01-23 21:35:06 -10:00
Simon Michael
0353840d90 dev: showAmountPrice -> showAmountCostB, showAmountPriceDebug -> showAmountCostDebug 2024-01-23 21:35:06 -10:00
Colin Dean
2ac0905c70 dev: Runs shellcheck on hledger-simplebal
Shellcheck handled the variable fixups. The pipefail flag avoids another
Shellcheck warning w.r.t. handling pipe failures. This script is so
minimal that it's safe to simply fail the pipe entirely if the hledger
command fails.
2024-01-23 06:30:32 -10:00
Colin Dean
4faa381ccd fix: Run shellcheck on hledger-bar
I [encountered][1] an unexpected error when testing hledger-bar for
proposed inclusion in Homebrew's default installation of hledger:

    /opt/homebrew/Cellar/hledger/1.32.2_1/bin/hledger-bar: line 81:
    conditional binary operator expected

I'm doubt that this is fixed by running shellcheck, but checking
a script against shellcheck is usually one of the first things I check
before debugging shell!

This patch is ~generated by shellcheck with

    shellcheck --shell=bash --enable=all --format=diff bin/hledger-bar | \
    git apply

plus some extra, manual additions in the form of a shellcheck directive
to accept something that's a little abnormal for shellcheck but fine
here. The `set -o inherit_exit` was also recommended by shellcheck.

[1]: https://github.com/Homebrew/homebrew-core/actions/runs/7606843601/job/20713321881?pr=160590
2024-01-22 18:16:47 -10:00
Simon Michael
bd8bd393f2 ;fix:hledger-bar: really fix the error when NO_COLOR is not defined [#2159]
Also, it's now more compliant with the no-color.org spec:

  Command-line software which adds ANSI color to its output by default
  should check for a NO_COLOR environment variable that, when present
  and not an empty string (regardless of its value), prevents the
  addition of ANSI color.

so one can now temporarily override $NO_COLOR=1 in the environment by
setting it empty: NO_COLOR= hledger ...
2024-01-22 12:40:48 -10:00
Simon Michael
0f30316cfd ;bin:hledger-bar: fix an error when NO_COLOR is not defined [#2159] 2024-01-22 11:28:13 -10:00
Simon Michael
d8addd5926 ;bin:hledger-bar: fix a shellcheck warning 2024-01-22 10:29:47 -10:00
Simon Michael
ac47ea4a0e imp:balance assertion error message: make it clearer, show diff again 2024-01-21 15:02:51 -10:00
Simon Michael
6091f583dc fix: import: --catchup works again [#2156] 2024-01-21 12:33:15 -10:00
Simon Michael
41711d8ab5 fix:--anon: now hidden, gives an error, still usable as --obfuscate [#2133] 2024-01-21 11:59:11 -10:00
Simon Michael
0cdc012fd9 dev:journalTransform: cleanup 2024-01-21 10:25:55 -10:00
Simon Michael
f3073990cc imp:close: infer a default tag value by incrementing current file name [#2151] 2024-01-21 02:30:33 -10:00
Simon Michael
c2ce1c2037 imp:close: add tags, with optional custom value, for easier matching/exclusion [#2151]
They are `balances:` for assertion transactions,
`retain:` for retained earnings transactions,
and `start` for opening/closing transactions.

And some --help cleanups.
2024-01-21 01:44:14 -10:00
Simon Michael
29ac554765 ;doc:tags: discuss tag names, list reserved ones 2024-01-21 01:25:54 -10:00
Simon Michael
298a9c29b4 ;dev: Query comments 2024-01-21 00:57:30 -10:00
Simon Michael
f53f3a0194 dev:close: refactor 2024-01-20 21:53:46 -10:00
Simon Michael
38d9f1760e ;examples:multi-year: edits 2024-01-20 16:48:58 -10:00
Simon Michael
b418e686c9 ;examples:multi-year: edits 2024-01-20 16:36:52 -10:00
Simon Michael
15b4f9e8d2 ;doc:close: layout 2024-01-20 16:18:25 -10:00
Simon Michael
4b1410c4b5 ;doc:close: fix link 2024-01-20 16:14:35 -10:00
Simon Michael
5d073e16e3 ;doc:close: edits 2024-01-20 16:07:00 -10:00
Simon Michael
6b5b467cce doc:close: edits 2024-01-20 15:43:46 -10:00
Simon Michael
682609c501 ;examples:README: update 2024-01-20 15:42:38 -10:00