view · edit · sidebar · attach · print · history

Index>

20150609-savon-2-swissindex

Summary

  • adapt ext/swissindex to savon 2.x
  • use refdatabase

Commits

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.
  • Display new fields (LABEL, MORE_INFO, CORRESP) for compositions in oddb.org.
  • Use refdatabase for oddb.org, too.

use refdatabase

Continuing work of last wednesday.

Struggling to combine mocking via webmock/rspec and savon/mock/spec_helper. Found the VCR gem. This seems to be a lot easier way to run tests based on a real input. But as it requires to rewrite some parts of the tests, I will open a new local branch vcr based on the last published commit.

Summarized my useage of VCR in the README.md

  • we use the gem VCR to record real HTTP responses.
    • Removing the directory fixtures and running bundle exec rspec spec/downloader_spec.rb gets the actual content from the different servers
    • To minimize the downloaded size we use several before_record hooks to select the desired content, eg. only the 5 items from EPha.

This however not always trivial. Spending some hours to read the response, unzipping, opening XLSX file, etc.

adapt ext/swissindex to savon 2.x

Forgot to update to savon 1.6 in ext/swissindex/src/swissindex.rb. Unit-Test on travis-ci show this problem. Fixed with commit Update ext/swissindex to use savon 2.x. jobs/update_swissindex_pharma completes successfully on oddb-ci2. Pulling changes on thinpower and running import_daily in a separate screen after updating swissmedic-diff to 0.1.9. Adding a unit test for download_all. Changing unit-test to savon-2, too.

view · edit · sidebar · attach · print · history
Page last modified on June 09, 2015, at 08:06 PM