Commit Graph

1822 Commits

Author SHA1 Message Date
Simon Michael
62e96b1b20 ;lib: move PriceGraph, PriceOracle, ValuationType to Valuation.hs 2019-08-19 02:21:30 +01:00
Simon Michael
1cbbe8f43d memoise market valuation, making it fast (#999) 2019-08-19 02:16:39 +01:00
Simon Michael
4beb416070 lib: currying helpers 2019-08-19 02:09:27 +01:00
Simon Michael
7177f533b2 ;lib: pricesAtDate: refactor 2019-08-01 18:31:39 +02:00
Simon Michael
c14f22b975 ;lib: depend on timeit
Allows easy benchmarking at ghci prompt and I expect will be used for
reporting timing info later.
2019-08-01 18:31:39 +02:00
Simon Michael
70986769ef ;lib: derive NFData for MultiBalanceReport, PriceGraph for criterion
Allow these to be timed with criterion at ghci prompt.
2019-08-01 18:31:39 +02:00
Simon Michael
d193d757ea ;lib: multiBalanceReport: fix error message typo 2019-08-01 18:22:14 +02:00
Simon Michael
c7f9356fd1 ;doc: edit changelogs
[ci skip]
2019-07-25 12:33:58 +01:00
Simon Michael
02ed4f5d04 ;lib: intervalFromRawOpts: replace undefined with an error message 2019-07-25 10:46:45 +01:00
Simon Michael
030a409dd3 ;doc: update changelogs
[ci skip]
2019-07-25 08:48:01 +01:00
Simon Michael
35799142dd
Merge pull request #914 from simonmichael/rule-tags
tags for matching rule-generated txns and postings
2019-07-17 18:38:14 +01:00
Simon Michael
6e3a264f17 lib: export aliasnamep for hledger-check (#1072) 2019-07-16 23:30:15 +01:00
Simon Michael
e560afccd2 ;lib: package.yaml comment cleanups
[ci skip]
2019-07-15 17:18:28 +01:00
Caleb Maclennan
11d9e5eb6a code: Strip extraneous trailing whitespace from Haskell sources 2019-07-15 16:40:49 +01:00
Caleb Maclennan
7e332fda20 docs: Explain in more detail the parsing of the payee vs. notes fields 2019-07-15 08:22:16 +01:00
Simon Michael
6b61d1e0f1 ;lib: move transactionNote/Payee to Transaction.hs 2019-07-15 08:22:16 +01:00
Simon Michael
a5372168bc ;lib: suppress doctest failures with GHC < 8.2
[ci skip]
2019-07-14 04:40:07 -07:00
Simon Michael
6f2f8d7638 ;deps: a better fix for nubSortBy with ghc 7.10, 8.0
nubSortBy and nub . sortBy are not equivalent, it seems.
I didn't notice the failing valuation func tests.
2019-07-13 00:13:33 -07:00
Simon Michael
503d21ef77 ;lib: also update fgl bounds in cabal file 2019-07-13 08:08:36 +01:00
Simon Michael
40dd5e41cb ;deps: bump fgl lower bound to fix ghc 7, 8.0 builds 2019-07-12 15:25:19 -07:00
Simon Michael
7d5f33441e ;doc: draft changelogs
[ci skip]
2019-07-12 23:24:10 +01:00
Simon Michael
a6e9b11a54 ;cabal: bump tested-with, regen cabal files
[ci skip]
2019-07-12 23:24:10 +01:00
Simon Michael
ec310aea73 ;lib: avoid nubSortBy which breaks ghc 7, 8.0 builds 2019-07-12 15:21:57 -07:00
Simon Michael
f8cc60d287 ;csv: doc: link to #1051
[ci skip]
2019-07-08 08:02:54 +01:00
Simon Michael
5c3e4de647 ;lib: periodFromRawOpts: clarify doc (#1011)
[ci skip]
2019-07-01 18:33:18 +01:00
Jakob Schöttl
e483faf7f0 Bugfix for #1011: begin/end date options 2019-06-30 10:38:06 +02:00
Simon Michael
014db152d9 add, web: disallow unsafe trailing dot paths on windows (fix #1056)
On Windows, ensureJournalFileExists now rejects file paths
containing any problematic trailing dots, to prevent data loss.
This affects the add command and hledger-web's add form.
2019-06-26 18:19:53 +01:00
Simon Michael
2e4f047fed ;doc: journal: clarify alias docs (#1055)
[ci skip]
2019-06-23 15:56:29 -07:00
Simon Michael
d15f775695 ;doc:journal: document alias application order more clearly (#1055)
[ci skip]
2019-06-21 12:12:35 -07:00
Simon Michael
33d03284c3 ;valuation: more tests; document default amount style issue
[ci skip]
2019-06-17 08:19:23 -07:00
Simon Michael
2da50875ee lib: setNaturalPrecisionUpTo 2019-06-14 19:04:09 -07:00
Simon Michael
5cb334514c ;lib: rename setMinimalPrecision -> setNaturalPrecision 2019-06-14 19:04:09 -07:00
Simon Michael
69defd497f ;lib: refactor: Data.Prices -> Data.Valuation 2019-06-14 19:04:09 -07:00
Simon Michael
83030a09de ;lib: Prices: refactor 2019-06-14 19:04:09 -07:00
Simon Michael
7dd0c5783a ;lib: multibalancereport: refactor 2019-06-14 19:04:09 -07:00
Simon Michael
0a3af8d9ee csv: strip outer whitespace when interpolating CSV values (#1051)
This removes a potential snag in amount field assignments, and
hopefully is harmless and acceptable otherwise.
2019-06-14 16:43:12 -07:00
Simon Michael
d2b3185062 csv: don't show invalid inter-field spaces in CSV error messages
Errors involving a record like:

2000-01-01,a,"1"

displayed the record with extra spaces:

the CSV record is:       "2000-01-01", "a", "1"

which was not accurate or valid RFC-4180.
2019-06-14 16:17:40 -07:00
Simon Michael
baa15d9bea ;lib: rename MultiBalanceReports.hs -> MultiBalanceReport.hs 2019-06-14 11:45:25 -07:00
Simon Michael
e664fab956 lib: try to simplify, use just one price graph (#131) 2019-06-13 15:50:01 -07:00
Simon Michael
dd5afbb6fe ;doc, debug output tweaks (#131) 2019-06-13 15:50:01 -07:00
Simon Michael
6a62bd6437 web, api: update for MarketPrice/PriceDirective change 2019-06-13 15:50:01 -07:00
Simon Michael
ce0354ddbe lib: -X/--exchange now supports indirect price chains (#131)
Adds fgl as a dependency.
2019-06-13 15:50:01 -07:00
Simon Michael
692620180e ;lib: refactor: change AmountPrice to a Maybe
I've wanted to do this for a long time; now that prices are in flux,
seems a good time.
2019-06-13 15:50:01 -07:00
Simon Michael
adb6ee40eb lib: clarify price types (#131)
dropped journalPrices

renamed Price to AmountPrice,  AKA "transaction price"

renamed MarketPrice to PriceDirective.

added new MarketPrice (more pure form of PriceDirective without the amount style information)

Prices is now a more efficient data structure, but not used yet.
2019-06-13 15:50:01 -07:00
Simon Michael
e24c6292d0 lib: support -X/--exchange (direct/reverse prices only) (#131) 2019-06-13 15:50:01 -07:00
Simon Michael
50a52dd467 lib: --value can select commodity (via direct/reverse prices) (#131) 2019-06-13 15:50:01 -07:00
Simon Michael
6b6c3385c9 lib: parse optional ,COMM suffix in --value (#131) 2019-06-13 15:50:01 -07:00
Caleb Maclennan
18e19b9ad2 ;tests: normalize tests, examples, and docs using 2spcs before comments 2019-06-13 12:12:21 -07:00
Caleb Maclennan
8f3e5f9d3b ;print: differentiate posting indent (4spc) and pre-comment space (2spc)
Co-authored-by: Simon Michael <simon@joyful.com>
2019-06-13 12:12:21 -07:00
Henning Thielemann
4962b2696a lib: accountTransactionsReportItems: rewrite using catMaybes and mapAccumL
I find the report function less convolved without the integrated recursion.
2019-06-09 18:45:58 -07:00