New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Schwab bank support to schwab_csv importer #91
Conversation
Pull Request Test Coverage Report for Build 241
💛 - Coveralls |
Did you forget to include a commit with more code changes? I don't see the 7 new brokerage actions. |
See line 134 and on. I didn't have to add new classes for them, they're similar enough to existing types. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great overall! Thanks so much for the additions and improvements. Made a few comments but overall I think this is pretty close to ready.
One thing is I noticed a few bad type annotations; haven't tested but I would think these should cause a mypy failure. Can you verify that tox
is green with your changes?
...data/source/schwab_csv/test_basic/transactions/EAC_Checking_Transactions_20201223-160009.CSV
Outdated
Show resolved
Hide resolved
I should also clarify that @jbms is the author and maintainer of beancount-import and the ultimate authority on whether this gets merged; just offering my review as the initial contributor of the Schwab CSV importer. |
Thanks for the excellent review @carljm ! I will update this over the next few days as I have free cycles. |
@@ -1077,10 +1319,10 @@ def _load_positions_csv( | |||
symbol = STRIP_FROM_SYMBOL_RE.sub("", symbol) | |||
quantity = _convert_int(row["Quantity"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The quantity of reinvested portfolios can be decimal. I need to replace this line with quantity = _convert_decimal(row["Quantity"])
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Made that change here as well.
73d7e25
to
ca95966
Compare
Also adds 6 additional BrokerageActions found it my Brokerage CSV imports.
Now reusing the same types between brokerage and banking imports.
ca95966
to
8207a37
Compare
I didn't realize I should be running tox checks and it turns out the type inference engine wasn't able to correctly infer non-nullability previously. Introducing a variable fixes the check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you both so much for your feedback. This PR is way better for it.
It's ready to go now. When combined with #96 tox is passing.
...data/source/schwab_csv/test_basic/transactions/EAC_Checking_Transactions_20201223-160009.CSV
Outdated
Show resolved
Hide resolved
@@ -1077,10 +1319,10 @@ def _load_positions_csv( | |||
symbol = STRIP_FROM_SYMBOL_RE.sub("", symbol) | |||
quantity = _convert_int(row["Quantity"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Made that change here as well.
I have quite a lot of activity / business with Schwab including a checking account so I brought in support for everything I could find in my own Schwab CSV files. In the spirit of #88 .
Other changes in the schwab_csv source: (apologies for not splitting these out, if that's a bother I can do the extra book keeping to get them into independent pull reqs).
Known caveats: