Commit Graph

7941 Commits

Author SHA1 Message Date
Simon Michael
ca4fade4af ;tests: re-add hledger-lib's tests to the cabal file, as unittests 2019-11-28 14:45:10 -08:00
Simon Michael
daab432a29 ;doc: roadmap: belated goals update for upcoming release
[ci skip]
2019-11-28 14:37:51 -08:00
Simon Michael
843d394077 cli, ui, web: support GHC 8.8, add stack-ghc8.8.yaml (#1090)
hledger-web needs an unreleased version of json.
2019-11-28 14:31:48 -08:00
Simon Michael
5dac8af2ef ;ui: fix build error due to tests rewrite 2019-11-27 21:54:31 -08:00
Simon Michael
4ab5896902 close: add --close-to, --open-from to choose account names 2019-11-27 14:19:44 -08:00
Simon Michael
4faefcfab2 ;doc: regen manuals
[ci skip]
2019-11-27 13:18:08 -08:00
Simon Michael
177e24c078 ;tools: update make ghcid-test[-PAT]
[ci skip]
2019-11-27 13:17:34 -08:00
Simon Michael
91a3b03359 ;test: update command line help 2019-11-27 13:17:34 -08:00
Simon Michael
b36f6df110 tests: port all unit tests to tasty, second pass (#1090)
Hledger.Util.Tests helpers have been cleaned up, and test names are
now shown.

Tests have been cleaned up a bit. Some groups of unnamed tests have
been collapsed into a single named test containing a sequence of
assertions. The test command counts named tests, not assertions, so
the reported unit test count has dropped from 199 to 188.
2019-11-27 13:17:34 -08:00
Simon Michael
13a3542464 tests: port all unit tests to tasty, first cut (#1090)
easytest is not actively maintained and requires an old version of
hedgehog which does not support base-compat 0.11 & ghc 8.8.

This is still using the old easytest helpers, and not displaying test
names properly.
2019-11-27 12:43:43 -08:00
Simon Michael
8952dc9a93 ;stack: build with base-compat 0.11, for testing 2019-11-26 14:17:55 -08:00
Amitai Burstein
e15adddeb8 Add exit status code to check-dates 2019-11-23 13:43:47 -08:00
Simon Michael
3f0892556d ;lib: clarify choiceopt doc 2019-11-23 13:03:26 -08:00
Simon Michael
8b4ae4cd43 ;csv: another commented test for auto-generation of balancing posting
and remove some junk.

[ci skip]
2019-11-23 12:54:34 -08:00
Simon Michael
0beca72275 ;csv: doc: one-posting txns can now be generated (#1111/#1133)
[ci skip]
2019-11-23 12:28:41 -08:00
Simon Michael
464983f99a ;csv: add some commented tests for #1111/#1133
[ci skip]
2019-11-23 12:26:22 -08:00
Simon Michael
e893c9c107 ;doc: regen manuals
[ci skip]
2019-11-23 11:33:55 -08:00
Simon Michael
1432914081 ;ui: doc tweaks
[ci skip]
2019-11-23 11:33:55 -08:00
Dmitry Astapov
aa051a05cf lib: support generation of (un)balanced virtual postings in csv reader 2019-11-23 10:28:10 -08:00
Simon Michael
d8bf72ae73 ;doc: regen manuals
[ci skip]
2019-11-21 17:33:04 -08:00
Simon Michael
332624f9fa ui: B and V keys toggle display of cost, value 2019-11-21 17:33:04 -08:00
Brian Wignall
f8269e21ab Fix some simple typos 2019-11-20 13:33:33 -08:00
Mykola Orliuk
2a36ac0d62 ;lib: fix doctest for RawOptions 2019-11-19 20:43:19 +01:00
Simon Michael
a0d012a50c ;cli: use the test suites recompilation workaround here too (#1125)
Applying the same workaround used in the hledger-lib test suites, to
hledger's test & benchmark suites. It seems only a single other-module
was being added here (Paths_hledger.hs), but this may add a little speed
and prevent greater slowdowns in future.
2019-11-19 04:17:23 -08:00
Simon Michael
f0b2eed6c2 ;lib: clarify test suites recompilation workaround (#1125)
[ci skip]
2019-11-19 04:10:46 -08:00
Mykola Orliuk
f82ed83153 ;lib: re-enable easytests 2019-11-19 03:58:56 -08:00
Mykola Orliuk
097486a247 ;lib: re-enable doctests 2019-11-19 03:58:56 -08:00
Mykola Orliuk
6dbe925eed cli: anonymize transaction code also 2019-11-18 17:42:22 -08:00
Mykola Orliuk
0a273561f7 cli: anonymize declared accounts also
Fixes simonmichael/hledger#901
2019-11-18 17:42:22 -08:00
Mykola Orliuk
5287fe671b ;all: hide RawOpts internals
This way we can ensure we always use only functions from RawOptions.
2019-11-18 17:38:39 -08:00
Mykola Orliuk
8991419c68 ;all: drop dummy decodeRawOpts 2019-11-18 17:38:39 -08:00
Mykola Orliuk
31ae3d3aaf ;lib: drop SystemString left from GHC pre 7.2
We are relying on base-4.9 or newer. Thus we don't compile anymore with
GHC version lower than 8.0.1.
2019-11-18 17:38:39 -08:00
Simon Michael
68b1cacf0f lib: refactor, prepare to drop showTransactionUnelided functionality
It seems we don't use it at all, and ony says it's not robust with
prices either.

Merge remote-tracking branch 'ony/chores/drop-elide-in-showTransaction'
2019-11-18 17:27:30 -08:00
Simon Michael
4cb2a03f7f ;lib: more docs for unifyMixedAmount
[ci skip]
2019-11-18 17:22:42 -08:00
Simon Michael
69ee21cf16 ;doc: regen manuals
[ci skip]
2019-11-18 17:14:06 -08:00
Michael Kainer
79ca4a767e cli: Add -% to compound balance commands
This commit introduces the commandline argument -%/--percent to show
percentages of the column's total instead of the absolute amounts for
each account in reports. The signs of the values are preserved.

This option is especially useful for the balance and incomestatement
commands.

If there are multiple commodities involved in a report hledger bails
with an error message. This can be avoided by using --cost. Also note
that if one uses -% with the balance command the chances are high that
all numbers are 0. This is due to the fact that by default balance sums
up to zero. If one wants to use -% in a meaningful way with balance one
has to add a query.

In order to keep the implementation as simple as possible --tree has no
influence over how the percentages are calculated, i.e., the percentages
always represent the fraction of the columns total. If one wants to know
the percentages relative to a parent account, one has to use a query to
narrow down the accounts.
2019-11-18 17:10:59 -08:00
Dmitry Astapov
87b82b6839 lib: roi does not fail on empty input data (+test) 2019-11-18 16:13:04 -08:00
Mykola Orliuk
ab9c150759 ;lib: clean out showTransactionUnelided
Keep aliases until next major release.
2019-11-16 12:53:07 +01:00
Mykola Orliuk
aca214b0ac lib: drop amount elision in showing last posting
This behavior is highly depends on journal. If we want to re-introduce
it we'd better re-consider how transaction entry can be "simplified".
I.e. besides dropping last amount we may drop prices that can be assumed
implicitly.
Note that there is no need to knit it into showTransaction since it
easily achievable with pre-processing (similar to implicit balances
etc).
2019-11-16 12:53:07 +01:00
Dmitry Astapov
e49da20f8c test: balance-style -> balance-type 2019-11-13 09:06:25 -08:00
Dmitry Astapov
c4d650e6ad lib: balance-style -> balance-type 2019-11-13 09:06:25 -08:00
Dmitry Astapov
39bc183340 lib: csv reader gets balance-style directive 2019-11-13 09:06:25 -08:00
Simon Michael
fb3c1a132c csv: fix parsing of whitespace on line after an if block (fix #1120) 2019-11-13 05:41:32 -08:00
Simon Michael
9b74471d02 ;doc: regen csv manuals
[ci skip]
2019-11-12 13:32:35 -08:00
Simon Michael
470b5aca7b ;csv: doc: fix typo
[ci skip]
2019-11-12 13:32:05 -08:00
Simon Michael
dbe8638ba2 ;csv: doc: remove currencyN/amount limitation (#1113)
[ci skip]
2019-11-12 13:24:59 -08:00
Simon Michael
155e5ba9d0 ;examples: tricking roi to show unrealised gains
[ci skip]
2019-11-12 13:08:36 -08:00
Dmitry Astapov
94f912e558 lib: better resolution of csv field aliases ("balance" vs "balance1", etc) 2019-11-12 12:20:09 -08:00
Simon Michael
205ff9d2d6 ;csv: doc: more cleanups, consistency
[ci skip]
2019-11-12 12:04:57 -08:00
Simon Michael
e2f6252874 ;csv: examples updates
[ci skip]
2019-11-12 12:04:28 -08:00