Commit Graph

2094 Commits

Author SHA1 Message Date
Simon Michael
490ab140cd ;doc: timedot: drop FILE FORMAT heading
[ci skip]
2020-01-25 17:10:10 -08:00
Simon Michael
444c4342ed ;doc: manuals: hide NAME/SYNOPSIS/DESCRIPTION headings in web manuals
[ci skip]
2020-01-25 16:57:51 -08:00
Simon Michael
9710c86c7f ;doc: regen manuals
[ci skip]
2020-01-22 12:52:41 -08:00
Simon Michael
5f7ae2ced6 ;lib: Amount: export mixedAmountStripPrices 2020-01-22 11:57:42 -08:00
Simon Michael
9874d29953 ;doc: journal: 2 spaces required in same line account comments (#1182)
[ci skip]
2020-01-22 05:42:22 -08:00
Simon Michael
090f65ec83 ;doc: regen manuals
[ci skip]
2020-01-20 18:02:42 -08:00
Simon Michael
64546cd54a lib: export mapMixedAmount 2020-01-20 18:01:33 -08:00
Simon Michael
80ab45984b csv: also recognise .tsv, .ssv extensions; document thoroughly (#1179) 2020-01-20 12:58:47 -08:00
Simon Michael
42dfde141a ;doc: changelogs: update from 1.16.2, cleanups 2020-01-14 11:19:05 -08:00
Simon Michael
dba0b117f4 ;doc: draft changelogs 2020-01-14 10:08:59 -08:00
Simon Michael
445e8aa3cc add support for megaparsec 8 (#1175) 2020-01-14 09:54:06 -08:00
Brian Wignall
473b3376ab ;doc: update shell output in hledger*/*.m4.md to use ISO date formatting 2020-01-13 12:32:41 -08:00
Jakob Schöttl
c7a88b50fb Fix timeclock format parsing
Fix presumably copy-paste errors

timeclock format has only timeclock lines or empty/comment lines

Update test format to v3, add new tests

Throw error on unexpected clock codes in timeclock format

Fix missing case in pattern matching
2020-01-12 13:17:36 -08:00
Simon Michael
65efdea4c0 ;doc: regen some manuals
[ci skip]
2020-01-07 16:24:51 -08:00
Brian Wignall
ab12ff916f Update "showPeriod" to use yyyy-mm-dd formatting 2020-01-07 15:58:54 -08:00
Brian Wignall
00eb0b3c8f Make "stack test" pass again 2020-01-07 15:58:22 -08:00
Brian Wignall
35481a665b Change Date output to yyyy-mm-dd 2020-01-07 15:58:22 -08:00
Simon Michael
be72497ebb ;doc: journal: corrections for D directive's scope (#1170)
[ci skip]
2020-01-07 07:38:51 -08:00
Aleksandar Dimitrov
3bf6ef9a8b Update documentation on separators 2020-01-05 14:45:57 -08:00
Aleksandar Dimitrov
3ead97975c Inline function, add debug statement 2020-01-05 14:45:57 -08:00
Aleksandar Dimitrov
9011aaa5ba Refactor getSeparator 2020-01-05 14:45:57 -08:00
Aleksandar Dimitrov
92f680875f Parse reserved words case insensitively 2020-01-05 14:45:57 -08:00
Aleksandar Dimitrov
8df4e1ed83 Remove --separator command line argument 2020-01-05 14:45:57 -08:00
Aleksandar Dimitrov
02d9205af7 Allow separator to be overridden from command line
This also fixes that parsing separators on the command line and the
rules file was not handled the same way.
2020-01-05 14:45:57 -08:00
Aleksandar Dimitrov
b524a088c7 Implement getting separator from rules 2020-01-05 14:45:57 -08:00
Aleksandar Dimitrov
32ccc3a2b2 Add directive 2020-01-05 14:45:57 -08:00
Aleksandar Dimitrov
ec0f55d18e Add missing type signature 2020-01-05 14:45:57 -08:00
Aleksandar Dimitrov
b104b3b8a3 Explictly discard result 2020-01-05 14:45:57 -08:00
Aleksandar Dimitrov
42d585d20b Refactor: rename variable 2020-01-05 14:45:57 -08:00
Aleksandar Dimitrov
63cda87e86 Whitespace 2020-01-05 14:45:57 -08:00
Simon Michael
07029047f5 ;doc: regen manuals again
[ci skip]
2020-01-05 09:17:02 -08:00
Simon Michael
cfb2a61ae1 ;bump to dev version; bump man page dates
[ci skip]
2020-01-05 09:04:50 -08:00
Simon Michael
f91076cc6a ;doc: regen manuals
I think all the non-content changes are due to newer
doc tools and harmless, including this one hopefully:

    -.B \f[C]--watch\f[R]
    +\f[B]\f[CB]--watch\f[B]\f[R]

[ci skip]
2020-01-05 07:06:42 -08:00
Simon Michael
ce5eccfbc0 ;spelling fix
[ci skip]
2020-01-04 21:17:50 -08:00
Stephen Morgan
228edf6ba6 Don't store leaf name in PeriodReport.
Calculate at the point of consumption instead.
2020-01-04 21:15:42 -08:00
Stephen Morgan
2e20d0717f lib: Generalise PeriodicReport to be polymorphic in the account labels. 2020-01-04 17:23:17 -08:00
Stephen Morgan
88dc619257 lib: Use records instead of tuples in PeriodicReport. 2020-01-04 17:23:17 -08:00
Stephen Morgan
beb8b6d7c8 lib: Use PeriodicReport in place of MultiBalanceReport. 2020-01-04 17:23:17 -08:00
Stephen Morgan
74778efcf5 Use nubSort instead of nub . sort. 2020-01-04 08:31:10 -08:00
Simon Michael
390cea7f7c ;doc: note that -I does not disable balance assignments
[ci skip]
2020-01-04 08:22:45 -08:00
Stephen Morgan
38904372b2 Calculate MultiReportBalance columns more efficiently.
Only calculate posting date once for each posting, and calculate their
columns instead of checking each DateSpan separately.
2020-01-03 16:11:46 -08:00
Simon Michael
0b734be445 ; silence safe 0.3.18's deprecation warnings for now
(max|min)imum(By)?Def are being replaced by (max|min)imumBound(By)?
but the old functions have the semantics I want and
I don't understand the new ones yet.
This can hide other deprecation warnings in this file,
and presumably the old functions will be removed later,
so this is temporary.
Cf https://github.com/ndmitchell/safe/issues/26
2019-12-28 15:52:32 -08:00
Simon Michael
c5537cedb5 ;lib: drop more unnecessary toJSON calls 2019-12-27 15:49:42 -08:00
Stephen Morgan
b9b16da8ed Correct finding latest date in queryEndDate Or queries and simplify date
comparison code.
2019-12-24 05:04:51 -08:00
Brian Wignall
2852f9dbee Fix typos 2019-12-21 12:09:05 -08:00
Simon Michael
4266db5633 ;csv: doc: document balance-type
[ci skip]
2019-12-20 10:41:24 -08:00
Simon Michael
7fa7ccc033 ToJSON instances for all (?) remaining data types, up to Ledger 2019-12-16 17:17:00 -08:00
Simon Michael
46d516e7a3 move JSON instances from hledger-web to hledger-lib 2019-12-16 17:17:00 -08:00
Simon Michael
47567cd770 ;fix some warnings with GHC 8.10 alpha
hledger is GHC 8.10 ready!
2019-12-14 17:30:19 -08:00
Simon Michael
2a2f08bb58 ;doc: csv: mention that fields rule's separator != csv separator
[ci skip]
2019-12-14 14:00:59 -08:00
Simon Michael
2825a06e8e ;doc: csv: expand help on other separator characters
[ci skip]
2019-12-14 13:57:48 -08:00
Simon Michael
f099fb558e ;doc: csv: mention entr for rapid feedback
[ci skip]
2019-12-09 14:46:02 -08:00
Simon Michael
95aa2e16cc ;doc: fix some old wiki and Cookbook references (hledger_site/#10) 2019-12-09 06:08:03 -08:00
Simon Michael
c759c9b3de ;lib: fix some more warnings in Transaction 2019-12-09 06:08:03 -08:00
Simon Michael
13e6c7dfdf lib: drop "assertion" alias for nullassertion
Perhaps we'll stick with the null* convention. Fixes a warning in Transaction.hs.
2019-12-09 06:08:03 -08:00
Jacek Generowicz
29211868bb Fix issue 457
Issue #457 pointed out that commands such as

    hledger ui 'amt:>200'

failed. This was becasue the process of dispatching from `hledger ui`
to `hledger-ui` (note addition of `-`) lost the quotes around
`amt:>20` and the `>` character was interpreted as a shell redirection
operator, rather than as part of the argument.

The machinery for quoting or escaping arguements which cointain
characters which require quoting or escaping (thus far whitespace and
quotes) already existed. This solution simply adds shell stdio
redirection characters to this set.

Fixes #457
2019-12-08 18:33:43 +01:00
Simon Michael
5a2bcecf26 ;doc: finalise changelogs 2019-12-03 08:41:44 -08:00
Simon Michael
06b70194c0 ;doc: regen manuals 2019-12-03 08:41:44 -08:00
Simon Michael
093dca570d lib, cli, web: bump version to 1.16.1 2019-12-03 08:41:44 -08:00
Simon Michael
6ae837f820 ;doc: changelogs 2019-12-03 08:41:44 -08:00
Simon Michael
e032eff8eb ;doc: changelog updates 2019-12-02 08:59:58 -08:00
Simon Michael
0ce890e5ff lib, cli, web: drop unnecessary mtl-compat dependency 2019-12-02 08:23:00 -08:00
Simon Michael
62a9e1aa62 ;lib: clarify Hledger.Read imports a little 2019-12-02 08:21:06 -08:00
Simon Michael
a0b92e02b9 Revert "remove old fail compatibility imports that are obsolete ?"
They are needed with ghc <8.4, not for fail but for <> I think.
Try cleaning up again another time.
This reverts commit 318ce7eb07.
2019-12-01 11:32:51 -08:00
Simon Michael
d922b6e798 ;doc: regen manuals 2019-12-01 10:12:29 -08:00
Simon Michael
6daebf60ea ;regen cabal files 2019-12-01 10:05:37 -08:00
Simon Michael
87d0491103 ;bump version to 1.16 2019-12-01 10:03:58 -08:00
Simon Michael
c90c0867c4 ;doc: changelogs
[ci skip]
2019-12-01 09:59:01 -08:00
Simon Michael
4b66bc2ed9 lib: disable doctest suite again till we can run it with cabal (#1139) 2019-12-01 09:13:18 -08:00
Simon Michael
318ce7eb07 remove old fail compatibility imports that are obsolete ? 2019-12-01 08:31:50 -08:00
Simon Michael
279e9624ed ;lib: clarify docs for setFullPrecision, setNaturalPrecision 2019-11-30 16:56:45 -08:00
Simon Michael
a081404bd7 ;doc: journal: rewrite commodity directive doc
[ci skip]
2019-11-30 08:34:13 -08:00
Simon Michael
359a118900 ;doc: draft changelog updates
[ci skip]
2019-11-29 07:57:54 -08:00
Simon Michael
caf8cdf0ca ;test: consistent singular naming for test suites and files 2019-11-29 06:35:29 -08:00
Simon Michael
c7574b8005 ;lib, cli: test suite cleanups, don't run hledger-lib tests twice 2019-11-29 06:11:25 -08:00
Simon Michael
2b2a0b3cf8 ;tests: use "test" alias for testCase everywhere
Easier to type and read, and a little clearer to my eyes;
"testCase" implies a single case, but it can contain many assertions.
2019-11-28 15:33:33 -08:00
Simon Michael
030b633cd6 ;fix build issues with old GHC versions 2019-11-28 15:22:12 -08:00
Simon Michael
ebedae01cf ;cabal: remove special cases for unsupported GHC 7 2019-11-28 14:59:18 -08:00
Simon Michael
08951ac3e8 ;cabal: add ghc 8.8 to tested-with
[ci skip]
2019-11-28 14:59:10 -08:00
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
5dac8af2ef ;ui: fix build error due to tests rewrite 2019-11-27 21:54:31 -08:00
Simon Michael
4faefcfab2 ;doc: regen manuals
[ci skip]
2019-11-27 13:18:08 -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
3f0892556d ;lib: clarify choiceopt doc 2019-11-23 13:03:26 -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
Dmitry Astapov
aa051a05cf lib: support generation of (un)balanced virtual postings in csv reader 2019-11-23 10:28:10 -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
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
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
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
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
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
c4d650e6ad lib: balance-style -> balance-type 2019-11-13 09:06:25 -08:00