view · edit · sidebar · attach · print · history

Index>

20141001-yus-dump-yaml

Summary

  • Dump yus-database to yaml to better understand YUS-affiliations
  • Analysing error with Download Zulassungsinhaber Desitin

Commits

Index

Keep in Mind
  • 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!
  • Fix analyses search. Eg. for Akute myeloische Leukämie

---

Analysing error with Download Zulassungsinhaber Desitin

I still have the same error, that I don't get a CSV-file when trying to download the CSV export for Desiting. Using HttpFox showed me that loading http://oddb-ci2.dyndns.org/de/gcc/export_csv/zone/drugs/search_query/Desitin/search_type/st_company produced the error

00:01:07.670 0.461 1080 0 GET (Aborted) NS_BINDING_ABORTED http://oddb-ci2.dyndns.org/resources/dojo/dojo/window.js

Now I am using httpfox on oddb-ci2.

Improved debugging with adding user-name when logging Allowed?. Fixed some build-errors on travis -ci too. See commits

Dump yus-database to yaml to better understand YUS-affiliations

I want to add a possibility to dump the yus-DB to yaml to better understand the differences between the YUS-DB on thinpower and one created following the examples found elsewhere in this wiki.

Porting the dump from the branch without_needle to the master branch and comparing the output of dumps produced by the unit-tests. Took some time to make the tests pass again on branch master. Dumping the attribute @persistance does not produce any output. Dumping works after changing the variable to be dumped form @persistence -> @needle.persistence.

The following differences between the dumps for branch master Attach::master_dump.txt and without_needle Attach::without_needle_dump.txt were found:

  • Entries are ordered differently (this is known difference for hashes between ruby 1.8 and ruby >= 1.9
  • Timestamps for fields valid_from are different (expected)
  • Empty field passhash: not present in master (??)
  • Yus affiliations look different
    • for without_needle
  entity_name: !ruby/object:Yus::Entity 
    affiliations: 
    - &id001 !ruby/object:Yus::Entity 
      affiliations: []
  • for master-branch (Ruby 1.8.6 old)
  entity_name: !ruby/object:Yus::Entity 
    affiliations: 
    - *id001
  • a_yus_group is defined differently
    • for without_needle
  a_yus_group: *id001
  • for master-branch (Ruby 1.8.6 old)
  a_yus_group: &id001 !ruby/object:Yus::Entity 
    affiliations: []

    last_logins: {}

    name: a_yus_group
    preferences: {}

    privileges: 
      set_password: !ruby/object:Yus::Privilege 
        items: 
          a_yus_group: :never
    tokens: {}

    valid_from: 2014-10-01 09:41:59.892694 +02:00
    valid_until: entity_pass

Conclusion: My port of yus to a model without needle is not correct. Must be fixed! Nevertheless the results for the master branch could be pushed with the following commits

The questions are:

  • Must the implementation of without_needle be fixed if all unit-tests pass?
  • How can one migrate data from the master-branch to the without_needle branch for a real database
  • How the rald database dumps look like. (I will try to answer this question first)

Adding a possibility in oddb.org to dump the yus-database to yaml via bin/admin. NO! I added a new bin/yus_dump to the yus gem with commits

When running the new bin/yus_dump I don't get a nice representation as I see in the yaml file only

-- !ruby/object:Yus::Persistence::Odba
entities: &id001
  downloaduser: !ruby/object:ODBA::Stub
    odba_id: 13
    odba_container: *id001

Adapted the dumping to yaml to get the real entities from the DB-Cache. But this does not work with my MockPersistence. Maybe I must adapt it to more closely reflect how the Persistence works.

Pushed the following commit to fix the dump issue with the master branch under ruby 1.8.6

Okay. Importing database from thinpower and dumping it worked fine. Observered that there are non UTF-8 string in it like :city: "Z\xC3\xBCrich"

view · edit · sidebar · attach · print · history
Page last modified on October 01, 2014, at 04:58 PM