-
Notifications
You must be signed in to change notification settings - Fork 39
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
Numerical fixes for UOB importer #70
Comments
@kaiwei would you mind please attaching these three: anonymized data, expected output, and a minimal config file? This will help debug, for to help turn the debugged cases into unit tests to prevent regressions. Thanks! |
I had emailed them to you (earlier) the raw actual files (given privacy concerns). Hope that's okay! Minimal config below: See below |
I totally understand, anonymizing data is a pain. But if you could post even minimal anonymized data here that I can commit to the repository as tests (eg: a single transaction for each issue here), that would be of great help in ensuring things don't break in the future. IMHO, this is a good opportunity to build and commit tests. Continuing to build and make fixes without unit tests rarely has good outcomes, and I'm simply trying to ensure we end up with a solid, stable codebase with these importers. I hope that makes sense? Happy to discuss more if needed. |
No problems. I'll get to it for the purpose of the tests, but hopefully the actual files (which were emailed) are useful to you in the meantime. Appreciate the help as always. |
Sounds great, thanks much! If it's okay, I'll wait to receive the data to commit the fix to avoid duplication of effort. |
Here you go! Simple config |
- ignore WARNING *** file size (92598) not 512 + multiple of sector size (512)
- decimal places - still needs a full solution. The problem is, petel uses xlwt/xlrd to read excel, which use excel datatypes, which we don't want, as we want just the string, which we can then pass on to decimal.decimal - not sure exactly how decimals are stored in excel - don't end up with long floats
- decimal places - still needs a full solution. The problem is, petel uses xlwt/xlrd to read excel, which use excel datatypes, which we don't want, as we want just the string, which we can then pass on to decimal.decimal - not sure exactly how decimals are stored in excel - don't end up with long floats
Fixed. Still needs a full solution. The problem is, petl uses xlwt/xlrd to read excel, which use excel datatypes, which we don't want, as we want just the string, which we can then pass on to decimal.Decimal. Not sure exactly how decimals are stored in excel It should have a single digit after the decimal. Please let me know if this solves your issue?
Fixed.
Fixed.
Thousands separator-in-source seem to be an issue of personal preference. It improves readability of the source, and some like it for that, particularly if they tend to look at their source a lot. Others don't or don't care. I'll leave it the way it is to have it remain consistent with
|
- decimal places - still needs a full solution. The problem is, petel uses xlwt/xlrd to read excel, which use excel datatypes, which we don't want, as we want just the string, which we can then pass on to decimal.decimal - not sure exactly how decimals are stored in excel - don't end up with long floats
Thanks for the autobean recommendation! It's a great formatter! All issues seems resolved for now but instead of a single digit after the decimal, can we pad it to two instead, so that it ends as 1.00 SGD or 1.30 SGD, etc. instead of 1.0 SGD and 1.3 SGD, given dollars and cents are up to two decimals and this also mirrors the root excel file. Thanks again for the help! |
That's the part above I referred to as arising from petl using xlwt/xlrd to read excel, and not yet fully resolved. It might require a bit of digging and time to figure out. I'll do it when I get some time next, but it might be a while. |
Aha got it. Thank you for the help! |
Piping through a simple sed should fix the issue until resolved. |
Remaining issue will be covered by #74. |
- ignore WARNING *** file size (92598) not 512 + multiple of sector size (512)
- decimal places - still needs a full solution. The problem is, petel uses xlwt/xlrd to read excel, which use excel datatypes, which we don't want, as we want just the string, which we can then pass on to decimal.decimal - not sure exactly how decimals are stored in excel - don't end up with long floats
The text was updated successfully, but these errors were encountered: