Stephen Morgan
020dd15be4
ref: Simplify parsing of commodity-style option.
2021-09-18 11:41:53 -10:00
Stephen Morgan
6b400194e3
cln: Add explicit export list for Hledger.Data.Account.
...
All modules in hledger-lib now have explicit export lists, with the
exception of Hledger.Data.Types.
2021-09-18 11:41:53 -10:00
Stephen Morgan
c1d85ba17c
ref: Move JournalParser and ErroringJournalParser to Hledger.Data.Journal.
...
This is so that Hledger.Utils does not depend on Hledger.Data in any
way, and allows us more flexibility in refactoring Hledger.Data.
2021-09-18 11:41:53 -10:00
Simon Michael
993e381307
;doc: update manuals
2021-09-18 11:24:52 -10:00
Simon Michael
633af61b2e
imp: cli: move --today to reportflags ( #1674 )
2021-09-18 11:24:27 -10:00
Simon Michael
02a79fb230
;tests: ui: use --today to make hledger-ui tests robust ( #1674 )
2021-09-18 11:10:25 -10:00
Simon Michael
8a4cea2a69
;doc: update manuals
2021-09-17 17:58:10 -10:00
Stephen Morgan
62351dd329
fix: bal: Make sure boring parent accounts in compound balance reports
...
include historical postings when account declarations have undeclared
parents. (#1698 )
2021-09-17 15:24:19 -10:00
Stephen Morgan
3b5262e54a
fix: performance: Speed up PostingsReport when called with a large number of intervals. ( #1683 )
...
It is still very slow for large journals, but at least it doesn't run
any slower for interval reports.
2021-09-16 17:40:24 -10:00
Malte Brandy
724c84fe50
;doc: Convert some plain urls to links
2021-09-16 07:06:08 -10:00
Stephen Morgan
df424a7a96
fix: web: Do not hide empty accounts if they have non-empty subaccounts. ( #1237 )
2021-09-10 16:44:57 -10:00
Stephen Morgan
36f5bc9d23
;doc: Document --today in the manuals.
2021-09-10 10:40:50 -10:00
Stephen Morgan
54f2600db2
imp: cli: Let --today option handle smart dates, determined relative to
...
the current date.
2021-09-10 10:40:50 -10:00
Simon Michael
7a249cffe9
;doc: update manuals
2021-09-09 14:45:01 -10:00
Simon Michael
ddec2cedf3
;doc: update CLI usage texts
2021-09-09 14:44:09 -10:00
Stephen Morgan
c0053cb9ba
doc: Document --today in the manual.
2021-09-09 14:40:39 -10:00
Stephen Morgan
0f205295e8
pkg!: test: Use --today in Journal parsing functions.
2021-09-09 14:40:39 -10:00
Stephen Morgan
3456fcb862
test: ui: web: Use report date from _rsDay for hledger-ui and
...
hledger-web, rather than getCurrentDay.
File watching in hledger-ui continues to use getCurrentDay.
2021-09-09 14:40:39 -10:00
Stephen Morgan
6905e40c4d
pkg!: cli: Add --today option to explicitly set the current date. ( #1674 )
...
rawOptsTo* in hledger-lib now takes a day as an argument, and does not
live in the IO monad, since it's now pure.
This is so that we can run tests containing future transactions that
won't fail as soon as ‘the future’ actually arrives.
2021-09-09 14:40:39 -10:00
Stephen Morgan
765466c392
dev!: ui: Rename fields of UIOpts for consistency.
...
In code, either replace the name with the new name, or use the lenses
instead.
watch_ -> uoWatch
cliopts_ -> uoCliOpts
2021-09-09 13:31:43 -10:00
Stephen Morgan
7f7f1a2cdf
ref: ui: lens: Use lenses in UIState, saving a lot of boilerplate.
2021-09-09 13:31:43 -10:00
Stephen Morgan
f471258a48
dev: ui: lens: Add classy lens instances for UIOpts and UIState.
2021-09-09 13:31:43 -10:00
Stephen Morgan
09a2449f4f
ref: ui: Pull register and theme options into UIOpts.
2021-09-09 13:31:43 -10:00
Stephen Morgan
54c73ff759
ref: ui: Refactor code to eliminate requirement for change_ in UIOpts.
...
--change is already stored in balanceaccum_ in ReportOpts, so it does
not need to be stored in UIOpts too.
2021-09-09 13:31:43 -10:00
Stephen Morgan
50f73b7434
fix: balance: Show all empty accounts in flat balance reports. ( #1688 )
...
Previously we only showed empty leaves.
2021-09-08 18:17:27 -10:00
Stephen Morgan
4cb631c0f2
fix: web: Handle non-regular postings in the add transaction form. ( #1058 )
2021-09-08 13:21:50 -10:00
Stephen Morgan
04c35e1519
fix: bin: Allow hledger-check-fancyassertions to parse predicates ( #1464 ).
2021-09-08 13:19:31 -10:00
Stephen Morgan
8fcdc22a45
fix: bin: Get scripts compiling with current hledger-lib.
2021-09-08 13:19:31 -10:00
Simon Michael
db45b13249
test: more detailed commodity directive tests
2021-09-07 10:19:01 -10:00
Simon Michael
cea8bc0558
test: split/rename directive tests
2021-09-07 09:51:49 -10:00
Simon Michael
344c421a3b
test: update shelltest format
2021-09-07 09:47:31 -10:00
Dmitry Astapov
555a68faa5
fix: roi: rare bug with PnL applied on the first day of investment
2021-09-03 11:02:43 -10:00
Simon Michael
25755c1ddd
;doc: journal: clarify account type auto detection, again
2021-09-02 09:04:55 -10:00
Simon Michael
32bf6284be
;doc: journal: clarify account type auto detection
2021-09-02 07:26:53 -10:00
Simon Michael
703980524b
;doc: csv: clarifiy csv-only interpolation earlier
2021-09-01 07:14:05 -10:00
Simon Michael
5485990cac
fix: csv: report correct CSV line number in errors
...
Some errors in CSV conversion, such as a failing balance assertion,
were always being reported as line 2.
Reported by Lawrence Wu.
2021-09-01 06:58:15 -10:00
Stephen Morgan
8274da81fc
cln: tests: Remove test and tests, which are just aliases for testCase
...
and testGroup.
Replacing these removes a layer of indirection, and reduces the need to
depend on Hledger.Utils.Test.
2021-08-30 16:32:19 -10:00
Stephen Morgan
83aa7324eb
dev: cli: Move Template Haskell to get git hash from Hledger.Cli.Version
...
to Hledger.Cli.
Since the git hash changes whenever any file in the repository changes,
this means Hledger.Cli.Version needs to be recompiled all the time.
Since it is at the bottom of the module hierarchy, this means that the
whole hledger package needs to be recompiled. We instead move the
TemplateHaskell splice to one of the top modules, so much less needs to
be recompiled.
Note: Ghc seems to be able to get out of most of the recompiling a lot
of the time (due to caching?), but this makes things more reliable.
2021-08-30 15:57:33 -10:00
Stephen Morgan
1c402edb06
pkg!: Remove Hledger.Data.Commodity module.
...
There are no modules which depend on Hledger.Data.Commodity which don't
also depend on Hledger.Data.Amount. Though Hledger.Data.Amount is a very
large module and might be broken up, Hledger.Data.Commodity only defines
three very small functions which are used, and so can be combined with
little cost.
2021-08-30 15:57:33 -10:00
Stephen Morgan
a0f9d7560f
pkg!: Remove Hledger.Utils.Color module.
...
This module was only used in one place in Hledger.Data.Amount. The code
has been moved directly into Hledger.Utils.
2021-08-30 15:57:33 -10:00
Stephen Morgan
f1994d5aa8
pkg!: Remove Hledger.Utils.Tree module.
...
This very small module was only used in Hledger.Data.Account, so the
code was moved into that module instead.
2021-08-30 15:57:33 -10:00
Stephen Morgan
1ed06f3bc8
pkg!: Remove Hledger.Utils.UTF8IOCompat module.
...
This module does nothing beyond define error' and usageError, which have
been moved to Hledger.Utils.
2021-08-30 15:57:33 -10:00
Simon Michael
dade3e3421
credits: notes for all multi-committers
2021-08-29 09:11:04 -10:00
Simon Michael
6f96d21a3e
ci: fix windows, make bash requirement explicit
2021-08-29 08:10:09 -10:00
Simon Michael
07faf2ad2f
;credits: notes
2021-08-29 08:07:50 -10:00
Stephen Morgan
bd113b223f
dev: lens: Introduce lenses for CliOpts.
2021-08-28 19:12:04 -10:00
Stephen Morgan
f3eacebc1d
dev: lens: Use TemplateHaskell for ReportOpts and ReportSpec.
...
Also rename overWithReport/setWithReport to overEither/setEither.
2021-08-28 19:12:04 -10:00
Stephen Morgan
435ec992f9
dev: lens: Introduce lenses for InputOpts and BalancingOpts.
2021-08-28 19:12:04 -10:00
Stephen Morgan
c784da3d0c
dev: lens: Create a Template Haskell helper for generating classy lenses
...
for hledger options.
This works for BalancingOpts, InputOpts, ReportOpts, ReportSpec, and CliOpts.
2021-08-28 19:12:04 -10:00
Stephen Morgan
13206d0b18
cln: Rename balancingOpts to defbalancingopts, to be consistent with definputopts, defreportopts, etc.
2021-08-28 19:12:04 -10:00