Code Monkey home page Code Monkey logo

Comments (12)

kaiwei avatar kaiwei commented on August 15, 2024 1

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.

from beancount_reds_importers.

kaiwei avatar kaiwei commented on August 15, 2024 1

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!

from beancount_reds_importers.

kaiwei avatar kaiwei commented on August 15, 2024 1

Aha got it. Thank you for the help!

from beancount_reds_importers.

redstreet avatar redstreet commented on August 15, 2024 1

Remaining issue will be covered by #74.

from beancount_reds_importers.

redstreet avatar redstreet commented on August 15, 2024

@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!

from beancount_reds_importers.

kaiwei avatar kaiwei commented on August 15, 2024

I had emailed them to you (earlier) the raw actual files (given privacy concerns). Hope that's okay! Minimal config below:

See below

from beancount_reds_importers.

redstreet avatar redstreet commented on August 15, 2024

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.

from beancount_reds_importers.

redstreet avatar redstreet commented on August 15, 2024

Sounds great, thanks much! If it's okay, I'll wait to receive the data to commit the fix to avoid duplication of effort.

from beancount_reds_importers.

kaiwei avatar kaiwei commented on August 15, 2024

Here you go!

uniplus.zip

Simple config
apply_hooks(uobbank.Importer({
'main_account' : 'Assets:Banks:UOB:UNIPLUS',
'account_number' : '1234567890',
'currency' : 'SGD',
'rounding_error' : 'Equity:Rounding-Errors:Imports',
}), [PredictPostings()]),

from beancount_reds_importers.

redstreet avatar redstreet commented on August 15, 2024
  1. "Cash Withdrawal" entries should have 2 decimal places even for whole numbers but are currently missing. This affects automatic numerical display inference in Fava

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?

  1. Entries should mirror numerical precision from exported Excel bank source, which are to 2 decimal places. But this seems to be rounded down (now) plus the numerical precision seems to go out to several lengthy number of places (which also somehow crashes fava)

Fixed.

  1. Importer outputs a warning message to terminal line when ran: "WARNING *** file size (92598) not 512 + multiple of sector size (512)"

Fixed.

  1. Last minor nit tweak: Possible to output the larger positive numberical figures, e.g., 1,000, as it is, without commas (i.e, 1000)? Commas rendering should be something adjustable in fava, etc., but not part of the raw beancount output?

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 beancount_reds_importers. But changing this at your end is trivial: simply run use autobean-format on your source, or pipe the import through it:

autobean-format foo.bean --thousands-separator=add --recursive --output-mode inplace

from beancount_reds_importers.

redstreet avatar redstreet commented on August 15, 2024

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.

from beancount_reds_importers.

redstreet avatar redstreet commented on August 15, 2024

Piping through a simple sed should fix the issue until resolved.

from beancount_reds_importers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.