Branch ruby_21x
---
Added a unit test and now my unit-test hangs calling fachinfo.unwanted_effects
.
The problem is that we don't parse correctly HTML cells which contain <br>
-Tag as found for CoAprovel in the chapter "Unerwünschte Wirkungen", e.g. Placebo n = 236.
Adapting the other unit test to the changes and finding that the tables generated for isentres (IKSNR 58267) look much nicer with this change as they don't contain superfluos paragraphs.
But for IKSNR 57435 Baraclude there are some changes which are not correct. Must investigate why I find in the yaml a span häufig: span> Kopfschmerzen, Schwindel, Schläfrigkeit
. Found that this error was present before my changes, too.
Now sudo -u apache jobs/update_textinfo_swissmedicinfo --no-download --target=fi 54842 --reparse
completes fine. The new info is however only displayed after restarting bin/oddbd.
Pushed commits Fix problem parsing 54842 CoAprovel and Fix problem parsing 54842 CoAprovel. Adding test file
Now switching to use ruby 2.1.2 on oddb-ci2 again. Re-Importing from thinpower and running import_daily.
Trying to make travis pass with commit Use RbConfig instead of Config
Import-daily completed sucessfully when I did not remove the download_latest.xml, but failed with a segmentation fault /usr/local/lib/ruby/gems/2.1.0/gems/odba-1.1.0/lib/odba/cache_entry.rb:37: [BUG] Segmentation fault at 0x00000000000018
when starting with an empty data/xml/AipsDownload_latest.xml.
Running the rspec passed after commit [https://github.com/ngiger/oddb.org/commit/522424c69f1a66b03867dd3b257936675af5d726|Make rspec pass]]. All tests pass (after telling apache to use modruby 2.1.0 again).
Now I must check why I still have some failing unit tests
test/test_model/text.rb
where I have 5 failures (word-wrapping, etc)
test/test_plugin/medical_products.rb
(2 failures)
test/test_util/updater.rb
(1 failure)
Will continue tomorrow.
Note: running import_daily produced againg the segmentation fault. The last lines ofoddb/debug/2014/06.log were
2014-06-30 18:09:14 +0200: update_compositions: row[0] 61649 iksnr 61649 01 seq Renvela, poudre opts {:create_only=>true, :date=>#<Date: 2014-06-30 ((2456839j,0s,0n),+0s,2299161j)>, :composition=>0, :label=>nil} cell_content sevelameri carbonas 2.4 g, arom.: vanillinum, ethylvanillinum et alia, excipiens ad pulverem pro charta. <..> and of the previous run we also hat 2014-06-30 16:20:50 +0200: update_compositions: row[0] 61649 iksnr 61649 01 seq Renvela, poudre opts {:create_only=>true, :date=>#<Date: 2014-06-30 ((2456839j,0s,0n),+0s,2299161j)
As I started with a clean /var/www/oddb.org I got the following error
Plugin: ODDB::Interaction::InteractionPlugin Error: Errno::ENOENT Message: No such file or directory - /var/www/oddb.org/data/html/interaction/flockhart/table.aspx Backtrace: /var/www/oddb.org/src/plugin/flockhart.rb:378:in `read' /var/www/oddb.org/src/plugin/flockhart.rb:378:in `parse_table' /var/www/oddb.org/src/plugin/interaction.rb:203:in `parse_flockhart' /var/www/oddb.org/src/plugin/interaction.rb:265:in `update' /var/www/oddb.org/src/util/updater.rb:538:in `block in update_simple' /var/www/oddb.org/src/util/updater.rb:501:in `call' /var/www/oddb.org/src/util/updater.rb:501:in `wrap_update' /var/www/oddb.org/src/util/updater.rb:536:in `update_simple' /var/www/oddb.org/src/util/updater.rb:346:in `update_interactions' /var/www/oddb.org/src/util/updater.rb:207:in `block in run' /var/www/oddb.org/src/util/schedule.rb:10:in `call' /var/www/oddb.org/src/util/schedule.rb:10:in `run_on_monthday' /var/www/oddb.org/src/util/updater.rb:206:in `run' jobs/import_daily:13:in `block in <module:Util>' /var/www/oddb.org/src/util/job.rb:40:in `call' /var/www/oddb.org/src/util/job.rb:40:in `run' jobs/import_daily:12:in `<module:Util>' jobs/import_daily:11:in `<module:ODDB>' jobs/import_daily:10:in `<main>'
Created a local patch to fix this problem. Re-Importing the DB and resetting the latest-files. Now restarting import_daily again.
But my fix did not add any file table.aspx as hoped. Where does it come from? (http://medicine.iupui.edu/clinpharm/ddis/) http://medicine.iupui.edu/clinpharm/ddis/table.aspx?
Got the following error
Error: NoMethodError Message: undefined method `new' for nil:NilClass Backtrace: /var/www/oddb.org/src/plugin/flockhart.rb:51:in `create_update_objects' /var/www/oddb.org/src/plugin/flockhart.rb:95:in `block (5 levels) in extract_data' /var/www/oddb.org/src/plugin/flockhart.rb:90:in `each' /var/www/oddb.org/src/plugin/flockhart.rb:90:in `block (4 levels) in extract_data' /var/www/oddb.org/src/plugin/flockhart.rb:88:in `each' /var/www/oddb.org/src/plugin/flockhart.rb:88:in `block (3 levels) in extract_data' /var/www/oddb.org/src/plugin/flockhart.rb:87:in `each' /var/www/oddb.org/src/plugin/flockhart.rb:87:in `block (2 levels) in extract_data' /var/www/oddb.org/src/util/html_parser.rb:310:in `each' /var/www/oddb.org/src/util/html_parser.rb:310:in `each_row' /var/www/oddb.org/src/plugin/flockhart.rb:69:in `block in extract_data' /var/www/oddb.org/src/plugin/flockhart.rb:68:in `each' /var/www/oddb.org/src/plugin/flockhart.rb:68:in `extract_data' /var/www/oddb.org/src/plugin/flockhart.rb:384:in `parse_table' /var/www/oddb.org/src/plugin/interaction.rb:203:in `parse_flockhart' /var/www/oddb.org/src/plugin/interaction.rb:265:in `update' /var/www/oddb.org/src/util/updater.rb:538:in `block in update_simple' /var/www/oddb.org/src/util/updater.rb:501:in `call' /var/www/oddb.org/src/util/updater.rb:501:in `wrap_update' /var/www/oddb.org/src/util/updater.rb:536:in `update_simple' /var/www/oddb.org/src/util/updater.rb:346:in `update_interactions' /var/www/oddb.org/src/util/updater.rb:207:in `block in run' /var/www/oddb.org/src/util/schedule.rb:10:in `call' /var/www/oddb.org/src/util/schedule.rb:10:in `run_on_monthday' /var/www/oddb.org/src/util/updater.rb:206:in `run' jobs/import_daily:13:in `block in <module:Util>' /var/www/oddb.org/src/util/job.rb:40:in `call' /var/www/oddb.org/src/util/job.rb:40:in `run' jobs/import_daily:12:in `<module:Util>' jobs/import_daily:11:in `<module:ODDB>' jobs/import_daily:10:in `<main>'
Restarting import_daily again.