-
Notifications
You must be signed in to change notification settings - Fork 2
/
TODO
122 lines (91 loc) · 4.97 KB
/
TODO
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
====
TODO
====
* DIT plugin should have option to skip zero-amount DIT transactions
* Reformat TODO as TODO.md or move items to Issues tracker on github
* Create a DEVNOTES.md document with how-to pointers for coding style, documentation,
continous integration, test coverage, versioning, pylint, etc.
* Should I have release notes?
* Document exceptions
* Write package level docs
* Use doctest in .rst doc examples
https://pytest.org/latest/doctest.html
* Improve docs with Google style docstrings, type hints, and examples
* Consider rewriting tests as functions rather than classes using more
of pytest facilities
* Write an import filter to pull the payee out of the narration based on
past example; run it before the transaction completer!
* Make the transaction completer customizable
** User can specify a separator string to ask to ignore the narration
starting from the separator pattern
** User can specify pairs of a regex to match a token and a string to replace
the token with; use it to normalize dates (e.g. 2016-03-27 -> XXXX-XX-XX)
and confirmation codes (e.g. H3Z2J7 -> A1A1A1) to improve matches
* Update readme to point to docs on
https://pythonhosted.org/beansoup/ and
* Write docstrings for everything
* Write beansoup.scripts.beansoup script (installed in bin/beansoup)
to run various commands (in a way, an extension of bean-doctor).
First command is to detect inactive accounts (no activity in the past X days)
Print account name, open date, last transaction date, days since last
transaction, and balance
It could even have an option to print close directives
It should also have an option to limit it to a certain type of directives
(i.e. only balance sheet accounts)
Maybe it should be a script on its own; call it bean-inactive
* Write auto_close plugin to close any account (still open) that has not seen
any activity in the past X days
Trivial using beancount.core.getters.get_accounts_use_map
(see auto_accounts plugin for an example)
Not sure how usuful this plugin would be; the reports already exclude
accounts that have no activity for the period covered.
Maybe the plugin could just warn the user that there are accounts that
could be closed and could show the last used dates.
(see nounused plugin for an example of error reporting)
* Sort rows by date at the beginning of sort_rows().
May add option to disable the fancy sorting and only decide whether to
reverse the list of not (still checking the balance values)
* Move transactions.py to importers/filters/completion.py
* Should importers/filters/__init__.py import all filters to expose them
more conveniently (e.g.
from beansoup.importers import filters
then filters.Completion, filters.Whatever
instead of
from beansoup.importers.filters import completion, whatever
then completion.Completion, whatever.Whatever or
completion.Filter, whatever.Filter)
* Consider adding an option to transaction completer to add posting for
all matching accounts even though they would not balance
* Allow transaction completer to look at alternative accounts for matches
(e.g. completing a transaction from a Visa statement could also look at
transactions involving an Amex card since you may have charged for the
same payee on one card or the other)
Matches in alternative accounts would have a smaller score
* Consider using Baysian inference to improve the transaction completer
https://tomszilagyi.github.io/payment-matching/
Some of my accounts also use codes structured like Canadian postal codes
* Improve the narrative similarity algorithm used by transaction completer
Try something from difflib:
difflib.SequenceMatcher(lambda x: x == ' ', 'string1', 'string2').ratio()
Or try Levenshtein distance
https://pypi.python.org/pypi/python-Levenshtein/0.12.0
distance(), ratio(), and jaro_winkler() look interesting
Probably best to lowercase everything before
http://stackoverflow.com/questions/6690739/fuzzy-string-comparison-in-python-confused-with-which-library-to-use
http://chairnerd.seatgeek.com/fuzzywuzzy-fuzzy-string-matching-in-python/
https://github.com/seatgeek/fuzzywuzzy
https://marcobonzanini.com/2015/02/25/fuzzy-string-matching-in-python/
https://pypi.python.org/pypi/Distance/
* Add a customizable normalization step on the imported narration and
existing narrations to improve robustness of similarity measure.
For example, the zip-like electronic transfer code at the end of some TD
entries could be normalized to A1B2C3.
Maybe use a normalization dict to map accounts to normalization callables.
* Maybe ignored_tag of clear_transactions plugin should be a regexp
* Finish clear_transactions plugin; add documentation and example
* Should clear_transactions plugin be able to print out pending transactions?
* Write OFX importer (banking only?) that can name files according to the
billing period
* Write tests for everything
* Consider adding examples
* Should I write a plugin to support annotating transactions with doc:?