-
Notifications
You must be signed in to change notification settings - Fork 31
/
CHANGES
3027 lines (2048 loc) · 121 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
========================
beancount: CHANGES
========================
Note: This file contains only changes in the 'default' branch.
2017-04-30
- Moved src/python/beancount/... to beancount/...
The purpose is to structure this project in the most common way
people expect it (most Python OSS projects have this structure, with the
package name directory at the root). I've had this other structure for a
while mainly for historical reasons. I wanted to make this clean before
baking a final 2.0 release and switching to numbered releases.
- Moved src/elisp/beancount.el to editors/emacs/beancount.el and made
necessary adjustments.
- Merged incomplete changes from booking branch to "default." The work on
supporting self-reduction (see
http://furius.ca/benacount/doc/self-reductions) won't be carried during 2.0,
it will be subject of a subsequent release.
- This concludes the merging of all the branches, which I've done in order to
move the source to a more regular project directory (under /beancount).
2017-04-29
- Fixed #27: IN membership operator did not have a proper precedence definition.
2017-03-19
- Fixed minor bug with CSV importer that would occur when the file has no
valid columns.
2017-01-26
- (internal) Moved the implementation of booking methods to its own
beancount.parser.booking_methods module.
- (internal) Split up the booking methods to functions for exhaustive testing
and allowing others to implement new methods more easily if desired.
2017-01-22
- Added new price source fetcher from OANDA's API. It supports a large number
of currency pairs with tickers like this "XXX_YYY", such as "EUR_USD". Use
it like the other price sources, e.g., like this:
bean-price -e 'USD:oanda/EUR_USD'
- Began working on the conversion of Google Docs to reStructuredText for
inclusion in Dominik Aumayr's docs.
2017-01-21
- Fixed #155: Use entry_points instead of scripts in setup.py.
- Added an extra check for Balance directives, verifying that asserted
currencies are accepted currencies for that account (if the account's
corresponding currencies have been declared explicitly). In other words,
this will now fail instead of being silently ignored:
2017-01-21 open Assets:Checking CAD
2017-01-21 balance Assets:Checking 0.00 USD
- Fixed bug in sheets_upload.py / upload-to-sheets whereby all the fields of a
sheet being updated just in order to resize it was causing the sheet to be
reindexed at the front of the list of sheets.
- Merged 'arithmetic_ops' branch with no effect, in order to move all files
and release. This will have to be revisited later.
2017-01-19
- Fixed bug with generation of column names in sheets uploader script.
2017-01-16
- Removed tools/gauth (used to be beancount.docs.gauth). All users of this are
slightly different, and they're utility scripts. Unfactoring.
- Removed beancount.docs from Beancount library. These are internal tools used
to manage documentation, should not be included in the installed codebase.
- Some cleanup of internal tools.
- Added some basic unit tetsts for beancount.tools.sheets_upload.
- Moved bin/upload-to-sheets to src/python/beancount/tools/sheets_upload.py
and replaced it with an associated stub for it.
- Moved bin/treeify to src/python/beancount/tools/treeify.py. The script is
still usable in a standalone form (no new dependencies have been added). To
have all the source code in one place is more convenient for maintenance.
- Created a beancount.tools package to contain all standalone tools which
don't depend on Beancount modules or packages.
- Removed branch "returns2" and moved associated projects script
beancount.projects.returns to experiments/returns. This code isn't robust
enough to work for everyone, and so therefore I'm moving it back to
experiments until I have time to produce something that will work very
robustly, and on all my own accounts as well.
2017-01-15
(from branch "conversions")
- Created and test beancount.core.convert Posting and Position conversion
functions: get_units(), get_cost(), get_weight(), get_value() (for market
value).
- Implemented Inventory.reduce() and associated test, which works in
conjunction with those.
- Implemented more straightforward versions of convert_position() and
convert_amount() in module beancount.core.convert, to convert positions and
amounts to other currencies.
- Deprecated Inventory.units(); use Inventory.reduce(convert.get_units)
- Deprecated Inventory.cost(); use Inventory.reduce(convert.get_cost)
- Deprecated Inventory.get_units() to Inventory.get_currency_units() in order to
avoid future name confusion.
- Deprecated Position.at_cost(); use convert.get_cost(position) instead.
- Deprecated Position.get_cost(); use convert.get_cost(position) instead.
- Deprecated b.c.interpolation.compute_cost_basis(); use
Inventory.(pos for pos in positions if pos.cost is not
None).reduce(convert.get_cost)
instead.
- Deprecated get_posting_weight(); use convert.get_weight() instead.
- Removed b.ops.holdings.get_pholding_market_value(), which was unused.
If you need a market-value function, use convert.get_value() instead.
- Converted all the old code to these new converted functions.
- Moved module beancount.ops.prices to beancount.core.prices, and added a
deprecation warning.
- Deprecated shell function PRICE(). Renamed it to GETPRICE() in order to
avoid confusion.
- Removed beancount.core.prices.convert_amount(). Use
beancount.core.convert.convert_amount() instead. Note that a failure doesn't
return None anymore, but an unmodified amount. Also notice the reordering of
parameters to be consistent with the other functions in that module.
- Removed beancount.core.prices.get_position_market_value();
use convert.get_value() instead.
- Removed beancount.core.prices.get_inventory_market_value();
use Inventory.reduce(convert.get_value, price_map) instead.
- Removed private functions
beancount.query.query_env.convert_amount(),
beancount.query.query_env.convert_position(), and
beancount.query.query_env.value_position(),
beancount.query.query_env.value_inventory().
These used to issue warnings if the conversion could not be carried out; now
they simply keeps the units of the position instead.
2017-01-15
- Fixed all tests for Python-3.6.
Beancount has not officially been ported to Python-3.6.
2017-01-14
- Fixed bug with generation of example that would produce an incorrect initial
balance for banking accounts. The example test should have been broken. (No
idea why this wasn't deteted earlier, probably by chance.)
2017-01-08
- Completed "Intro to Double-Entry Accounting" doc.
http://furius.ca/beancount/doc/intro
- Added a --reverse/--descending flag to bean-extract to print the extracted
entries in reverse order.
2016-12-17
- Added a --title option to upload-to-sheets in order to conveniently set the
document's title.
- Removed obsolete variable LEGACY_DEFAULT_TOLERANCES which had been
forgotten.
2016-12-15
- Made beancount.ingest.extract print out a stack trace when an unexpected
exception is raised.
- Fixed bugs in beancount.query.query_render where expand wasn't being passed
through the rendering functions.
- Deprecated bin/upload-csv-to-google-sheet; I moved the last version to
beancount/experiments/gapis in case you've come to be dependent on its
particularities. It doesn't need any of the Beancount libraries, so you can
just copy it somewhere and keep using it if so desired.
- Replaced "bin/upload-csv-to-google-sheet" to "bin/upload-to-sheets". The
newer script is a complete rewrite which does not require the antiquated
gdata library, and which uses the latest and greatest version of the Google
Sheets API (v4). You don't need gdata anymore. Moreover, this one runs in
Python3 instead of depending on Python2.
The script has slightly improved invocation semantics, and I'll using it
regularly to share CSV files with others, most often CSV files produced by
bean-query.
2016-12-11
- Changed b.p.split_expenses outputs to be more useful.
2016-12-10
- Made Amount, Posting, Cost and CostSpec all immutable classes that inherit
from typing.NamedTuple.
- Removed mutable method Posting.add().
2016-12-05
- Merged changes made for calculating wash sales a long time ago. I had
implemnted a temporary kludge to carry dates on all augmenting postings,
left it in a branch so I could use it there for taxes every year. Now that
the booking branch is merged, this is supported by default, so I could undo
that kludge. Some changes remained:
* The Inventory.add_amount() method used to return the modified position.
Now it returns the position before being modified, which is more useful.
* The list-wash-sales.py script has been updated. It now works on 'default'.
* The 'carry_date_and_book_cost' branch has been merged away.
2016-12-04
- Made .tags and .links attributes of b.data.Transaction and b.data.Document
directives ensured to always be a set when they're empty. If there are no
tags (or links), those attributes are set to b.data.EMPTY_SET, whose value
is a frozenset(). This should make the processing of those attributes a bit
simpler.
Note that if you create transactions from plugins and their tags and/or
links attributes are set None, they will now fail. The right thing to do is
to set their value to an empty set, or reuse the immutable
beancount.core.data.EMPTY_SET object.
If you need to circumvent this temporarily, set the following option in your
file, which will allow None again:
option "allow_deprecated_none_for_tags_and_links" "TRUE"
See {1989ba9e0e79} for details.
- Updated all copyright and license notices on all files.
- Added a script to automatically verify that all source files include a
copyright notice.
- Removed ancestral Beancount documentation from eons ago. These notes and
conversationsa are now wildly irrelevant to the current state of Beancount,
and all the documentation from Google Docs is vastly more recent and
obsoletes all these old snippets and notes.
- Moved all development tools under tools/, from etc/ and
experiments/code-health/.
2016-12-03
- Fixed fava bug #429, avoid empty conversion entries if the cost of the
conversion balance is zero. See:
https://github.com/beancount/fava/issues/429.
2016-11-20
- Fixed bugs in bean-format; in order to do this properly I made bean-format
reuse the globally defined regular expressions for currency and account in
the rest of Beancount's code. This makes bean-format depend on the Beancount
installation. Bah, it's reasonable. This issue is related to issue #146.
- Added ANY_META() function to the SQL shell's environment; ANY_META() allows
you to query a posting's metadata, falling back on the parent entry's
metadata. This idea was suggested by Stefano Zacchiroli in
https://groups.google.com/d/msg/beancount/jh-n4rvbQAI/Hz5Mmd60BAAJ. I also
added the first unit tests for environment functions--I'll have to write all
of those at some point.
- Made unsupported cost specifications in the SIMPLE booking algorithm issue
an appropriate error. For example, instead of just ignoring the cost spec in
this:
2014-10-15 * "buy widgets"
Assets:Inventory 10 WIDGET {} ;; Not supported.
Assets:Cash -80 GBP
It will issue an error. See
https://groups.google.com/d/msg/beancount/9NBcT-SXZMQ/sy7Z3dIdBQAJ for
context.
2016-11-12
- Made the Emacs prefix key configurable via a new beancount-mode-map-prefix
variable. See discussion here:
https://groups.google.com/d/msg/beancount/_7TscZ9phNE/K8PkcRMpBAAJ
2016-11-06
- Fixed #139: Full booking parsing had been more liberal than the old SIMPLE
booking algorithm can interpret. In the old code, explicitly disallow some
interpolation cases which cannot be handled.
- Fixed #129: Ignore custom directives for Ledger and HLedger conversion.
2016-11-05
- Fixed #142: bean-check should return non-zero exit code upon failure.
2016-10-30
- Merge the current version of the 'booking' branch and made the "FULL" booking
algorithm the default one.
* The "experiment_booking_algorithm" option has been renamed to
"booking_algorithm". Its default value is now "FULL"; everyone will be
using the new booking code. If for some reason you have a transitional
need to revert to the older booking method use this option.
option "booking_algorithm" "SIMPLE"
* The new booking algorithm is _MUCH_ more powerful than the one old. I'll
describe it soon in a new document, but briefly:
- It supports many more interpolation capabilities; try omitting amounts
or currencies which you think it ought be able to figure out
automatically and you might find it does.
- All positions carry a date. This means that if you have transactions
that would merge because they weren't specified with a date, like this
you may face a problem:
2016-01-15 *
Assets:Investments 70 UUG {10.00 USD}
...
2016-02-16 *
Assets:Investments 25 UUG {10.00 USD}
...
2016-03-30 *
Assets:Investments -80 UUG {10.00 USD}
...
Those used to resolve automatically because both augmenting lots would
merge into a single one without a date. Now that all positions have an
acquisition date, the -80 reducing posting is ambiguous, because it
matches against these:
Assets:Investments 70 UUG {10.00 USD, 2016-01-15}
Assets:Investments 25 UUG {10.00 USD, 2016-02-16}
Either you'll have to disambiguate, or let Beancount do so. One way to
do this is to add more specific matching data, and split the posting.
An even easier way to do this is to make the default booking method of
this account to "FIFO" or "LIFO", which will automatically select the
oldest (newest) postings without issuing a warning.
If you find yourself in a bind, please email the mailing-list with a
specific and as small as possible data input that reproduces the
problem.
- Removed parsing of the pipe (|) symbol as a separator for strings on
transaction description lines. This was vestigial from the days long long
ago when Beancount was attempting to be compatible with Ledger syntax; this
is wholly unnecessary how.
You will have to convert transactions like this:
2015-08-25 * "Tunnel" | "Coffees"
Expenses:Food:Coffee 15 CAD
Assets:Cash
Into transactions like this:
2015-08-25 * "Tunnel" "Coffees"
Expenses:Food:Coffee 15 CAD
Assets:Cash
This can be done using a sed script, or as a macro in your favorite text editor.
If you need a temporary respite, you can use the following option, which
will replace all the error messages by a single warning:
option "allow_pipe_separator" "TRUE"
Support for this option will be removed eventually.
- Moved the {{...}}} total cost syntax from a legacy support with only "/"
separator and a date, no label, to full support. Previously, only these syntaxes
were supported for total cost:
Assets:Account 100 MSFT {{2000.00 USD}}
Assets:Account 100 MSFT {{2000.00 USD / 2016-10-30}}
Changes:
* The "/" separator support has been removed, you must now use a comma, like
for the {...} full booking syntax.
* The same syntax as for the regular {...} compound cost is supported;
however, specifying a compound amount will raise an error, and the
per-unit cost is interpreted as a total cost.
For example, this:
Assets:Account 100 MSFT {{2000.00 USD}}
is interpreted as:
Assets:Account 100 MSFT {0 # 2000.00 USD}
which is equivalent to:
Assets:Account 100 MSFT {20.00 USD}
And the following will raise an error, it is not legal syntax:
Assets:Account 100 MSFT {{0 # 2000.00 USD}}
Finally, specifying a date and a label can be done, just like for {...}:
Assets:Account 100 MSFT {{2000.00 USD, 2011-10-30, "ref32"}}
The intention here is to deprecate the older limited syntax while keeping
support for total cost input using {{...}}. Based on previous questions, I
suspect that many users are still using {{...}} instead of {{# ...}}, so I
won't remove it just yet.
- Removed very old compatibility code in beancount.core.amount that lived
since I cleaned up the definition of the D() constructor and moved it to
beancount.core.number.
- Removed built-in aliases for auto_accounts and implicit_prices modules, from
beancount.ops to beancount.plugins.
- Removed deprecated option "default_tolerance" (which had been renamed to
"inferred_tolerance_default").
- Removed deprecated option "tolerance".
- Remove deprecated use of 'plugin' as an option. The directive ought to be
the only way.
- Removed deprecated option "experiment_explicit_tolerances".
- Renamed "experiment_booking_algorithm" to "booking_algorithm", and changed
the default value to "FULL". The old "SIMPLE" algorithm will be deprecated
eventually.
- Removed old code that would warn if the user set account_rounding to a full
account name; it just needs be a subaccount.
- Commit to Python 3.5. 3.5.0 released more than a year ago. You need to
update or stick with the 2.0b13 release.
- Remove old code to dispatch between an external Enum class and the built-in
one that's included in 3.5 (commit to 3.5).
- Added type annotations to beancount.core.data. This will grow more over
time. (I also need to add rules to use those.)
2016-10-23
- Modified parsing of transaction strings and links and tags. I did this to
factor out the parsing of tags and links in order to add it to other
transactions and minimize grammar code. There is user-visible impact to this
change: all of a transaction's strings must appear before tags or links. You
cannot place tags or links before or in-between strings anymore. This is a
reasonable restriction and I doubt anybody did anyway.
- Added support for tags and links to the Document directive. This works just
as for Transactions, e.g.
2016-10-23 document Assets:Checking "/statements/oct.pdf" #banking ^9fed846348c2
The current tags on the tag stack are also included, like for transactions.
2016-10-10
- Removed "experiment_explicit_tolerances" flag; made this supported by
default permanently.
2016-10-08
- Documented a subtle problem reported about balances against inventory of
mixed at-cost and no-cost, added more context to the error and a unit test
for balance checks with mixed at-cost and no-cost positions.
- Fixed a bug in the full booking matching code whereby an existing position
not held at cost would trip up the matching code. (Credits to Son Nguyen for
finding and reporting.)
- During ingest, when multiple extractors match a particular file, select the
first matching account instead of raising an error.
- Fixed accidentally colliding key-binding for invoking bean-price from Emacs,
to C-c p.
2016-09-25
- Fixed typo in grammar that was parsing a transaction flag as '#' into '*'.
- Added "cost_date" and "cost_label" columns in the SQL shell.
2016-09-04
- Implemented new "run" shell command that allows you to run a named query.
For example, if an input file has a Query directive like this:
2016-09-01 query "home" "select account, sum(position) where account ~ 'Home' group by 1"
And you input this command:
run home
The entries will be closed at tue query date (2016-09-01) and the query
automatically run. If you want to always include all the transactions, set a
date far into the future.
This works from the command-line and from the shell, equally. You can also
run all the queries in an input file, like this:
run *
To view the list of available queries, just type the "run" command without
an argument.
2016-08-21
- Fixed a SQL shell bug with extracting UNITS() from a Position column.
- Finally properly fixed the timezone of the Google Finance price fetcher.
(It was done incorrectly and I found my unit tests failing whenever I would
work on Beancount from another timezone.)
2016-08-17
- Added beancount.core.amount.abs() function for absolute values of Amount.
- Added rendering of links to beancount.plugins.split_expenses plugin, and
made it quiet by default. Added --output-stdout option to make it do that
again.
- Created a new experimental script that attempts to match postings between
two ledgers. A pair of (filename, account-regexp) is provided for each, and
then the amounts and links are compared and paired up, and remaining
unmatched postings are printed out. This is very useful to reconcile trip
expenses between a personal ledger and the ledger for a trip or external
project where some of the expenses are paid from the personal ledger as
contributions to the trip or project.
- Made the upload-csv-to-google-sheet script use the basename (without
extension) of the given filenames as sheet names instead of "Sheet X"
numbers. (Note: This entire thing be rewritten using the new Google Sheets
API which won't require gdata and which will be more stable.)
- Added a quick implementation of b.q.query_render.render_csv()
and refactored b.q.query_render.render_text() to use common code. Both
functions now have a new 'expand' option which will create multiple rows for
cells which return a list of strings. The new default behavior is to
concatenate the strings with commas.
The shell (bean-query) has a new 'expand' shell variable to match. Also, the
-f/--format option of it is now supported, and in interactive mode it sets
the default value for 'expand'.
- Since output to CSV is now implemented, I enabled the --output-csv option of
b.p.split_expenses as well.
2016-08-14
- Fixed bug in beancount.utils.file_type for Python3, whereby magic now returns
bytes, not a string
2016-08-04
- Made account name components allowed to have two characters (beyond the
first component). For instance, Assets:Investments:F is now a valid account
name.
2016-07-11
- Added parsing a transaction date column to metadata in the CSV importer.
2016-07-01
- bean-format now accepts input from stdin.
2016-06-30
- Make it possible for a BALANCES statement to have a WHERE clause. BALANCES
is now equivalent to
SELECT account, sum(position) FROM ... WHERE ... GROUP BY account
Inching one step closer to removing that WHERE clause eventually.
2016-06-18
- Added support for columns AMOUNT_DEBIT and AMOUNT_CREDIT in the csv
importer.
- Merged ongoing progress from 'booking' branch; if you don't use any of the
in-progress new booking methods, this should not have any effect.
However, the 'booking_method has changed names and you may have to adjust
its values if you've been tinkering with it:
* 'booking_method' used to take on value "SIMPLE" or "FULL" and dispatch
betwee the current (old) booking implementation and the new one which will
support many other booking methods. This option is now named
'experiment_booking_algorithm' (a new option) and takes on the same
values. The default value is "SIMPLE", which keeps the behavior unchanged.
Use "FULL" if you want to test out the new booking algorithm: the new
algorithms should work except for the AVERAGE cost method. WARNING: This
is still under flux and considered unreleased.
" 'booking_method': This is a different option now, and takes the value of
any one of the booking methods visible here:
https://bitbucket.org/blais/beancount/src/7b9e00e6e19136f680befc1d4322f47cdc294cf6/src/python/beancount/core/data.py?at=booking&fileviewer=file-view-default#data.py-64
2016-06-13
- Ported beancount.docs.download_docs to the v3 drive API and the use of a
service account instead of a full access to a user account. Service accounts
are easier to configure and work with.
- Ported beancount.docs.upload_options to the v3 drive API.
2016-06-05
- Added a new column to the posting context: "other_accounts" is a set of
account strings for the other postings of the transaction.
- Added a new JOINSTR() generic function to the shell, to reduce the repeated
column above to a single comma-separated string.
2016-05-28
- Made various changes to the shell in order to make it possible to convert to
the market value:
* CONVERT() has been converted to convert to the market value, when applied
to a position held at cost. However, it still requires a target currency
and it may fail if you apply it to a position for which the cost currency
differs from that of the target currency, i.e., it will not automatically
chase down the transitive conversions toward the desired target currency.
* A new function VALUE() has been added, which is similar to CONVERT() but
which when applied to a position held at cost converts to the cost
currency at the current price. It's similar to CONVERT() but you don't
have to provide the target currency. And similarly to CONVERT(), you may
provide a particular date, and if at that date there is no available
conversion rate in the prices database, the conversion will fail
analogously and spit out an error message.
* PRICE() has been renamed to GETPRICE() to avoid some confusion. PRICE()
does not convert, it merely gets the price from the price database.
GETPRICE() is thus a more appropriate name.
2016-05-22
- Created the beancount.plugins.mark_unverified plugin as a response to this
thread: https://groups.google.com/d/msg/beancount/hQoOSJE7qNo/-E__v-XhEgAJ
This plugin makes it possible to compute the balances as of the last Balance
directive of each account by adding metadata to postings which appear after
that account's last balance. You'd filter out unverified postings with an SQL
query on meta-data like this:
SELECT account, sum(position)
WHERE NOT meta('unverified')
GROUP BY 1
ORDER BY 1
Note that the resulting balanaces almost certainly don't sum up to zero,
because of differing dates of the Balance directives. Also, note that
accounts without a single Balance directive will not have their postings
marked at all.
2016-05-08
- In the output of bean-price, sort prices exclusively by currency, regardless
of date. This is because on weekends you'll tend to get slightly varying
dates, and manual/occasional price updates are usually put in "chunks" in a
file section. It's easier to visually find the price by scanning by currency
order.
2016-05-05
- Added a shell function to filter a set of strings (for tags or links) with a
regular expression and return the first one. This way you can extract some
of the tags or links with a pattern as columns.
2016-05-01
- Fixed issue #124, a leak in the grammar parser which would leak the entire
set of entries on every instance of parse.
- Fixed some warnings about unclosed files which occur only on default python
branch.
2016-04-29
- Don't just log an extraction error to logging.error() in the regression
tests; let the exception through. This makes building and debugging
importers much easier.
- Created an experimental script to extract date/location information required
for a naturalization application.
2016-04-24
- Rewrote the section on "Core Data Structures" of the Design Doc, to reflect
the newer internals of Beancount, those which have been merged from the
ongoing 'booking' branch.
See http://furius.ca/beancount/doc/design-doc.
2016-04-23
- Added beancount.ingest.importers.fileonly, a simplistic importer which can
be instantiated to just file away some downloads without extracting anything
from them.
2016-04-18
- In bean-doctor context, all the accounts should appear in the
post-transaction balances, even if their balance is empty. This had been
fixed for the pre-transaction balances but I stumbled upon a case of
post-transaction balances not showing an empty account.
2016-04-17
- Added support for the BEANCOUNT_LOAD_CACHE_FILENAME environment variable,
which can be set in order to overridde the location of the pickle cache.
This variable may contain the string "{filename}", and if it is present the
basename of the beancount file will be spliced in. This can be useful if,
for example, you are reading your Beancount input file from a read-only
filesystem and still want to use the cache by specifying an alternative
filename.
- Fixed a bug when reading from a read-only filesystem, the loader cache would
fail to be removed and raise an exception.
- Fixed an important bug in beancount.ingest whereby instances of
b.i.cache.FileMemo weren't being shared as widely as they could have been.
FileMemo instances now have to be created via b.i.cache.get_file() and
FileMemo is now a hidden class _FileMemo. See this discussion for more details:
https://groups.google.com/d/msg/beancount/b-ZqYqag7AU/N-AaGSZOAwAJ
2016-04-10
- Create a new 'beancount.plugins.fix_payees' plugin that allows the user to
provide a set of rules to rewrite and clean up the names of the payees from
the Beancount file.
While it would be ideal to do this at import time, in practice there are a
lot of downloaded files' "memo" fields which get set as the payee
automatically. These "memos" aren't very clean and readable strings: they
sometimes contain numbers, partial city names, and other junk. In order to
produce clean reports where one might want to aggregate by payee, it's
useful to rewrite the payees to make them nice and clean. You can use this
plugin to do that.
- Made the Custom directive accept ACCOUNT tokens. You can now do something
like this:
2014-06-20 custom "budget" Assets:Account2 "balance < 200.00 USD"
Prior to this, the account name had to be represented as a string. (Users of
the burgeoning Custom directive not like this very much.)
Note that account names and regular strings are both output from the parser
as 'str' objects, so in order to make this possible, I had to change the
representation of the values to a pair of (value, dtype). Account names have
a 'dtype' of beancount.core.account.TYPE. (Eventually I will probably want
to make account strings represented with their own custom datatypes, but
that will require a fair amount of work on the codebase; this substitute is
fine for now, as there are no other places where such a disambiguation is
necessary.)
2016-04-04
- Added a test to make sure that building a source dist includes the header
files and C implementation files.
- Sort Document directives after Transactions when they occur on the same day.
The reason for this is that statements typically include transactions on
that final day, and we'd like for them to occur at the right place in the
journals. See originating thread:
https://groups.google.com/d/msg/beancount/3ItOYS9DJx4/VyTJB3ssBQAJ
2016-04-03
- Fixed a bug in "bean-doctor context" which wouldn't report the full set of
accounts when an account's before-balance would be empty.
- Fixed a bug in "bean-doctor linked" whereby the balances wouldn't get
printed out if there was no link. Print the balances before and after; in
fact, maybe this command should be renamed to "balances" and have an option
to support links.
2016-03-31
- Added TODAY() function to extract today's date. Not sure how useful it'll
be.
2016-03-27
- Added a PRICE() function to extract entries from the price database. You can
now query for "SELECT PRICE('USD', 'CAD', date)", for example.
- Added a boolean renderer for the SQL shell.
- Added support for arithmetic operations to the bean-query SQL shell.
2016-03-26
- Added an optional date argument to convert, so you can provide the requested
date in a SQL query, as in "CONVERT(sum(position), "CAD", 2015-06-01)".
- Improved the rendering of the context, removed the weird comments it used to
render with, render an account name if the inventory is empty.
- Ignore .DS_Store files from the file finder in ingest.
2016-03-22
- Support multiple accounts in same ofx file. See
https://bitbucket.org/blais/beancount/pull-requests/10/. I applied this
one-liner: issue a balance for each statement, use the maximum date for the
file_date() method, and added unit tests for this.
2016-03-21
- Fixed bug in beancount.ingest.file whereby two files being filed to the same
destination filename would clobber each other; with this fix, instead, an
error will be generated.
- Create an example of an importer just filing a PDF file using the external
tool PDFminer2. If the tool isn't installed, nothing should "break" (but the
importer won't really do its job). The tests should be skipped
automatically, and the importing will just ignore the PDF file to be filed.
2016-03-20
- Implemented beancount.ingest.importers.regexp and
beancount.ingest.importers.config mixin classes to help support
functionality which used to be available in LedgerHub.
- Removed the temporary beancount.ingest.importers.compat
backwards-compatibility helper for LedgerHub. Not needed.
- Completed the documentation for the new import framework "beancount.ingest".
The document is here:
http://furius.ca/beancount/doc/ingest
2016-03-19
- Centralized the <3.4 and >=3.4 support for Enum class into
beancount.utils.misc_utils.Enum.
- Added an option to the OFX importer to let the instantiator decides whether
a balance directive should not be inserted (NONE), should be inserted at the
declared date of a <ledgerbal> tag (DECLARED), or right after the last entry
imported from the file (LAST).
2016-03-18
- Merged 'web_months' branch modified from changes originally submitted by
Dave Stephens, which implements a monthly view. You enter the monthly view
from the annual view.
2016-03-14
- Added META() and ENTRY_META() functions to the SQL shell to answer a
question on the mailing-list (from richieuk63 at gmail dot com).
- Fixed a bug with the OFX importer whereby the Balance directive should be
generated to a day following the date provided in the LEDGERBAL directive.
- Added forgotten dependency on "beautifulsoup4" in setup.py.
2016-03-13
- Merged more changes from the 'ingest' branch which furthers the work of
integrating the LedgerHub code into Beancount (almost done now).
* Added mimetype() and head() methods to the file cache object passed to the
extractors, as a convenience instead of having clients call the cached
convert() method.
* Added paranoid exception handlers to all the methods called on the
importer classes.
* Added tests for the examples provided in "examples/ingest".
* Refactor some of the code of beancount.ingest.file.
* Fixed bugs with ensuring the filenames are absolute names.
* Cleaned up the output of the commands.
* Made the header and section strings configurable from the import
configuration.
* Cleaned up the OFX importer from LedgerHub, added unit tests for it, and
added it to the beancount.ingest.importers directory. In addition, added
it to the example configuration for ingest under
beancount/examples/ingest.
* Added a dependency on the beautifulsoup4 package (bs4) in order to parse
XML files.
- Added a beancount.core.amount.add() function to add two amounts.
- Made the directive printer be more lenient to support incomplete postings.