Commit Graph

7614 Commits

Author SHA1 Message Date
Simon Michael
ad00da244b reg: support --value-at with -H (#329) 2019-05-05 17:47:38 -07:00
Simon Michael
4c56baf842 ;doc:options:update --value-at support 2019-05-05 11:12:01 -07:00
Simon Michael
2ba0281335 bal: fix --value-at for old-style single period balance reports (#329) 2019-05-05 10:51:07 -07:00
Simon Michael
629b590de1 ;lib: cleanup 2019-05-05 10:38:13 -07:00
Simon Michael
76542458e6 lib: mapJournalTransactions, mapJournalPostings, mapTransactionPostings 2019-05-05 10:35:49 -07:00
Simon Michael
5a13bc632d ;clarify ledgerFromJournal doc 2019-05-05 10:09:40 -07:00
Simon Michael
1ad82d5b77 ;lib: balanceReport cleanup 2019-05-05 09:57:03 -07:00
Simon Michael
f4b0381043 ;lib: more docs for balanceReport 2019-05-05 09:50:29 -07:00
Simon Michael
8d7eacd73f bal: support --value-at=p/t with multiperiod reports (#329) 2019-05-05 09:30:01 -07:00
Simon Michael
74c381cc88 ;lib: more docs for multiBalanceReport 2019-05-04 17:46:52 -07:00
Simon Michael
66b1599058 ;lib: postingsReport cleanup 2019-05-04 17:09:16 -07:00
Simon Michael
cc05f48697 ;lib: multiBalanceReport cleanup 2019-05-04 12:34:59 -07:00
Simon Michael
3a79e300c9 ;bal: cleanup 2019-05-04 12:22:00 -07:00
Simon Michael
12c0bfb39b ;lib: brValue cleanup 2019-05-04 12:22:00 -07:00
Simon Michael
ec1b98434c reg: support --value-at=period with periodic reports (#329) 2019-05-04 12:22:00 -07:00
Simon Michael
dd8c403c81 ;cli: option help tweaks 2019-05-04 12:22:00 -07:00
Simon Michael
cca0b7aec6 ;update changelogs 2019-05-04 12:21:54 -07:00
Simon Michael
ebf5ed93f2 valuation: more thorough --value-at; document status (#329, #999)
This feature turns out to be quite involved, as valuation interacts
with the many report variations. Various bugs/specs have been
fixed/clarified relating to register's running total, balance totals
etc. Eg register's total should now be the sum of the posting amount
values, not the values of the original sums. Current level of support
has been documented.

When valuing at transaction date, we once again do early valuation of
all posting amounts, to get more correct results. variants. This means
--value-at=t can be slower than other valuation modes when there are
many transactions and many prices. This could be revisited for
optimisation when things are more settled.
2019-05-03 12:24:02 -07:00
Simon Michael
7dd5475187 gitignore: *.prof [ci skip] 2019-05-03 12:23:20 -07:00
Simon Michael
040f2ba1bf doc: cli: consistent examples styling
[ci skip]
2019-05-03 11:29:43 -07:00
Jakob Schöttl
6d0161d742 Add CLI tests for report interval 2019-04-28 10:44:37 +02:00
Simon Michael
4fd09bedfc doc: options: value-at: help fix
[ci skip]
2019-04-26 12:22:21 -07:00
Simon Michael
696e3098c8 reg: support --value-at in register reports; cleanups, tests 2019-04-26 12:08:46 -07:00
Simon Michael
7306e61646 bal: support --value-at in single column balance reports 2019-04-26 12:08:32 -07:00
Simon Michael
00975fb226 bal*: support --value-at in multicolumn balance reports 2019-04-26 12:08:31 -07:00
Simon Michael
65934958f9 rename --value-date -> --value-at; --value-at implies -V 2019-04-26 12:08:31 -07:00
Simon Michael
6626778012 lib: amountValue, commodityValue doc cleanups 2019-04-26 12:08:31 -07:00
Simon Michael
9adae02973 print: add --value-date general option; implement for print -V 2019-04-26 12:08:31 -07:00
Simon Michael
a08140b073 doc: options: argument files: link to main site, not github 2019-04-26 12:08:31 -07:00
Simon Michael
14086dbd74 make site-watch: site-liverender & site-livereload in one command
[ci skip]
2019-04-25 08:10:30 -07:00
Simon Michael
688bdf86ec site: symlink CONTRIBUTING.md instead of copying, less confusing
[ci skip]
2019-04-25 08:10:06 -07:00
Simon Michael
93a7dc3461 site: don't render /README.md as part of site, not used & confusing
[ci skip]
2019-04-25 08:05:57 -07:00
Simon Michael
0ec16712dc site: download: *bright* green
[ci skip]
2019-04-24 12:26:31 -07:00
Simon Michael
e7e532ae46 site: download: bump gentoo badge
[ci skip]
2019-04-24 12:25:13 -07:00
Simon Michael
5be688b7f4 site: download: tweak
[ci skip]
2019-04-24 12:23:10 -07:00
Simon Michael
eb465b45cd site: download: formatting
[ci skip]
2019-04-24 08:50:07 -07:00
Simon Michael
0d1dcced56 site: download: wine
[ci skip]
2019-04-24 08:49:29 -07:00
Simon Michael
1d81316681 tests: convert market prices tests to format 3
[ci skip]
2019-04-24 08:43:02 -07:00
Simon Michael
9d3eb8c069 bal, reg, print: -V prefers non-future valuation dates again (#999) 2019-04-24 08:31:21 -07:00
Simon Michael
ef9c4a29c4 lib: save the current date in ReportOpts
We need this for choosing a valuation date, otherwise, report
functions would have to be in IO or we'd have to pass in yet another
argument.

It's optional because it's useful to be able to create report opts
purely (I think ?) This is not ideal but maybe not a problem.
2019-04-24 08:25:55 -07:00
Simon Michael
d04a5a03f0 tools: generatejournal: vary amount, make reports with fewer zeroes 2019-04-24 07:56:45 -07:00
Simon Michael
e9d2b56fb2 make samplejournals: more; don't remake ones used for tests 2019-04-24 07:55:20 -07:00
Simon Michael
c23fc8b671 speed up -V/--value by converting reports, not the journal (#999)
Instead of converting all journal amounts to value early on, we now
convert just the report amounts to value, before rendering.

This was basically how it originally worked (for the balance command),
but now it's built in to the four basic reports used by print,
register, balance and their variants - Entries, Postings, Balance,
MultiBalance - each of which now has its own xxValue helper.

This should mostly fix -V's performance when there are many
transactions and prices (the price lookups could still be optimised),
and allow more flexibility for report-specific value calculations.

+------------------------------------------++-----------------+-------------------+--------------------------+
|                                          || hledger.999.pre | hledger.999.1sort | hledger.999.after-report |
+==========================================++=================+===================+==========================+
| -f examples/1000x1000x10.journal bal -V  ||            1.08 |              0.96 |                     0.76 |
| -f examples/2000x1000x10.journal bal -V  ||            1.65 |              1.05 |                     0.73 |
| -f examples/3000x1000x10.journal bal -V  ||            2.43 |              1.58 |                     0.84 |
| -f examples/4000x1000x10.journal bal -V  ||            4.39 |              1.96 |                     0.93 |
| -f examples/5000x1000x10.journal bal -V  ||            7.75 |              2.99 |                     1.07 |
| -f examples/6000x1000x10.journal bal -V  ||           11.21 |              3.72 |                     1.16 |
| -f examples/7000x1000x10.journal bal -V  ||           16.91 |              4.72 |                     1.19 |
| -f examples/8000x1000x10.journal bal -V  ||           27.10 |              9.83 |                     1.40 |
| -f examples/9000x1000x10.journal bal -V  ||           39.73 |             15.00 |                     1.51 |
| -f examples/10000x1000x10.journal bal -V ||           50.72 |             25.61 |                     2.15 |
+------------------------------------------++-----------------+-------------------+--------------------------+

There's one new limitation, not yet resolved: -V once again can pick a
valuation date in the future, if no report end date is specified and
the journal has future-dated transactions. We prefer to avoid that,
but reports currently are pure and don't have access to today's date.
2019-04-23 17:39:01 -07:00
Simon Michael
9ac1d7869b lib: journalStartDate, journalEndDate 2019-04-23 13:58:32 -07:00
Simon Michael
1cacfcea28 lib: fix journalApplyValue test (#999) 2019-04-23 07:20:10 -07:00
Simon Michael
08d226aaf5 lib: add a test for journalApplyValue that times itself (#999)
This test prints the time elapsed (before the OK message).
Mainly to support current performance tuning
(make ghcid-test-Hledger.Cli.Utils.journalApplyValue),
but also for future reference.
2019-04-22 16:40:58 -07:00
Simon Michael
168edb910e lib: try a single filter again to speed up -V; simplify a bit (#999)
There was no speedup, in fact.
2019-04-22 16:38:42 -07:00
Simon Michael
76b933641d rejigger Hledger.Cli tests to have correct prefix, add Cli.Utils 2019-04-22 12:47:28 -07:00
Simon Michael
028303acd7 lib: speed up -V by sorting market prices just once (#999)
-V is still quite a bit slower than no -V, but not as much as before:

+===========================================================++=======+
| hledger.999.pre -f examples/10000x10000x10.journal bal    ||  5.20 |
| hledger.999.pre -f examples/10000x10000x10.journal bal -V || 57.20 |
| hledger.999 -f examples/10000x10000x10.journal bal        ||  5.34 |
| hledger.999 -f examples/10000x10000x10.journal bal -V     || 17.50 |
+-----------------------------------------------------------++-------+
2019-04-20 13:12:53 -07:00
Simon Michael
5911c73757 make: use profiterole, not profiteur
[ci skip]
2019-04-20 09:25:36 -07:00