view · edit · sidebar · attach · print · history




  • swissmedic_import with :check must delete packages not in Packungen.xlsx
  • fix rapflag bugs
  • Keep in Mind



swissmedic_import with :check must delete packages not in Packungen.xlsx

Still have a typo in my last try.

Error: NameError
Message: undefined local variable or method `iksrn' for #<ODDB::SwissmedicPlugin:0x00564d0b6eac68>
Did you mean?  iksnr
/var/www/ `block (2 levels) in check_all_packages'
/var/www/ `each'
/var/www/ `block in check_all_packages'
/var/www/ `each'
/var/www/ `check_all_packages'
/var/www/ `update'
/var/www/ `block in update_swissmedic'
/var/www/ `wrap_update'
/var/www/ `update_swissmedic'
jobs/import_swissmedic_only:30:in `block in <module:Util>'
/var/www/ `run'
jobs/import_swissmedic_only:12:in `<module:Util>'
jobs/import_swissmedic_only:11:in `<module:ODDB>'
jobs/import_swissmedic_only:10:in `<main>'

Dropped and reloaded database. Running import_swissmedic_only with checkes for all registrations and all packages.

Created a separate jobs, which does not send emails and has a hard coded limit. See commit Fix expired packages. But it look like that it will need around 15 hours go fix all problems. Here part of my log

2017-09-27 16:05:16 +0200 We must deactivate 2051 registrations #<ODDB::Registration:0x00556f369a8148> #<ODDB::Registration:0x00556f3a426018>
2017-09-27 16:05:16 +0200 :!registration,46466!sequence,01!package,012.
2017-09-27 16:06:35 +0200 :!registration,46466!sequence,01!package,020.
2017-09-27 16:06:36 +0200 :!registration,23062!sequence,01!package,011.
2017-09-27 16:07:13 +0200 :!registration,23062!sequence,01!package,046.
2017-09-27 16:07:50 +0200 :!registration,55485!sequence,01!package,020.
2017-09-27 16:08:03 +0200 :!registration,45119!sequence,01!package,017.
2017-09-27 16:08:41 +0200 :!registration,41322!sequence,01!package,020.
2017-09-27 16:09:18 +0200 :!registration,41322!sequence,02!package,047.
2017-09-27 16:09:55 +0200 :!registration,52300!sequence,01!package,010.
2017-09-27 16:09:56 +0200 :!registration,52300!sequence,01!package,029.
2017-09-27 16:09:57 +0200 :!registration,00526!sequence,01!package,001.
2017-09-27 16:09:58 +0200 :!registration,00526!sequence,01!package,002.
2017-09-27 16:09:59 +0200 :!registration,00526!sequence,01!package,003.
2017-09-27 16:10:00 +0200 :!registration,00526!sequence,01!package,004.
2017-09-27 16:10:01 +0200 :!registration,44633!sequence,01!package,019.
2017-09-27 16:10:11 +0200 :!registration,44633!sequence,01!package,027.
2017-09-27 16:10:21 +0200 :!registration,46469!sequence,01!package,038.

fix rapflag bugs

The following bugs must still be fixed

  • BUG 2 ("Dividend" again): On AUG-28 on USD Exchange Wallet: you are ignoring the line containing the word Dividend, whereas you are supposed to read that ending balance off of every line (and taking the End-of-Day balance after reading every line) AND classifying the credit on that day as INCOME. REMINDER: "Deposit Wallet" = "Funding Wallet"
  • BUG 3: on AUG-02, in USD wallet (exchange or funding need to check), there is a $3'148 dollar discrepancy between YWeSlack and True. This is most likely because you picked up twice the line where BCH is sold for USD, wherein $3'148 are the cash proceeds for the sale.
  • BUG 4: There seems to be a Timing Discrepancy between the downloaded Ledger Data (YWeSee vs AviRap). I have everything set to CET (Central European Time, e.g., Rome Time) and bitfinex allows me to change that. Check if you can change this setting such that the downloaded data via the API has the same timing convention.
  • BUG 5: on AUG-17: on USD Exchange Wallet: the ending balance for YWeSlack is $4'370, whereas for TRUE the ending balance is $0.
  • BUG 6: on AUG-20: on USD Exchange Wallet: the ending balance for YWeSlack is -$4.15, whereas for TRUE the ending balance is $0. This seems to be because you are not parsing line containing the word Settlement at all, when you are supposed to read that line and classify the debit on that day as INCOME.
  • BUG 8: on BTC (total) there are dates skipped where there are no ledger entries. There supposed to be an Ending Balance (and Income) for every Calendar Day, and if there was no Ledger Entry on that day then the Income should be zero and the Ending Balance should be what it was the day before.

Bug 4 looks like a nice to have feature. Looking at the problems with the ending balance. e,g. bug 6 of Aug-20.

Bug 8 is fixed with commit Emit totals for each day. Released rapflag gem 1.0.5.

Working on Bug 6 revealed that in the spec test the test for the balance was partly wrong. But my changes are not always correct as sometimes I have only rounding differences like USD,2016.10.08,"",2.797999989168701e-05 != USD,2016.10.08,"",2.798e-05 (old), but sometimes the balance is completely different, eg USD,2016.09.30,"",-1.3544096128925015e-13 != USD,2016.09.30,"",0.0 (old)

I am getting now better results with my reworked calculation of the daily balance, e.g


But why do I get these rounding errors? Or must I trust the balance of the last entry? Yes. Just take the balance of the last entry of the same day

Fixed with commit Fix calculation of daily income/balance. This should fix bugs 3,5,6.

Released rapflag gem version 1.0.6

view · edit · sidebar · attach · print · history
Page last modified on September 27, 2017, at 06:49 PM