Must port adaptations of oddb2xml to oddb.org.
Looking at ext/swissindex/src/swissindex.rb
I remark that it implents support for read Pharma, NonPharma and Migel. As Migel is not part of the refdata I have to reorganize the code and move the Pharma/NonPharma to ext/refdata/src/refdata.rb
and leave only Migel in ext/swissindex/src/swissindex.rb
(renaming SwissindexNonpharma
to SwissindexMigel
). This means also renaming the daemons ch.oddb-swissindex_nonpharma
-> ch.oddb-refdata_nonpharma
, ch.oddb-swissindex_pharma
ch.oddb-refdata_pharma
and adding a new ch.oddb-swissindex_migel
Trying to make all unit tests pass on travis-ci. Unit in test/test_model fail on travis-ci. Why? Trying some changes.
Reviewing result of test_options.rb before pushing commit. Running test_options did not generate any files when running with options -t md
. There was no unit test for it. Therefore creating one and running bundle exec ruby bin/oddb2xml -t md --log --skip-download
seem to work find. Therefore I think the test_options.rb script has a problem.
Same problem occurred when running with the following options:
Skipping this problem for the time being.
Updated History.txt to document work done in the last three days. Pushed commit Download refdata from new URL
Fixed an error when running in a different timezone on travis.ci with commit Use TZ=UTC to fix error on travis-ci
Pushed commit Try to avoid error Net::NTLM::VERSION::MAJOR
Running oddb2xml -e consumes way too much time (around 4 hours compared to 45 minutes before). Why? Looking where we spend time:
Using ruby-prof (and patching builder.rb) to profile building 100 articles. Analysing output Attach:profile_build_graph.txt and Attach:profile_build.txt.
As it looks like sorting and selecting in the array takes most of the time, I try to use the keys (EAN) as integers and not as strings. This brought down the time to about 9500 seconds (two hours , as the speed-up mostly vanished when preprare_articles was accessing more elements. Relevant times are:
Using FixNum for pharmacode hash, too. But I think I must rethink the way how I changed prepare_article. But not today.