Simon Michael
12447ffab7
;lib: restore list of hledger debug levels
2020-12-26 17:27:28 -08:00
Stephen Morgan
e406cebcce
lib: Remove unused AtDefault constructor for ValuationType.
2020-12-19 11:59:44 -08:00
Stephen Morgan
46093b8de7
lib,ui: For hledger-ui, do valuation for all valuation types, not just
...
AtCost and AtDefault.
Remove unused valuationTypeIs* functions.
2020-12-19 11:59:44 -08:00
Stephen Morgan
cdec0f9382
lib: Remove special handling of now-inaccessible AtDefault valuation constructor.
...
This simplifies all the *ApplyValuation functions, as they no longer
need mreportdate or multiperiod arguments.
2020-12-19 11:59:44 -08:00
Stephen Morgan
0c23619ae7
lib: Valuation has changed; and -V now acts like --value=end.
2020-12-19 11:59:44 -08:00
Stephen Morgan
8981b3e196
lib: Include empty columns in MultiBalanceReports.
...
This was previously done for CompoundBalanceReport and when --empty was
called; this makes the behaviour consistent.
2020-12-18 20:54:08 -08:00
Stephen Morgan
439eddc8b9
lib: Include price directives when calculating journal end date.
2020-12-16 19:04:33 -08:00
Simon Michael
9617d0dd81
;lib: multibalancereport sorting implementation notes ( #1414 , #1415 )
2020-12-14 09:36:34 -08:00
Stephen Morgan
92645cca14
lib: Sorting accounts by amount should also consider account name after amounts.
2020-12-14 06:48:47 -08:00
Simon Michael
349ffd7c0b
updateReportSpecFromOpts -> updateReportSpec[With]
2020-12-12 12:05:44 -08:00
Simon Michael
a10f9f4ea9
;lib: comment
2020-12-11 11:11:15 -08:00
Simon Michael
44d59eab23
;lib: Hledger.Utils.Debug: haddock
2020-12-09 13:55:55 -08:00
Simon Michael
51e3e9cbfa
;lib: Hledger.Utils.Debug: improve module haddock
2020-12-09 13:23:30 -08:00
Simon Michael
e33667f580
check: support quoted check name + args
...
A "hledger check" argument may now be a quoted string containing
the check name followed by space-separated arguments, for
checks which make use of those. This means the check command
can replicate "check-dates --unique" and (in principle)
"check-fancyassertions ASSERTIONS..". Eg:
hledger check "dates --unique"
I think it'll be better for checks to take no arguments or options,
so this is probably just a transitional feature for compatibility.
2020-11-29 20:48:31 -08:00
Simon Michael
8c23a16bf8
journal: strict mode also requires commodity declarations
2020-11-27 17:54:55 -08:00
Simon Michael
ec3ad14ae5
strict mode: -s/--strict requires posted accounts to be declared
2020-11-26 08:48:16 -08:00
Simon Michael
ea0d4901ab
lib: journalApplyAliases performance tweak
2020-11-25 21:06:31 -08:00
Simon Michael
0dc8eca68a
lib: remove partial code from journalApplyAliases etc.
2020-11-25 21:06:31 -08:00
Simon Michael
94b3f090be
csv, timedot, timeclock: respect --alias options ( fix #859 )
...
Command-line account aliases now also affect transactions read
from these formats (not just journal format).
lib: journalApplyAliases, transactionApplyAliases, postingApplyAliases
helpers have been added.
2020-11-24 09:17:01 -08:00
Simon Michael
9b9f2543d8
;lib: regexReplace: note the kind of RegexError still possible
2020-11-24 09:16:08 -08:00
Simon Michael
221a6d9001
lib: new more robust price lookup implementation, fixing #1402
2020-11-23 18:08:41 -08:00
Simon Michael
d60c1f764d
lib: partial valuation fix, more debug output for #1402
2020-11-22 13:10:31 -08:00
Simon Michael
654ab4243a
; comments
2020-11-20 16:45:40 -08:00
Simon Michael
4a74680a22
;lib: rename some budget report helpers
...
The new names are of course verbose, but more consistent and revealing.
2020-11-19 14:59:08 -08:00
Simon Michael
372c9724a8
bal: improve budget, MultiBalanceReport debug output
...
Comply with debug levels policy, clarify some labels.
2020-11-19 14:42:46 -08:00
Simon Michael
5bb9006b6c
bal: support CSV output for --budget reports ( #1155 )
2020-11-18 16:29:04 -08:00
Simon Michael
5d4a6cd47e
;csv: tweak CsvRules Show for consistency with others
2020-11-18 07:14:28 -08:00
Simon Michael
ec2a774b18
cli, lib: move functional tests into hledger/test/
2020-11-16 08:47:41 -08:00
Simon Michael
0ce9c352ec
add: don't let number style disturb the default ( Fixes #1378 )
2020-11-14 11:08:01 -08:00
Simon Michael
1f94aa1628
;lib: make file modification/reloading helpers more robust ( #1390 )
...
Work on hledger-web tests showed some bad behaviour, in particular
journalReloadIfNewer would always reload a journal read from a string
or stdout. This is now fixed, and an ugly read.show conversion has
been cleaned up.
Hledger.Cli.Utils API changes:
removed:
- journalSpecifiedFileIsNewer
- fileModificationTime
added:
- utcTimeToClockTime
changed:
- journalFileIsNewer now requires a file argument
2020-11-13 16:28:35 -08:00
Simon Michael
70f95e9f2c
;doc: journal: clarify that it's the first-seen digit group style
2020-11-10 09:29:04 -08:00
Simon Michael
8bdb28a991
csv, journal: infer style from first amount, as documented, not last
...
This has been broken since hledger 1.12 (!)
2020-11-10 08:58:28 -08:00
Simon Michael
f43c7e41d1
csv, journal: debug output
...
The prolific "assignment" output is now at level 9.
2020-11-10 08:39:32 -08:00
Simon Michael
a97daaf322
lib: replace pretty-show with pretty-simple
...
pretty-simple, already used in .ghci, will hopefully give nicer debug
output, including for values which don't have Read-able Show output.
This should mean that we can start removing custom string-like Show
instances that were a workaround for pretty-show.
We are using the latest version (4.0.0.0) to get compact output.
Here's some old pretty-show output:
CsvRules
{ rdirectives = [ ( "skip" , "1" ) ]
, rcsvfieldindexes = [ ( "date" , 1 ) , ( "amount" , 2 ) ]
, rassignments = [ ( "amount" , "%2" ) , ( "date" , "%1" ) ]
, rconditionalblocks = []
}
And the new pretty-simple output:
CsvRules
{ rdirectives=
[ ( "skip", "1" ) ]
, rcsvfieldindexes=
[ ( "date", 1 ), ( "amount", 2 ) ]
, rassignments=
[ ( "amount", "%2" ), ( "date", "%1" ) ]
, rconditionalblocks= []
}
Non-compact pretty-simple output would be:
CsvRules
{ rdirectives=
[
( "skip"
, "1B"
)
]
, rcsvfieldindexes=
[
( "date"
, 1
)
,
( "amount"
, 2
)
]
, rassignments=
[
( "amount"
, "%2"
)
,
( "date"
, "%1"
)
]
, rconditionalblocks=[]
}
Also:
- Account's Show instance no longer converts : to _ in account names
- drop unused pretty-show dependency from hledger, hledger-ui packages
- regenerate hledger-lib with the older hpack that's shipped in stack
2020-11-10 08:06:11 -08:00
Simon Michael
66af4962a1
;lib: drop a todo, seems ok
2020-11-09 17:14:38 -08:00
Simon Michael
bfb5c6ee2a
lib: global commodity display styles can be set in InputOpts or Journal, overriding all others
2020-11-09 17:14:37 -08:00
Simon Michael
0eddbe7a4b
;lib: reader cleanups
2020-11-09 17:14:37 -08:00
Stephen Morgan
74ce7be556
lib,ui: Make sure ReportSpec is updated when updating ReportOpts.
2020-11-09 16:30:15 -08:00
Stephen Morgan
3caf82c003
lib: Remove Empty Query constructor, which does nothing and has done so
...
for a very long time.
2020-11-09 11:21:40 -08:00
Stephen Morgan
c25612b8de
lib: Refactor to eliminate confusing variables.
2020-11-08 17:11:05 -08:00
Stephen Morgan
4cd3ed15a0
lib: Use simpler MultiBalanceReport valuation calculations in more cases.
2020-11-08 17:11:05 -08:00
Stephen Morgan
35a83fbd8c
lib: For MultiBalanceReport, report change in valuation rather than valuation of change.
2020-11-08 17:11:05 -08:00
Simon Michael
524e23bc37
csv: decimal-mark rule to help with number parsing
...
Journal keeps a new piece of parsing state, a decimal mark character,
which can optionally be set to force the number format expected by all
amount parsers.
2020-11-08 16:39:03 -08:00
Simon Michael
4242a8592a
;csv: refactor amount parsing
2020-11-08 16:39:03 -08:00
Simon Michael
dae007a372
cleanup
2020-11-08 16:39:03 -08:00
Stephen Morgan
166951dc69
bal: Sort amounts after negating when using invert_ ( #1283 , #1379 )
2020-11-05 10:35:47 -10:00
Stephen Morgan
83a518af99
lib,cli,ui: In ReportOpts, store query terms term-by-term in a list in
...
querystring_.
This helps deal with tricky quoting issues, as we no longer have to make
sure everything is quoted properly before merging it into a string.
2020-11-04 08:47:30 -08:00
Stephen Morgan
3abc9f5985
lib: When calculating elisions, don't skip over some amounts.
2020-11-04 14:25:21 +11:00
Stephen Morgan
6d7bd9e475
lib: Implement concat(Top|Bottom)Padded in terms of renderRow, allowing them to be width aware.
2020-11-04 14:25:21 +11:00
Stephen Morgan
a620ab9666
lib: Expand Tabular.AsciiWide to allow multiline cells, either top or bottom aligned.
2020-11-04 14:25:21 +11:00