view · edit · sidebar · attach · print · history

Index>

fix-hpc-rss-feeds

Summary

  • Generating hpc feed should not throw an error
  • running unit-tests for oddb.org under Ruby 2.2.3

Commits

In branch ruby2x of spreadsheet

In branch ruby2x of oddb.org

Index

Keep in Mind for work to do
  • Fix dojo error http://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dom-ready
  • I removed on May-27 tests for ix_registrationss, fix_sequences, fix_compositions, fix_packages from test/test_plugin/swissmedic.rb,as he could not find any references for them in the src code. Did I erroneously remove stuff when cleaning up the swissmedic import earlier?
  • The whole test for older/newer Packages must be adapted to xlsx. One must compare the rows (e.g. by creating csv files) and do the same stuff in xlsx!
  • creat gem: task: input=file with ean-codes, standard output show ean-codes + atc-code. Source is Swissmedic Packungen.xlsx or XML.
  • Import via data/medreg_companies.yaml
  • Fix problem with radioactivatum 99m-technetio when parsing Wirkstoffe
  • Fix galenic_forms when parsing swissmedic.xlsx
  • Cleanup generic_type. Replace it everywhere by sl_generic_type and adapt code accordingly.
  • Get updated ATC-codes from EPha for oddb.org, too.
  • Use refdatabase for oddb.org, too.
  • Check whether we should revert the part which touche src/plugin/text_info.rb of commit 17af82ba4d76a5838683411b260de265531f9e74. We should improve test/stub/oddbapp.rb to work similar for update/pointer as the real oddbapp. In this case we would have a good Stub for plugins. May we need a different stub when working with plugins (which create/modify/destroy ODDB-Objects), when in most other cases a very simple stub is sufficient.
  • When a logged in admin user changes an atc_code of a product, the corresponding atc_class must update its sequences, too.
  • Order of entering search type and value should not matter. Both should show long URL with search

Generating hpc feed should not throw an error

Must fix the following error

Plugin: ODDB::RssPlugin
Error: ArgumentError
Message: wrong number of arguments (4 for 3)
Backtrace:
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.6/lib/htmlgrid/component.rb:125:in `initialize'
/var/www/oddb.org/src/plugin/plugin.rb:83:in `new'
/var/www/oddb.org/src/plugin/plugin.rb:83:in `block in update_rss_feeds'
/var/www/oddb.org/src/plugin/plugin.rb:49:in `call'
/var/www/oddb.org/src/plugin/plugin.rb:49:in `block in l10n_sessions'
/var/www/oddb.org/src/plugin/plugin.rb:46:in `each_key'
/var/www/oddb.org/src/plugin/plugin.rb:46:in `l10n_sessions'
/var/www/oddb.org/src/plugin/plugin.rb:82:in `update_rss_feeds'
/var/www/oddb.org/src/plugin/rss.rb:172:in `update_swissmedic_feed'
/var/www/oddb.org/src/plugin/rss.rb:191:in `update_recall_feed'
/var/www/oddb.org/src/util/updater.rb:410:in `block in update_recall_feed'
/var/www/oddb.org/src/util/updater.rb:549:in `call'
/var/www/oddb.org/src/util/updater.rb:549:in `wrap_update'
/var/www/oddb.org/src/util/updater.rb:408:in `update_recall_feed'
/var/www/oddb.org/src/util/updater.rb:403:in `update_swissmedic_feeds'
/var/www/oddb.org/src/util/updater.rb:194: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 unit test, fixed the problem and tested it on thinpower. Pushed commit Fix error creating RSS-feed recall

running unit-tests for oddb.org under Ruby 2.2.3

I merged all the recent changes into my ruby 2.x branch an running bundle install results in

bundle install
There was a LoadError while loading spreadsheet.gemspec: 
cannot load such file -- ole/storage from
  /opt/src/oddb.org.2.x/vendor/bundle/ruby/2.2.0/bundler/gems/spreadsheet-a9ac9963a58b/spreadsheet.gemspec:4:in `<main>'

Does it try to require a relative path? That's been removed in Ruby 1.9.

running bundle exec rake install_gem in my local checkout of the spreadsheet workspace results in

cd pkg/spreadsheet-1.1.0
WARNING:  no homepage specified
WARNING:  open-ended dependency on ruby-ole (>= 1.0) is not recommended
  if ruby-ole is semantically versioned, use:
    add_runtime_dependency 'ruby-ole', '~> 1.0'
WARNING:  See http://guides.rubygems.org/specification-reference/ for help

Using http://bundler.io/rubygems.html to adapt the spreadsheet gem to the current state of art of Ruby. After fixing this errors I was able to run test/suite.rb and got the following errors/failures

grep runs, suite-4.log  | grep -v "0 failures, 0 errors"
6 runs, 5 assertions, 0 failures, 1 errors, 0 skips
18 runs, 4 assertions, 0 failures, 14 errors, 0 skips
74 runs, 125 assertions, 2 failures, 0 errors, 5 skips
29 runs, 44 assertions, 0 failures, 1 errors, 0 skips
329 runs, 592 assertions, 3 failures, 0 errors, 5 skips

Pushed commits:

Tried to setup a docker environment to install and use rbenv to install ruby 2.2.3. Ran into problems, because the Docker RUN command always defaults to use /bin/sh and ignoring all (or at least some) stuff from files like ~/.bashrc. Therefore had to prepend each RUN command with eval "$(rbenv init -)" && before running commands like gem install bundler.

Still having some unit tests for views which fail.

view · edit · sidebar · attach · print · history
Page last modified on December 15, 2015, at 05:16 PM