Commit Graph

5651 Commits

Author SHA1 Message Date
Simon Michael
302ee50bfe update embedded manuals 2017-12-07 12:04:11 -08:00
Simon Michael
316b6f344e shake: build only the needed, pandoc-2-compatible pandoc filters 2017-12-07 12:02:13 -08:00
Simon Michael
c082f2676b shake: switch to default resolver (nightly) & pandoc 2 2017-12-07 12:01:36 -08:00
Simon Michael
9013694d89 cabal: regenerate with stack 1.6/hpack 0.20 2017-12-07 11:46:33 -08:00
Simon Michael
99dfcd9e90 stack, hakyll-std: use latest snapshots 2017-12-06 20:57:14 -08:00
Simon Michael
caff99637b doc: mention haddocks 2017-12-06 20:54:05 -08:00
Simon Michael
0f2b95041e doc: fix breakage in text manuals 2017-12-06 20:53:36 -08:00
Simon Michael
66f01ff466 doc: Merge branch 'doc-files-cleanup'
Move package manual files out of doc/, and remove the man section
number from all but the nroff files.
2017-12-06 18:56:45 -08:00
Simon Michael
85d19836f6 update doc/README 2017-12-06 18:54:05 -08:00
Simon Michael
c18a75ecfe fix data-files paths in yaml/cabal files 2017-12-06 18:45:01 -08:00
Simon Michael
f3820e1e7a fix hledger/.otherdocs symlinks & README 2017-12-06 18:39:37 -08:00
Simon Michael
968cff7a4a remove numbers from all but nroff filenames 2017-12-06 18:35:18 -08:00
Simon Michael
61a2fa4d53 move package manual files out of doc/ 2017-12-06 18:26:20 -08:00
Simon Michael
df7f5e1659 rename hledger manual subfiles 2017-12-06 18:23:20 -08:00
Simon Michael
1d26845525 remove */doc/README 2017-12-06 18:18:03 -08:00
Simon Michael
b425e50ad1 change paths in code, scripts, readme 2017-12-06 18:16:35 -08:00
Simon Michael
d637e2fbcd doc: expand doc/README, describe doc files and workflows 2017-12-06 13:28:52 -08:00
Simon Michael
1d2580886f doc: move project finances to their own subdirectory 2017-12-06 09:16:40 -08:00
Simon Michael
ce694fec2b ui: allow vty-5.19 2017-12-05 14:41:03 -08:00
Simon Michael
cba306d9e5 tools: make bench: disable slowest 10k-txn benchmarks by default 2017-12-05 14:38:55 -08:00
Simon Michael
79965c5186 tools: make bench: just run hledger in $PATH by default 2017-12-05 14:32:28 -08:00
Mykola Orliuk
95db5062d6 journal: inherit commodities in included files
Followup on some comments for simonmichael/hledger#487
2017-12-04 12:26:26 -08:00
Mykola Orliuk
9cdd02e0b0 journal: pretty errors for included files
Fixes simonmichael/hledger#660
2017-12-04 12:26:26 -08:00
Mykola Orliuk
fa2e680b2e lib: fix styles after cost application
Fixes simonmichael/hledger#509
2017-12-04 12:26:26 -08:00
Dmitry Astapov
58c755df86 lib: fix budget display to always show %% consumed and handle costs
For multi-column balance report, if there are no transactions in the
given period for budgeted account, display [0% of <budget>] for
consistency.

If balance is a mix of commodities, convert to cost basis for the
purposes of computing percent of balance spent.
2017-12-01 15:52:29 -08:00
Simon Michael
30e4d26534 tools: add bench.hs with notes; make quickbench -> make bench 2017-11-29 07:41:53 -08:00
Dmitry Astapov
6f92e70575 lib: remove needless numeric comparisons in bal/bs
accountsFromPostings is currently doing excessive work when adding up
postings in each account. It sorts (accountName, amount) tuples which
cause amounts in them to be compared. There is no need to look at amount
here at all since subsequent summing up and counting does not depend on
order. It is enough to sort by accountname only.

Went through similar pieces of code, made them all look uniform.
2017-11-29 07:08:18 -08:00
Dmitry Astapov
cf0dfa9f58 lib: add dependecy on 'extra' package
It has a collection of useful list processing functions.
2017-11-29 07:08:18 -08:00
Mykola Orliuk
d05bdd5b4e hledger-check: compatibility with stack8.0.yaml 2017-11-29 07:05:22 -08:00
Simon Michael
4228203740 doc: regenerate embedded manuals
[ci skip]
2017-11-28 17:37:27 -08:00
Simon Michael
c433873e04 ui: doc: mention A key 2017-11-28 17:37:16 -08:00
Mykola Orliuk
9df985f8c6 doc: resolving of amount decimal/group ambiguity 2017-11-27 15:47:56 -08:00
Mykola Orliuk
e58272f28f journal: use groups sep and prec for decimal hint
Use whole AmountStyle in process of resolving decimal/groups separator
ambiguity.

Resolve simonmichael/hledger#399
2017-11-27 15:47:56 -08:00
Mykola Orliuk
7cbdeb40a4 journal: get decimal hint from default commodity
If appropriate commodity directive is missing fallback to default
commodity directive to get number representation style.
2017-11-27 15:47:56 -08:00
Mykola Orliuk
b7dbe044b0 journal: use decimal sep hint for amount parser
Make use of commodity format directive as a hint for parsing amount.

Kinda resolves simonmichael/hledger#487
2017-11-27 15:47:56 -08:00
Mykola Orliuk
dafdaec1ca journal: factor out rawnumberp 2017-11-27 15:47:56 -08:00
Mykola Orliuk
bcf7a1add5 journal: make numbers parsing more strict
- Hunt down adjacent punctuations with altering char.
- Add some tests dedicated to parsing amounts.
2017-11-27 15:47:56 -08:00
Mykola Orliuk
53ad035b24 journal: limit scope of directives backtracking
Effectively improves error reporting for directives.

Resolves simonmichael/hledger#402
2017-11-27 14:32:48 -08:00
Mykola Orliuk
48623b4ceb lib: fix backtracking in periodexpr parser
- Simplify doctests for periodexpr.
- Besides consuming leading space consume ending space for periodexpr also.
- Drop implicit option (def, def) behaviour of periodexpr. I.e. disallow
  hledger reg -p '' and auto-transaction with heading just '~'.
- Slightly re-factor periodexpr.
- Ensure that reportinginterval doesn't consume trailing space.
  Useful if  we'll start disallowing periods like "every1stjan2009-".
2017-11-27 06:38:47 -08:00
Simon Michael
8ab1911345 Merge branch 'adept-budgeting-and-forecasting' (#654)
Cleaned-up versions of a number of related PRs relating to budgeting,
periodic transactions, automated postings and period expressions, such
as: #644, #645, #646, #647, #651, #652, #653.
2017-11-26 14:57:27 -08:00
Dmitry Astapov
aca82cf400 doc: budgeting and forecasting how-to, demonstrating new features 2017-11-26 14:57:41 +00:00
Dmitry Astapov
8cd58b71ab bal: show percentage of budget spent 2017-11-26 14:57:41 +00:00
Dmitry Astapov
6ea5da2d9d bal: --budget shows budget performance
Budget goals specified with periodic transactions (as with
hledger-budget) can now be displayed in balance report (but not in bs/is/cf).

--budget shows the target amount and percentage alongside the actual
amount, per account and period.

Unbudgeted accounts will be hidden, unless --show-unbudgeted is used.

Budgeted accounts are displayed folded (depth-clipped) at a depth
matching the budget specification. Unbudgeted accounts, if shown, are
displayed at their usual depth (in full detail, or according to --depth).
2017-11-26 14:57:41 +00:00
Dmitry Astapov
23f3da4e92 cli: --auto adds automated postings to reports
Ledger-style automated postings, previously supported only by
hledger-budget, have landed as a first-class feature.  The --auto
flag activates them, so that any postings they generate are
included in reports.
2017-11-26 14:57:41 +00:00
Dmitry Astapov
f101d5b515 cli: --forecast adds periodic transactions to reports
Ledger-style periodic transactions, previously supported only by
hledger-budget, have landed as a first-class feature.  The --forecast
flag activates them, so that any transactions they generate are
included in reports.
2017-11-26 14:57:41 +00:00
Dmitry Astapov
50b4d76ce9 lib: runPeriodicTransaction's start date must line up with interval
This is very helpful for periodic transactions, because in budget mode
you need to ensure that no periodic transactions extend past the end
of the journal, and in forecast mode you need to make sure that all
periodic transactions are strictly after the end of the journal.
2017-11-26 14:57:41 +00:00
Dmitry Astapov
597e9c47c9 lib: more periodic transaction tests
Some of these demonstrate that runPeriodicTransaction could generate
transactions ouside of requested DateSpan. This happens because
runPeriodicTransaction uses splitSpan internally, and splitSpan always
generates dateSpans that fully cover original DateSpan, extending
beyound left/right boundary if necessary. This is ok if transactions
are generated for budgeting purpose, but during forecasting care should
be taken to check that all generated transactions are happening past
the end of the real journal.
2017-11-26 14:57:41 +00:00
Dmitry Astapov
0dfffed52c doc: expand documentation for period expressions
Document "first day of period" behavior. Document new period
expressions DayOfYear and WeekdayOfMonth.
2017-11-26 14:57:41 +00:00
Dmitry Astapov
950891b55b lib: support "every <weekday>"
A shorter spelling for "every <n>th day of week".
2017-11-26 14:57:41 +00:00
Dmitry Astapov
993e3f2b67 lib: support "every 2nd Thursday of month" in period expressions
Useful for periodic transactions.
2017-11-26 14:57:41 +00:00