Adding a unit test for the report method of plugin/text_info.rb made appear a long standing bug appear, where two variables fi_without_atc_code and fi_atc_code_missmatch were initialized to a wrong value.
Fixed by changing src/plugin/text_info.rb
@duplicate_entries = [] @fi_without_atc_code = [], @fi_atc_code_missmatch = [], @target_keys = Util::COLUMNS_JULY_2015
to
@duplicate_entries = [] @fi_without_atc_code = [] @fi_atc_code_missmatch = [] @target_keys = Util::COLUMNS_JULY_2015
Splitting the AipsDownload take about 25 minutes via the plugin/text_info.rb which is much slower than the standalone variant, which took only 4 seconds. Why? Found the culprit. Had added an xmllint --format for each produced file. Delegating this to separate threads.
Also I did the following errors
2016-02-10 10:21:00 +0100: job is done. now postprocess works ... rss/fachinfo 68: rescue #<NoMethodError: undefined method `collect' for #<ODDB::Address2:0x000000426c14b0>> for rss/fachinfo 68: #<ODBA::Stub:717908040#34442116 @odba_class= @odba_container=711737160#21>: backtrace is: /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing' /var/www/oddb.org/src/model/registration_observer.rb:36:in `iksnrs' /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/stub.rb:112:in `method_missing' /var/www/oddb.org/src/view/rss/fachinfo.rb:38:in `item_to_html' /var/www/oddb.org/src/view/rss/fachinfo.rb:89:in `block (2 levels) in to_html' /var/www/oddb.org/src/view/rss/fachinfo.rb:83:in `each'
Adapting the code to support italian, too.
Creating a file problematic_fi_pi.lst containing all necessary info to classify duplicated FI/PIs.
Adapting src/model/package.rb to allow a patinfo inside the package, while fetching it from the sequence if absent.
Using etc/barcode_to_text_info.yml
to allow setting the name to use from the AipsDownload.xml. Testing it with the line 7680437880197_pi_de: "Tramal® Tropfen, Lösung zum Einnehmen"
. This works, but I must adapt my code to create a Patinfo-Object not a PatinfoDocument.
Saved stated in Attach:patch_rework_t8.txt
Must avoid error in /var/www/oddb.org/log/oddb/debug/2016/02.log
NoMethodError: undefined method `active_sequences' for :ODDB::Substance when updating index 'substance_index_sequence' with a ODDB::Substance ["/var/www/oddb.org/src/util/language.rb:53:in `method_missing'", "(eval):2:in `block in proc_instance_target'", "/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/index.rb:249:in `call'", "/usr/local/lib/ruby/gems/1.9.1/gems/odba-1.1.0/lib/odba/index.rb:249:in `update_origin'"]