Closed nicdumz closed 1 year ago
Two bugs, two tickets, please. Otherwise discussing them is a mess. The first bug is solved in #64. I don't understand the second part: given the same inputs beangulp produces the same identical output. If this property would not hold it would be impossible to test it. It it impossible to get that output with the code currently in the master branch, thus I cannot reproduce.
Or we could consider #94 as a relatively simpler fix than #64 maybe?
(Split the second issue to #95)
Fixed in #64.
Imagine a setup with:
And a static importer such as:
This situation is a simplified version of CSV reports with overlapping dates, something that happen if you're not carefully doing CSV exports at specific time boundaries. (e.g. export Jan-June.csv, then March-Sept.csv).
Running beangulp.Ingest (
extract -o out.beancount
) will create the followingout.beancount
with duplicates:I believe this happens because the
_extract
code only compares dups against already existing entries, but not against new files returned from walk().I think it could instead be accumulating new entries when calling
extract.extract_from_file(importer, filename, existing_entries)
, and instead callextract.extract_from_file(importer, filename, accumulated_existing_entries)
, so that duplicates across files are detected.Thanks!