From 703b868a6fca35dc4e0ddab19094d35cc8db8c2b Mon Sep 17 00:00:00 2001 From: Rob Cohen Date: Wed, 5 Aug 2026 13:32:20 +0000 Subject: [PATCH] test: regenerate snapshots for engine hash, metadata and interpolation rustledger/rustledger#1967. Four snapshots move, and only one of the four is the meta.hash change that prompted this - the other three are engine fixes rustfava had not caught up with. Verified each structurally (compare every JSON leaf path old vs new) rather than eyeballing a single-line diff, because these files are one line each and `git diff` says nothing useful about them. test_internal_api-test_get_ledger_data 62 changed leaves, ALL of them `hash`. test_json_api-test_api-account_report_off_by_one_journal 1 changed leaf, the rendered journal HTML; its own diff is 16 lines, all of them `hash:` values. Both are rustledger/rustledger#1961, which length-prefixes the fields fed into compute_directive_hash, counts collection lengths and presence-tags optionals. It fixed real collisions - most importantly a transaction WITH a payee hashing identically to one WITHOUT, and 2 HOOL {100 USD} hashing identically to 2 HOOL {200 USD}. Every digest changes as a result. test_serialisation-test_serialise_entry_types `number-value: 10 + 10` was captured as '10', now '20'. Not a hash change. The engine now evaluates arithmetic in metadata values. Checked against Python beancount, which gives Decimal('20') - so the old snapshot was pinning a divergence. test_json_api-test_api_errors loses "interpolation failed: multiple postings missing amounts or with unresolved cost specs for currency USD (2 unknowns)". Also not a hash change, and the one worth reading twice: an error DISAPPEARING is what a regression looks like. It is not one. For 2018-07-07 * "a" "b" Assets:Cash -14.00 USD Expenses:Stuff 4.14 Expenses:Stuff the engine used to give up with "2 unknowns". Python beancount solves it - the bare 4.14 takes USD from the balancing currency, leaving 9.86 USD for the empty posting - and reports no error. rustledger now produces exactly the same three postings, so dropping the error moved it toward compatibility rather than away. Full suite: 666 passed, 1 skipped, 100% coverage, against a component built from rustledger main at 058293c7a. --- .../test_internal_api-test_get_ledger_data.json | 2 +- ...json_api-test_api-account_report_off_by_one_journal.json | 2 +- tests/__snapshots__/test_json_api-test_api_errors | 6 ------ .../test_serialisation-test_serialise_entry_types.json | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/__snapshots__/test_internal_api-test_get_ledger_data.json b/tests/__snapshots__/test_internal_api-test_get_ledger_data.json index 122e1e944..d382e02b6 100644 --- a/tests/__snapshots__/test_internal_api-test_get_ledger_data.json +++ b/tests/__snapshots__/test_internal_api-test_get_ledger_data.json @@ -1 +1 @@ -{"account_details":{"Assets:Testing:MultipleCommodities":{"balance_string":null,"close_date":null,"last_entry":{"date":"2000-01-03","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"3f43843fea1277977ca64674e0255cf3ac68b8e5900c57a2636d48a197f5569d","lineno":5809},"uptodate_status":null},"Assets:US:BayBook:Vacation":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"96bfce852ea742b9a298e7a3d9d4041d6331bb38a1d617a779aadae04f6eb8db","lineno":3760},"uptodate_status":null},"Assets:US:BofA":{"balance_string":null,"close_date":null,"last_entry":{"date":"2014-01-01","entry_hash":"ENTRY_HASH"},"meta":{"address":"123 America Street, LargeTown, USA","filename":"TEST_DATA_DIR/long-example.beancount","hash":"912cf5121094934864835d9c54bd0947bdbd8b1d8138d3193a90550a7f712411","institution":"Bank of America","lineno":78,"phone":"+1.012.345.6789"},"uptodate_status":null},"Assets:US:BofA:Checking":{"balance_string":"TODAY balance Assets:US:BofA:Checking 1632.79 USD\n","close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"account":"00234-48574897","fava-uptodate-indication":true,"filename":"TEST_DATA_DIR/long-example.beancount","hash":"ba589f59dcb7be510f0982f58d50bcef15c96003b3c4f31dc95257c33303255d","lineno":82},"uptodate_status":"yellow"},"Assets:US:ETrade:Cash":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-30","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"a05c23d8b628f68e165b9982438ff4c8351f540bff6ac46c290ed01e64cd7655","lineno":2739},"uptodate_status":null},"Assets:US:ETrade:GLD":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-30","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"4431891b9c4c6b147e88bc6fff5a39b7053c7ffb98c22ee9185654534d4df9c7","lineno":2743},"uptodate_status":null},"Assets:US:ETrade:ITOT":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-11-23","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"9493c2ce79da406c96933ae8756e260299d5074843c39d4c2a31228b47e18728","lineno":2740},"uptodate_status":null},"Assets:US:ETrade:VEA":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-30","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"994835232fa98ca1670832158aa99dbd5611b736cdeb34796680a3bfd1927b7c","lineno":2741},"uptodate_status":null},"Assets:US:ETrade:VHT":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-12-20","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"8db29d4408966684fc2b3380a40331b63b5783d157a7b016dda2b9b713457110","lineno":2742},"uptodate_status":null},"Assets:US:Federal:PreTax401k":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"5240cc4d1ac365736b30826f608a824950b96632e4d9b33806c9671fdfb8ceaf","lineno":4968},"uptodate_status":null},"Assets:US:Vanguard":{"balance_string":null,"close_date":null,"last_entry":{"date":"2014-01-01","entry_hash":"ENTRY_HASH"},"meta":{"address":"P.O. Box 1110, Valley Forge, PA 19482-1110","filename":"TEST_DATA_DIR/long-example.beancount","hash":"785380d89802bdfbe36f59b97b39aca2f7c92033b12fc77e6de7109d06da1650","institution":"Vanguard Group","lineno":2965,"phone":"+1.800.523.1188"},"uptodate_status":null},"Assets:US:Vanguard:Cash":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-09","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"88ae5710fd00ad6f1141ad0eaf8573cb6707a3c68649d04556dbbd62cbb69d37","lineno":2970,"number":"882882"},"uptodate_status":null},"Assets:US:Vanguard:RGAGX":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-09","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"baa9e93852d6fa64220def7a39c774bf028120cd8bfad5e8cef9f2d0e76409fa","lineno":2963,"number":"882882"},"uptodate_status":null},"Assets:US:Vanguard:VBMPX":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-09","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"b8423fa31225a2b3a4d97ec1a399030e19c92cebf5c8cff5982e2684ac943ec5","lineno":2961,"number":"882882"},"uptodate_status":null},"Equity:Opening-Balances":{"balance_string":null,"close_date":null,"last_entry":{"date":"2014-01-01","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"671dd1c11486c95d0386f6be56f0e71fd55835c4e30f5b296c42720e423087aa","lineno":71},"uptodate_status":null},"Expenses:Financial:Commissions":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-30","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"41f1a26d3d391226173ed0423c319ec3a614f867fdcd53b64fee78777c7dd193","lineno":5064},"uptodate_status":null},"Expenses:Financial:Fees":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-04","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"1e2885178436a65ca63e845d4eaec723176eb981a5b075a10a74095f0abce31d","lineno":5063},"uptodate_status":null},"Expenses:Food:Alcohol":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-02-01","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"e81d51cb3347ef5a6730e5b2ad694048de84cbc022e4c2811f5d3f127241064b","lineno":5057},"uptodate_status":null},"Expenses:Food:Coffee":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-14","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"cefcb15a5f68904c5a62b272140d054dd6ca38207cdf3441438047ce25c200e2","lineno":5056},"uptodate_status":null},"Expenses:Food:Groceries":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-21","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"96efdddae8f5defbe4c1bfce7e29159a2c9778b89e1a9db91314b157db108731","lineno":5054},"uptodate_status":null},"Expenses:Food:Restaurant":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-07","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"ec27051bb955ba1554953e3eb8102ffed8397e41a6cfc4e1abc403d4c5d821de","lineno":5055},"uptodate_status":null},"Expenses:Health:Dental:Insurance":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"845b3787b511d8b46be02ee126946ebd7e912d9a1e37138bb9e9cc195099f293","lineno":3764},"uptodate_status":null},"Expenses:Health:Life:GroupTermLife":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"f431ef72de3f18e6fcd6a692393bd5bb62c7673fdc49a506e94d8949ef8e6ed8","lineno":3762},"uptodate_status":null},"Expenses:Health:Medical:Insurance":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"65aec641471f2eb5314f70189dc48625ea7788480b32928ee7ea8127ed84d036","lineno":3763},"uptodate_status":null},"Expenses:Health:Vision:Insurance":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"12de76c74ad7c3600ad162c691442ed09ec57047d169c90a936be44d4a9c8a77","lineno":3765},"uptodate_status":null},"Expenses:Home:Electricity":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-09","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"bacad9701a8efef9798dc0c8c42eb2f9eab878ca08b7f7504458ebcec46356e2","lineno":5060},"uptodate_status":null},"Expenses:Home:Internet":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-21","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"902609aa6db5d74fb880b71fbc8d7fbe05c7500e9a32799a9f80729e4beb625b","lineno":5061},"uptodate_status":null},"Expenses:Home:Phone":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-20","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"9a03ee3832c7e73e030f5faebb27d688bdd8e3cc0a0f8d83cb4aa35f856ed5c7","lineno":5062},"uptodate_status":null},"Expenses:Home:Rent":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-06","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"78d2cefd901c4b31e8a6e4ec39f6209b86e68322387389935fae5854c1e14fdc","lineno":5059},"uptodate_status":null},"Expenses:Taxes:Y2014:US:CityNYC":{"balance_string":null,"close_date":null,"last_entry":{"date":"2014-12-18","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"971bc2a0dd7e1f74b21a6ab09ddefe874769a521bc936159731552d313102043","lineno":4977},"uptodate_status":null},"Expenses:Taxes:Y2014:US:Federal":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-03-22","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"610339f8f1d8ba1a2aa8abf3039e9d7949d8c5dee1cc1e5bce82048328cd019c","lineno":4976},"uptodate_status":null},"Expenses:Taxes:Y2014:US:Federal:PreTax401k":{"balance_string":null,"close_date":null,"last_entry":{"date":"2014-07-17","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"8f40879a650a6bde273968eddf6a21f727b307d637d175e278ec8833412b3fa9","lineno":4974},"uptodate_status":null},"Expenses:Taxes:Y2014:US:Medicare":{"balance_string":null,"close_date":null,"last_entry":{"date":"2014-12-18","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"33d1660b43b7064d0495ea0dc2f770dc6f3f8ee09c912856602cf682f4148859","lineno":4975},"uptodate_status":null},"Expenses:Taxes:Y2014:US:SDI":{"balance_string":null,"close_date":null,"last_entry":{"date":"2014-12-18","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"f03ada32a9d16fd32f95d02e158fbff6945923f2175d8dd5027052280603b2d6","lineno":4978},"uptodate_status":null},"Expenses:Taxes:Y2014:US:SocSec":{"balance_string":null,"close_date":null,"last_entry":{"date":"2014-12-18","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"f5b9147d2b1b0b977b42af653749f942e277254021385cffa2aba012ac10731b","lineno":4980},"uptodate_status":null},"Expenses:Taxes:Y2014:US:State":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-03-22","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"4ec6111472179a6294ce659d9ebcd415d096812bc0e40dbf5a8cf691f5cff0f2","lineno":4979},"uptodate_status":null},"Expenses:Taxes:Y2015:US:CityNYC":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-12-31","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"69317f06186db3003f24fb3aa588c0e8f1baa9de843401ad8e4d51c914445041","lineno":5008},"uptodate_status":null},"Expenses:Taxes:Y2015:US:Federal":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-03-22","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"19f98ae386b144525318742bab193eed544a533eb8d7478bf2415ae8f9c0ef70","lineno":5007},"uptodate_status":null},"Expenses:Taxes:Y2015:US:Federal:PreTax401k":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-07-16","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"8a1ea3e8509f40729bc850b900c2f669e0db36c8747a8f737cab58eab638164c","lineno":5005},"uptodate_status":null},"Expenses:Taxes:Y2015:US:Medicare":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-12-31","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"1e568bd4820d9bd18766ea7d9a775a836a30262982af5b13f2412a715825ee69","lineno":5006},"uptodate_status":null},"Expenses:Taxes:Y2015:US:SDI":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-12-31","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"3ee48fe07cf90712a0bd91df5f55a8edd4242adb51bf1237eed3df5142f2298d","lineno":5009},"uptodate_status":null},"Expenses:Taxes:Y2015:US:SocSec":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-12-31","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"6fce68c866bca0dc794719b69ba4a0a0cbe84992054749d825ab9128840f465b","lineno":5011},"uptodate_status":null},"Expenses:Taxes:Y2015:US:State":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-03-22","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"b136e0c263f12bb6b0f7e82f1b36a0be9071d8bee6b07c0aad272a5772233c1a","lineno":5010},"uptodate_status":null},"Expenses:Taxes:Y2016:US:CityNYC":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"989fb07dea0b2665101e2e9d141cda07f15014067d365d82838821b947b9c59c","lineno":5039},"uptodate_status":null},"Expenses:Taxes:Y2016:US:Federal":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"90f9e9c5e8cda3aa4ee4cfd0ed1b715787d59e0b93e70120288e72d185dd50f5","lineno":5038},"uptodate_status":null},"Expenses:Taxes:Y2016:US:Federal:PreTax401k":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"a4bb4e087eebd2caebf8f9cb7fac02e97128896e182fff30bacdeeb68f7397e8","lineno":5036},"uptodate_status":null},"Expenses:Taxes:Y2016:US:Medicare":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"4a0718dd044e868169af06081aaff980beb34566cbd4d16f1ed9f91ecc4d7356","lineno":5037},"uptodate_status":null},"Expenses:Taxes:Y2016:US:SDI":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"48c3d846531638b50df3fec5f6577adf295c48963d3df14c627c888fc0a9b2a1","lineno":5040},"uptodate_status":null},"Expenses:Taxes:Y2016:US:SocSec":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"448d037a00ed49c864832dcb21cac56f77137736dc3a364da506370243818526","lineno":5042},"uptodate_status":null},"Expenses:Taxes:Y2016:US:State":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"27594d61562b432847a3cfb210bcd0eeaa6e92a40e36eea7491d7047fed94e08","lineno":5041},"uptodate_status":null},"Expenses:Transport:Tram":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-27","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"7b76c74023b33f93dc4ed35fb53c709ef62b622aa9122d7c53c080c6753aed5a","lineno":5058},"uptodate_status":null},"Expenses:Vacation":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-15","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"6feed371846112b6c7506ee0946310ff2d6d2dd9ae8a1f6fef7023d0479a7523","lineno":3761},"uptodate_status":null},"Income:US:BayBook:GroupTermLife":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"eef1329b1221ffaefb94ba8fed607a1f037aad49ff8195cbfcc985fae49c599f","lineno":3758},"uptodate_status":null},"Income:US:BayBook:Match401k":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-06","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"578a69f07c90f5c0662ee5ebd01ec43d938285b3c2ba9639fb91d0ba0efeb363","lineno":2969},"uptodate_status":null},"Income:US:BayBook:Salary":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"5cbf403bacb8341ec85ce9936a99e0c4d8b2394408e4fe4a3ce898df2d8bbb4e","lineno":3757},"uptodate_status":null},"Income:US:BayBook:Vacation":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"fc2d9ecd68c68a77f6021ba3ae6dcf51c63123a29d3aa35c6a198a2ffeb8d4c2","lineno":3759},"uptodate_status":null},"Income:US:ETrade:Dividends":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-03-17","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"d30836e65d1e383db878492e7b35ca8c1d856f2ce493bac5f6be226fa9092784","lineno":2745},"uptodate_status":null},"Income:US:ETrade:Gains":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-01-23","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"6fe09623d9e16d42c49134ceeedd69df57b8530d9a2745b51108ace5efdd9f62","lineno":2744},"uptodate_status":null},"Income:US:Federal:PreTax401k":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-01-01","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"633521a878d595f08d2b021105ae0bf679e87ff5aaa9b1044678f9a2ce6d57b0","lineno":4967},"uptodate_status":null},"Liabilities:AccountsPayable":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-03-26","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"7ef35bce8662eb3d3b81cbaa5232c1a3d0dd81fdd6a96b346f248440c5085f43","lineno":72},"uptodate_status":null},"Liabilities:US:Chase:Slate":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-19","entry_hash":"ENTRY_HASH"},"meta":{"fava-uptodate-indication":true,"filename":"TEST_DATA_DIR/long-example.beancount","hash":"7b13a5d5089ff6568fa3a0fa215d61eaef2418356765a624c63dfd9b39a79da1","lineno":755},"uptodate_status":"green"}},"accounts":["Liabilities:US:Chase:Slate","Expenses:Food:Restaurant","Assets:US:BofA:Checking","Assets:US:Vanguard:Cash","Assets:US:Vanguard:RGAGX","Assets:US:Vanguard:VBMPX","Assets:US:BayBook:Vacation","Assets:US:Federal:PreTax401k","Expenses:Health:Dental:Insurance","Expenses:Health:Life:GroupTermLife","Expenses:Health:Medical:Insurance","Expenses:Health:Vision:Insurance","Income:US:BayBook:GroupTermLife","Income:US:BayBook:Salary","Income:US:BayBook:Vacation","Assets:US:ETrade:Cash","Expenses:Food:Groceries","Expenses:Financial:Commissions","Income:US:BayBook:Match401k","Expenses:Taxes:Y2015:US:Federal","Expenses:Taxes:Y2015:US:State","Expenses:Taxes:Y2015:US:CityNYC","Expenses:Taxes:Y2015:US:Medicare","Expenses:Taxes:Y2015:US:SDI","Expenses:Taxes:Y2015:US:SocSec","Expenses:Financial:Fees","Expenses:Home:Internet","Expenses:Home:Phone","Expenses:Home:Electricity","Expenses:Home:Rent","Expenses:Transport:Tram","Expenses:Food:Coffee","Expenses:Taxes:Y2016:US:CityNYC","Expenses:Taxes:Y2016:US:Federal","Expenses:Taxes:Y2016:US:Federal:PreTax401k","Expenses:Taxes:Y2016:US:Medicare","Expenses:Taxes:Y2016:US:SDI","Expenses:Taxes:Y2016:US:SocSec","Expenses:Taxes:Y2016:US:State","Expenses:Taxes:Y2014:US:Federal","Expenses:Taxes:Y2014:US:State","Expenses:Taxes:Y2014:US:CityNYC","Expenses:Taxes:Y2014:US:Medicare","Expenses:Taxes:Y2014:US:SDI","Expenses:Taxes:Y2014:US:SocSec","Expenses:Taxes:Y2015:US:Federal:PreTax401k","Assets:US:ETrade:GLD","Assets:US:ETrade:VEA","Income:US:ETrade:Gains","Liabilities:AccountsPayable","Assets:US:ETrade:VHT","Assets:US:ETrade:ITOT","Income:US:ETrade:Dividends","Expenses:Taxes:Y2014:US:Federal:PreTax401k","Expenses:Vacation","Income:US:Federal:PreTax401k","Expenses:Food:Alcohol","Equity:Opening-Balances","Assets:Testing:MultipleCommodities","Assets:US:BofA","Assets:US:Vanguard"],"base_url":"/long-example/","currencies":["USD","VACHR","IRAUSD","VBMPX","RGAGX","GLD","VEA","VHT","ITOT","ABC","XYZ"],"currency_names":{"GLD":"SPDR Gold Trust (ETF)","IRAUSD":"US 401k and IRA Contributions","ITOT":"iShares Core S&P Total U.S. Stock Market ETF","RGAGX":"American Funds The Growth Fund of America Class R-6","USD":"US Dollar","VACHR":"Employer Vacation Hours","VBMPX":"Vanguard Total Bond Market Index Fund Institutional Plus Shares","VEA":"Vanguard FTSE Developed Markets ETF","VHT":"Vanguard Health Care ETF"},"errors":[],"extensions":[],"fava_options":{"account_journal_include_children":true,"auto_reload":false,"collapse_pattern":[],"conversion_currencies":[],"currency_column":61,"default_file":null,"default_page":"income_statement/","fiscal_year_end":{"day":31,"month":12},"import_config":null,"import_dirs":[],"indent":2,"insert_entry":[],"invert_gains_losses_colors":false,"invert_income_liabilities_equity":false,"language":null,"locale":null,"show_accounts_with_zero_balance":false,"show_accounts_with_zero_transactions":true,"show_closed_accounts":false,"sidebar_show_queries":5,"unrealized":"Unrealized","upcoming_events":7,"uptodate_indicator_grey_lookback_days":60,"use_external_editor":false},"have_excel":true,"incognito":false,"links":["test-link"],"options":{"documents":[],"filename":"TEST_DATA_DIR/long-example.beancount","include":["TEST_DATA_DIR/long-example.beancount"],"name_assets":"Assets","name_equity":"Equity","name_expenses":"Expenses","name_income":"Income","name_liabilities":"Liabilities","operating_currency":["USD"],"title":"Long Example"},"other_ledgers":[["Edit Example","/edit-example/"],["Example","/example/"],["Extension Report","/extension-report/"],["import","/import/"],["Query Example","/query-example/"],["errors","/errors/"],["off-by-one","/off-by-one/"],["invalid-unicode","/invalid-unicode/"]],"payees":["BayBook","Rose Flower","Uncle Boons","Goba Goba","China Garden","Chichipotle","Kin Soy","BANK FEES","Jewel of Morroco","Wine-Tarner Cable","Verizon Wireless","Cafe Modagor","Chase:Slate","EDISON POWER","RiverBank Properties","Metro Transport Authority","Corner Deli","Onion Market","Laut","Good Moods Market","Pizza Delfina","Cafe Select","Waterbar","Gimme! Coffee","Starbucks","Mission Chinese Food","Farmer Fresh","Bar Crudo","La Colombe","Mercadito","Eataly Chicago","Takahachi","Star of Siam","Argo Tea","Another Sports Pub","25 Degrees Burger Bar","\u00c1rv\u00edzt\u0171r\u0151 t\u00fck\u00f6rf\u00far\u00f3g\u00e9p"],"precisions":{"ABC":0,"GLD":0,"IRAUSD":2,"ITOT":0,"RGAGX":3,"USD":2,"VACHR":0,"VBMPX":3,"VEA":0,"VHT":0,"VMMXX":4,"XYZ":0},"sidebar_links":[],"tags":["test","trip-chicago-2015","trip-new-york-2016","trip-san-francisco-2015"],"upcoming_events_count":0,"user_queries":[{"date":"2016-01-01","meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"aabc8862430abfbea1f8b2a41922a2d29d889fc3dcf00865801e8fe34db02fa1","lineno":11},"name":"fava","query_string":"journal"}],"years":["2016","2015","2014","2009","2007","2004","2000","1995","1980","1900","1792"]} \ No newline at end of file +{"account_details":{"Assets:Testing:MultipleCommodities":{"balance_string":null,"close_date":null,"last_entry":{"date":"2000-01-03","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"e7ed7a0534778ed15c213b0f7b43088e3c3e42e33e5854087d671791485ec956","lineno":5809},"uptodate_status":null},"Assets:US:BayBook:Vacation":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"61b767f3b16f120e6ee7a99a9dc869f3e2f113533789d28bc09fcc3d4abbf274","lineno":3760},"uptodate_status":null},"Assets:US:BofA":{"balance_string":null,"close_date":null,"last_entry":{"date":"2014-01-01","entry_hash":"ENTRY_HASH"},"meta":{"address":"123 America Street, LargeTown, USA","filename":"TEST_DATA_DIR/long-example.beancount","hash":"b45c6d2d0dc77517032a65d75853e55656595fa03330219bccdb20b9f256cd16","institution":"Bank of America","lineno":78,"phone":"+1.012.345.6789"},"uptodate_status":null},"Assets:US:BofA:Checking":{"balance_string":"TODAY balance Assets:US:BofA:Checking 1632.79 USD\n","close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"account":"00234-48574897","fava-uptodate-indication":true,"filename":"TEST_DATA_DIR/long-example.beancount","hash":"6fbdd0de4ea0962cbf90150d956cb7517407ecd3125c9bb2082a9130bc1b0eb7","lineno":82},"uptodate_status":"yellow"},"Assets:US:ETrade:Cash":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-30","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"1f62a3280cf856cd0b51ecdb41c2111ac2b460fae594d91f62670c0775b14f16","lineno":2739},"uptodate_status":null},"Assets:US:ETrade:GLD":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-30","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"a0f048e499fd25b56fb6e574ec54df2361d0916e292d97604fa4a290c47f2319","lineno":2743},"uptodate_status":null},"Assets:US:ETrade:ITOT":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-11-23","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"f674dbc5934155a118cd8d1fa162ea72fba5c29fc176aff0ceb0781e132ea3b4","lineno":2740},"uptodate_status":null},"Assets:US:ETrade:VEA":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-30","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"a09a70a025daf429c193a21e72686ae8d40775f73a86be8c173a1ecd6c3bccb7","lineno":2741},"uptodate_status":null},"Assets:US:ETrade:VHT":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-12-20","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"11cd8c9f5c98a80932a604a42740d95cd4696dc50a6f0a637fe63db3e3162128","lineno":2742},"uptodate_status":null},"Assets:US:Federal:PreTax401k":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"58076a3bbc40f04a74e69ad5e1841437b8e2b9884a1754809da0c56df5861720","lineno":4968},"uptodate_status":null},"Assets:US:Vanguard":{"balance_string":null,"close_date":null,"last_entry":{"date":"2014-01-01","entry_hash":"ENTRY_HASH"},"meta":{"address":"P.O. Box 1110, Valley Forge, PA 19482-1110","filename":"TEST_DATA_DIR/long-example.beancount","hash":"67928656dbadce3083438ac91a95c2fcc956892d6014bd8f5f4085f89399a7f0","institution":"Vanguard Group","lineno":2965,"phone":"+1.800.523.1188"},"uptodate_status":null},"Assets:US:Vanguard:Cash":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-09","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"9ffc5ea7e34ac12282289db8e696c77b5572460f9d4dc52d0dd76e6371cf6e7d","lineno":2970,"number":"882882"},"uptodate_status":null},"Assets:US:Vanguard:RGAGX":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-09","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"3cad1bea315c8791c2190d6dab94e8aa6b00ea3f589ade6bf2ba9e7cd1f1ecfb","lineno":2963,"number":"882882"},"uptodate_status":null},"Assets:US:Vanguard:VBMPX":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-09","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"73e78b7af0f2e97e19d0cbc573c6f43fc7ac6f241f9c29a0f7575bb749cacf70","lineno":2961,"number":"882882"},"uptodate_status":null},"Equity:Opening-Balances":{"balance_string":null,"close_date":null,"last_entry":{"date":"2014-01-01","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"ddbbc83a516f1cdbf99981511e4e46dafcbee824f2bc5cb86bae5377d84e1a6d","lineno":71},"uptodate_status":null},"Expenses:Financial:Commissions":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-30","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"b14fa30fa28344bdece0ddea8e7cfa570cdc19b90eeee6129662ac21e1cff69d","lineno":5064},"uptodate_status":null},"Expenses:Financial:Fees":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-04","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"1ad00f084b782976d78252c50d74f259c03c111019a47b32898e50e83fc024ea","lineno":5063},"uptodate_status":null},"Expenses:Food:Alcohol":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-02-01","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"f6484b225829a1df8699a5d4f5928394ce7391fad8d22e5e8d479e82d97ecaa7","lineno":5057},"uptodate_status":null},"Expenses:Food:Coffee":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-14","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"2e1b1076f270693eb605d12e4399deee4e9e9471a1b25c44dc6da0990d2c86fc","lineno":5056},"uptodate_status":null},"Expenses:Food:Groceries":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-21","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"626001ca57255bed2cd8af1ef4c4fda46bd433a7b6d94d823bc68049a936ee68","lineno":5054},"uptodate_status":null},"Expenses:Food:Restaurant":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-07","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"c484595c7e34826642ef60c6d64f40c7fd066b6bda3ce7addd1ab4cd29e0ae5a","lineno":5055},"uptodate_status":null},"Expenses:Health:Dental:Insurance":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"0369281f45c0d15fdfd452766d98b0d77516815fe67f621ba07b4db7a8124b2b","lineno":3764},"uptodate_status":null},"Expenses:Health:Life:GroupTermLife":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"fc26d75024d58439de896176c158623e3abb4482a438b4c56c895113ca06977e","lineno":3762},"uptodate_status":null},"Expenses:Health:Medical:Insurance":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"0a8b5e97d1d093b2cc4104d98c66ba1ba6e357fea91df738d612330bcdb88c27","lineno":3763},"uptodate_status":null},"Expenses:Health:Vision:Insurance":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"657b02b34ad559c6b112a789b7b5d5c337d2be440dbf2f053877a415ccca6335","lineno":3765},"uptodate_status":null},"Expenses:Home:Electricity":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-09","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"85d43b1e167b3a932621b912b23350917c59e6227593ca1c4a118deb69608386","lineno":5060},"uptodate_status":null},"Expenses:Home:Internet":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-21","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"cb2b47afc03ef5be91cbc14405525380cddf642fe194f9c13361dd0b051f99f2","lineno":5061},"uptodate_status":null},"Expenses:Home:Phone":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-20","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"66276bf20036fcc724b2ee63602729d262be33f8532332e7f36738560413db23","lineno":5062},"uptodate_status":null},"Expenses:Home:Rent":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-06","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"b30bcdb0846f61d4d1030bfe49e6d06a12111e7461e016425450f561e66a1de5","lineno":5059},"uptodate_status":null},"Expenses:Taxes:Y2014:US:CityNYC":{"balance_string":null,"close_date":null,"last_entry":{"date":"2014-12-18","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"a1265b21da50cf394663cb1d3ae8d5e30de766f97024143fcbcd67b4c0777fa0","lineno":4977},"uptodate_status":null},"Expenses:Taxes:Y2014:US:Federal":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-03-22","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"218db40720476fc600d4c08f2234b4eba62630d99bc5f3f775b3edc012f001fd","lineno":4976},"uptodate_status":null},"Expenses:Taxes:Y2014:US:Federal:PreTax401k":{"balance_string":null,"close_date":null,"last_entry":{"date":"2014-07-17","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"a40bd43e889135f4ff0e25b967fbb5633d0178bd7f8b5a616998507d805efc8d","lineno":4974},"uptodate_status":null},"Expenses:Taxes:Y2014:US:Medicare":{"balance_string":null,"close_date":null,"last_entry":{"date":"2014-12-18","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"fde9c989fc1548d038012e50a0fb664c5a8321724cf2ee19f385a873e25cf8e5","lineno":4975},"uptodate_status":null},"Expenses:Taxes:Y2014:US:SDI":{"balance_string":null,"close_date":null,"last_entry":{"date":"2014-12-18","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"08cc52181eb7c3243df01fc5a1df60b268da58c110e957c79949d28cd86acfbd","lineno":4978},"uptodate_status":null},"Expenses:Taxes:Y2014:US:SocSec":{"balance_string":null,"close_date":null,"last_entry":{"date":"2014-12-18","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"de1684080b2619f810481f5d7107a8a9cb1e52c3c6b3ef304ef7b1a821916a5d","lineno":4980},"uptodate_status":null},"Expenses:Taxes:Y2014:US:State":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-03-22","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"4a841b6dd2330576a87023a6bf793d3856263554250d2b97c4f1f047fe67befb","lineno":4979},"uptodate_status":null},"Expenses:Taxes:Y2015:US:CityNYC":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-12-31","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"de2f5115acb88885ee45fecce85fcd9e7f7d3a6cdbbf77ce0b81d5a201d7bb71","lineno":5008},"uptodate_status":null},"Expenses:Taxes:Y2015:US:Federal":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-03-22","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"e359e6c1c6783758c06d6d9a114717f4f1e2b8e6fc601b5d505f9344409188b0","lineno":5007},"uptodate_status":null},"Expenses:Taxes:Y2015:US:Federal:PreTax401k":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-07-16","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"0296e567e4f9abc45cb880d6b0e2d125d012e2a6126f98d00d13ef6e1b5e0a3d","lineno":5005},"uptodate_status":null},"Expenses:Taxes:Y2015:US:Medicare":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-12-31","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"e538f6af3ab4121651e35b23baa20fd719f1189e8f5ef61ee0612fbadbce3bba","lineno":5006},"uptodate_status":null},"Expenses:Taxes:Y2015:US:SDI":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-12-31","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"3da6f62100227e07e1d06e5a770612db62165ddbfe63da83431c033404b794a0","lineno":5009},"uptodate_status":null},"Expenses:Taxes:Y2015:US:SocSec":{"balance_string":null,"close_date":null,"last_entry":{"date":"2015-12-31","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"31573879ef8deb59675fcc9714e873f909b8fe43cfed6e93910b636bb9460505","lineno":5011},"uptodate_status":null},"Expenses:Taxes:Y2015:US:State":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-03-22","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"cdec0d068f68fecaff73063e09d669deabcaa69e109cf925281c064b2739d3e9","lineno":5010},"uptodate_status":null},"Expenses:Taxes:Y2016:US:CityNYC":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"d8eb7d1c87addc86ba08c8d40142cf4a0b0e53e21553b6c375aa51fc52379e81","lineno":5039},"uptodate_status":null},"Expenses:Taxes:Y2016:US:Federal":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"b9152c2a916bb3780c8d2997afdb4a36173ef77ae2bba317a415829ab270c7df","lineno":5038},"uptodate_status":null},"Expenses:Taxes:Y2016:US:Federal:PreTax401k":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"0504f7e3edfcfd8477d96c8e56f38cbaec04ddbd8a016700811f06704d4e32bf","lineno":5036},"uptodate_status":null},"Expenses:Taxes:Y2016:US:Medicare":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"fc347120cb620c860340a80866bdc2f4e386223153a206df208fe57813ef1d8d","lineno":5037},"uptodate_status":null},"Expenses:Taxes:Y2016:US:SDI":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"b21baf50fe9259bbcac8d66549c295e24b0b42094b35fc7611420aaa025ad123","lineno":5040},"uptodate_status":null},"Expenses:Taxes:Y2016:US:SocSec":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"b8a85dc69e7cc3f57c4d2f0071030ba3de97b5ddfecc3e9331787f5c3d66b2b2","lineno":5042},"uptodate_status":null},"Expenses:Taxes:Y2016:US:State":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"9ed47fb2e161a0eb9f07a2d7432f4ef499133c0859bc18fbbc9d3d6fbe241d21","lineno":5041},"uptodate_status":null},"Expenses:Transport:Tram":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-27","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"9a18d40cf3e138c83ab05ac5b38b4d94f93b33b1c8bd894c83cb57fa962e64c6","lineno":5058},"uptodate_status":null},"Expenses:Vacation":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-04-15","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"6747bcd61c540dc40935d202befd54a612f4828a224a8a029b235e1e4e241956","lineno":3761},"uptodate_status":null},"Income:US:BayBook:GroupTermLife":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"5bc38eefe97d575bb3d6ea3f5c818a32f02697595f289f161235899d40e350e3","lineno":3758},"uptodate_status":null},"Income:US:BayBook:Match401k":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-06","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"4e5b98c5de455c29fcca5f7d655655b6663f62f0a7a194e3ca76f1cfd91cb98a","lineno":2969},"uptodate_status":null},"Income:US:BayBook:Salary":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"a2a3e2291f54822c4780bedde74528b8130cd1bce73b61912c402f44bf9e5bee","lineno":3757},"uptodate_status":null},"Income:US:BayBook:Vacation":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-05","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"3f1c39f0acd26b91ef93efa7f0eda47a3067b2e8f1d8caa4dc40a2b5da8365d7","lineno":3759},"uptodate_status":null},"Income:US:ETrade:Dividends":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-03-17","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"042a02aa5fb60ed07375d1e4686ff9a1f96b7e634299c7c43abf8419056305e9","lineno":2745},"uptodate_status":null},"Income:US:ETrade:Gains":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-01-23","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"d1fab29bf2e81fa1a2b13da1379f07fda2f38a9322635f93909a2273552eaf39","lineno":2744},"uptodate_status":null},"Income:US:Federal:PreTax401k":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-01-01","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"5765872b21d4f0a4e76daee30ddb08066a46706128bbea4fa33016888c09f460","lineno":4967},"uptodate_status":null},"Liabilities:AccountsPayable":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-03-26","entry_hash":"ENTRY_HASH"},"meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"77b49ea26666ca1a3e3bb5b4b8e27d79fa4d1441e941c40766a7a06960eb48b5","lineno":72},"uptodate_status":null},"Liabilities:US:Chase:Slate":{"balance_string":null,"close_date":null,"last_entry":{"date":"2016-05-19","entry_hash":"ENTRY_HASH"},"meta":{"fava-uptodate-indication":true,"filename":"TEST_DATA_DIR/long-example.beancount","hash":"6843805a70a0fabd4d8c28f1749d986b518ee56a71d8d148e979f9063f806105","lineno":755},"uptodate_status":"green"}},"accounts":["Liabilities:US:Chase:Slate","Expenses:Food:Restaurant","Assets:US:BofA:Checking","Assets:US:Vanguard:Cash","Assets:US:Vanguard:RGAGX","Assets:US:Vanguard:VBMPX","Assets:US:BayBook:Vacation","Assets:US:Federal:PreTax401k","Expenses:Health:Dental:Insurance","Expenses:Health:Life:GroupTermLife","Expenses:Health:Medical:Insurance","Expenses:Health:Vision:Insurance","Income:US:BayBook:GroupTermLife","Income:US:BayBook:Salary","Income:US:BayBook:Vacation","Assets:US:ETrade:Cash","Expenses:Food:Groceries","Expenses:Financial:Commissions","Income:US:BayBook:Match401k","Expenses:Taxes:Y2015:US:Federal","Expenses:Taxes:Y2015:US:State","Expenses:Taxes:Y2015:US:CityNYC","Expenses:Taxes:Y2015:US:Medicare","Expenses:Taxes:Y2015:US:SDI","Expenses:Taxes:Y2015:US:SocSec","Expenses:Financial:Fees","Expenses:Home:Internet","Expenses:Home:Phone","Expenses:Home:Electricity","Expenses:Home:Rent","Expenses:Transport:Tram","Expenses:Food:Coffee","Expenses:Taxes:Y2016:US:CityNYC","Expenses:Taxes:Y2016:US:Federal","Expenses:Taxes:Y2016:US:Federal:PreTax401k","Expenses:Taxes:Y2016:US:Medicare","Expenses:Taxes:Y2016:US:SDI","Expenses:Taxes:Y2016:US:SocSec","Expenses:Taxes:Y2016:US:State","Expenses:Taxes:Y2014:US:Federal","Expenses:Taxes:Y2014:US:State","Expenses:Taxes:Y2014:US:CityNYC","Expenses:Taxes:Y2014:US:Medicare","Expenses:Taxes:Y2014:US:SDI","Expenses:Taxes:Y2014:US:SocSec","Expenses:Taxes:Y2015:US:Federal:PreTax401k","Assets:US:ETrade:GLD","Assets:US:ETrade:VEA","Income:US:ETrade:Gains","Liabilities:AccountsPayable","Assets:US:ETrade:VHT","Assets:US:ETrade:ITOT","Income:US:ETrade:Dividends","Expenses:Taxes:Y2014:US:Federal:PreTax401k","Expenses:Vacation","Income:US:Federal:PreTax401k","Expenses:Food:Alcohol","Equity:Opening-Balances","Assets:Testing:MultipleCommodities","Assets:US:BofA","Assets:US:Vanguard"],"base_url":"/long-example/","currencies":["USD","VACHR","IRAUSD","VBMPX","RGAGX","GLD","VEA","VHT","ITOT","ABC","XYZ"],"currency_names":{"GLD":"SPDR Gold Trust (ETF)","IRAUSD":"US 401k and IRA Contributions","ITOT":"iShares Core S&P Total U.S. Stock Market ETF","RGAGX":"American Funds The Growth Fund of America Class R-6","USD":"US Dollar","VACHR":"Employer Vacation Hours","VBMPX":"Vanguard Total Bond Market Index Fund Institutional Plus Shares","VEA":"Vanguard FTSE Developed Markets ETF","VHT":"Vanguard Health Care ETF"},"errors":[],"extensions":[],"fava_options":{"account_journal_include_children":true,"auto_reload":false,"collapse_pattern":[],"conversion_currencies":[],"currency_column":61,"default_file":null,"default_page":"income_statement/","fiscal_year_end":{"day":31,"month":12},"import_config":null,"import_dirs":[],"indent":2,"insert_entry":[],"invert_gains_losses_colors":false,"invert_income_liabilities_equity":false,"language":null,"locale":null,"show_accounts_with_zero_balance":false,"show_accounts_with_zero_transactions":true,"show_closed_accounts":false,"sidebar_show_queries":5,"unrealized":"Unrealized","upcoming_events":7,"uptodate_indicator_grey_lookback_days":60,"use_external_editor":false},"have_excel":true,"incognito":false,"links":["test-link"],"options":{"documents":[],"filename":"TEST_DATA_DIR/long-example.beancount","include":["TEST_DATA_DIR/long-example.beancount"],"name_assets":"Assets","name_equity":"Equity","name_expenses":"Expenses","name_income":"Income","name_liabilities":"Liabilities","operating_currency":["USD"],"title":"Long Example"},"other_ledgers":[["Edit Example","/edit-example/"],["Example","/example/"],["Extension Report","/extension-report/"],["import","/import/"],["Query Example","/query-example/"],["errors","/errors/"],["off-by-one","/off-by-one/"],["invalid-unicode","/invalid-unicode/"]],"payees":["BayBook","Rose Flower","Uncle Boons","Goba Goba","China Garden","Chichipotle","Kin Soy","BANK FEES","Jewel of Morroco","Wine-Tarner Cable","Verizon Wireless","Cafe Modagor","Chase:Slate","EDISON POWER","RiverBank Properties","Metro Transport Authority","Corner Deli","Onion Market","Laut","Good Moods Market","Pizza Delfina","Cafe Select","Waterbar","Gimme! Coffee","Starbucks","Mission Chinese Food","Farmer Fresh","Bar Crudo","La Colombe","Mercadito","Eataly Chicago","Takahachi","Star of Siam","Argo Tea","Another Sports Pub","25 Degrees Burger Bar","\u00c1rv\u00edzt\u0171r\u0151 t\u00fck\u00f6rf\u00far\u00f3g\u00e9p"],"precisions":{"ABC":0,"GLD":0,"IRAUSD":2,"ITOT":0,"RGAGX":3,"USD":2,"VACHR":0,"VBMPX":3,"VEA":0,"VHT":0,"VMMXX":4,"XYZ":0},"sidebar_links":[],"tags":["test","trip-chicago-2015","trip-new-york-2016","trip-san-francisco-2015"],"upcoming_events_count":0,"user_queries":[{"date":"2016-01-01","meta":{"filename":"TEST_DATA_DIR/long-example.beancount","hash":"44a4b9e1ce21276c1c07929862d8a99bd194e43da55770ca86282782a3c0748b","lineno":11},"name":"fava","query_string":"journal"}],"years":["2016","2015","2014","2009","2007","2004","2000","1995","1980","1900","1792"]} \ No newline at end of file diff --git a/tests/__snapshots__/test_json_api-test_api-account_report_off_by_one_journal.json b/tests/__snapshots__/test_json_api-test_api-account_report_off_by_one_journal.json index 2bbceff22..357899dec 100644 --- a/tests/__snapshots__/test_json_api-test_api-account_report_off_by_one_journal.json +++ b/tests/__snapshots__/test_json_api-test_api-account_report_off_by_one_journal.json @@ -1 +1 @@ -{"charts":[{"data":[{"balance":{"USD":101.0},"date":"2022-01-01"}],"label":"Account Balance","type":"balances"},{"data":[{"account_balances":{"Assets:Cash":{},"Assets:Commodity":{"USD":101.0}},"balance":{"USD":101.0},"budgets":{},"date":"2022-01-01"},{"account_balances":{},"balance":{},"budgets":{},"date":"2022-01-02"},{"account_balances":{},"balance":{},"budgets":{},"date":"2022-01-03"},{"account_balances":{},"balance":{},"budgets":{},"date":"2022-01-04"}],"label":"Changes","type":"bar"}],"journal":"
  • \n

    \n 2022-01-01\n *\n \n Buy\n \n \n \n\n 1 USD
    \n 101 USD
    \n

    \n \n\n \n
  • \n

    \n 2022-01-01\n *\n \n Transfer\n \n \n \n\n 100 USD
    \n 100 USD
    \n

    \n \n\n \n
  • \n

    \n 2022-01-01\n Open\n \n Assets:Cash\n \n \n\n \n

    \n \n\n
  • \n

    \n 2022-01-01\n Open\n \n Assets:Commodity\n \n \n\n \n

    \n \n\n
  • "} \ No newline at end of file +{"charts":[{"data":[{"balance":{"USD":101},"date":"2022-01-01"}],"label":"Account Balance","type":"balances"},{"data":[{"account_balances":{"Assets:Cash":{},"Assets:Commodity":{"USD":101}},"balance":{"USD":101},"budgets":{},"date":"2022-01-01"},{"account_balances":{},"balance":{},"budgets":{},"date":"2022-01-02"},{"account_balances":{},"balance":{},"budgets":{},"date":"2022-01-03"},{"account_balances":{},"balance":{},"budgets":{},"date":"2022-01-04"}],"label":"Changes","type":"bar"}],"journal":"
  • \n

    \n 2022-01-01\n *\n \n Buy\n \n \n \n\n 1 USD
    \n 101 USD
    \n

    \n \n\n \n
  • \n

    \n 2022-01-01\n *\n \n Transfer\n \n \n \n\n 100 USD
    \n 100 USD
    \n

    \n \n\n \n
  • \n

    \n 2022-01-01\n Open\n \n Assets:Cash\n \n \n\n \n

    \n \n\n
  • \n

    \n 2022-01-01\n Open\n \n Assets:Commodity\n \n \n\n \n

    \n \n\n
  • "} \ No newline at end of file diff --git a/tests/__snapshots__/test_json_api-test_api_errors b/tests/__snapshots__/test_json_api-test_api_errors index f9af3daea..045f773c4 100644 --- a/tests/__snapshots__/test_json_api-test_api_errors +++ b/tests/__snapshots__/test_json_api-test_api_errors @@ -6,10 +6,4 @@ 'not enough to reduce (2020-01-01, "sell")', 'source': {'filename': 'TEST_DATA_DIR/errors.beancount', 'lineno': 0}, - 'type': 'BeancountError'}, - {'message': 'interpolation failed: multiple postings missing amounts or with ' - 'unresolved cost specs for currency USD (2 unknowns) (2018-07-07, ' - '"b")', - 'source': {'filename': 'TEST_DATA_DIR/errors.beancount', - 'lineno': 0}, 'type': 'BeancountError'}] \ No newline at end of file diff --git a/tests/__snapshots__/test_serialisation-test_serialise_entry_types.json b/tests/__snapshots__/test_serialisation-test_serialise_entry_types.json index ddeba2f3c..14bebc551 100644 --- a/tests/__snapshots__/test_serialisation-test_serialise_entry_types.json +++ b/tests/__snapshots__/test_serialisation-test_serialise_entry_types.json @@ -1 +1 @@ -[{"date":"2012-12-12","entry_hash":"ENTRY_HASH","meta":{},"t":"Custom","type":"string","values":[{"currency":"EUR","number":1.0},false]},{"account":"Assets:Cash","booking":"STRICT","currencies":["USD"],"date":"2017-12-11","entry_hash":"ENTRY_HASH","meta":{},"t":"Open"},{"date":"2017-12-12","description":"event description","entry_hash":"ENTRY_HASH","meta":{"account-value":"Assets:Cash","amount-value":{"currency":"USD","number":"10"},"bool-value":true,"currency-value":"USD","date-value":"2022-12-12","number-value":"10","string-value":"value"},"t":"Event","type":"event name"},{"account":"Assets:Cash","amount":{"currency":"USD","number":"1"},"date":"2017-12-13","diff_amount":{"currency":"USD","number":-1.0},"entry_hash":"ENTRY_HASH","meta":{},"t":"Balance","tolerance":null},{"account":"Assets:Cash","amount":{"currency":"USD","number":"1"},"date":"2017-12-14","diff_amount":{"currency":"USD","number":-1.0},"entry_hash":"ENTRY_HASH","meta":{},"t":"Balance","tolerance":1.0},{"account":"Assets:Cash","date":"2017-12-16","entry_hash":"ENTRY_HASH","filename":"./tests/data/filename","links":["link"],"meta":{},"t":"Document","tags":["tag"]},{"account":"Assets:Cash","comment":"This is some comment or note","date":"2017-12-20","entry_hash":"ENTRY_HASH","links":[],"meta":{},"t":"Note","tags":[]},{"account":"Assets:Cash","date":"2017-12-21","entry_hash":"ENTRY_HASH","meta":{},"source_account":"Assets:OtherCash","t":"Pad"},{"account":"Assets:Cash","date":"2017-12-22","entry_hash":"ENTRY_HASH","meta":{},"t":"Close"},{"currency":"USD","date":"2018-12-15","entry_hash":"ENTRY_HASH","meta":{},"t":"Commodity"},{"amount":{"currency":"EUR","number":"1"},"currency":"USD","date":"2018-12-16","entry_hash":"ENTRY_HASH","meta":{},"t":"Price"},{"date":"2019-12-12","entry_hash":"ENTRY_HASH","meta":{},"name":"query name","query_string":"journal","t":"Query"}] \ No newline at end of file +[{"date":"2012-12-12","entry_hash":"ENTRY_HASH","meta":{},"t":"Custom","type":"string","values":[{"currency":"EUR","number":1},false]},{"account":"Assets:Cash","booking":"STRICT","currencies":["USD"],"date":"2017-12-11","entry_hash":"ENTRY_HASH","meta":{},"t":"Open"},{"date":"2017-12-12","description":"event description","entry_hash":"ENTRY_HASH","meta":{"account-value":"Assets:Cash","amount-value":{"currency":"USD","number":"10"},"bool-value":true,"currency-value":"USD","date-value":"2022-12-12","number-value":"20","string-value":"value"},"t":"Event","type":"event name"},{"account":"Assets:Cash","amount":{"currency":"USD","number":"1"},"date":"2017-12-13","diff_amount":{"currency":"USD","number":-1},"entry_hash":"ENTRY_HASH","meta":{},"t":"Balance","tolerance":null},{"account":"Assets:Cash","amount":{"currency":"USD","number":"1"},"date":"2017-12-14","diff_amount":{"currency":"USD","number":-1},"entry_hash":"ENTRY_HASH","meta":{},"t":"Balance","tolerance":1.0},{"account":"Assets:Cash","date":"2017-12-16","entry_hash":"ENTRY_HASH","filename":"./tests/data/filename","links":["link"],"meta":{},"t":"Document","tags":["tag"]},{"account":"Assets:Cash","comment":"This is some comment or note","date":"2017-12-20","entry_hash":"ENTRY_HASH","links":[],"meta":{},"t":"Note","tags":[]},{"account":"Assets:Cash","date":"2017-12-21","entry_hash":"ENTRY_HASH","meta":{},"source_account":"Assets:OtherCash","t":"Pad"},{"account":"Assets:Cash","date":"2017-12-22","entry_hash":"ENTRY_HASH","meta":{},"t":"Close"},{"currency":"USD","date":"2018-12-15","entry_hash":"ENTRY_HASH","meta":{},"t":"Commodity"},{"amount":{"currency":"EUR","number":"1"},"currency":"USD","date":"2018-12-16","entry_hash":"ENTRY_HASH","meta":{},"t":"Price"},{"date":"2019-12-12","entry_hash":"ENTRY_HASH","meta":{},"name":"query name","query_string":"journal","t":"Query"}] \ No newline at end of file