OpenTreeOfLife / peyotl

python library for interacting with Open Tree of Life resources
BSD 2-Clause "Simplified" License
11 stars 7 forks source link

Coerce TreeBASE DOIs to URLs #174

Closed jimallman closed 7 years ago

jimallman commented 7 years ago

@mtholder, please take a look when you have a chance (and apologies if this is difficult to apply on top of recent refactoring). As @jar398 points out:

The coercion should only happen when creating the nexson for a treebase study, not when the nexson comes from some other source. For other sources a valid nexson should be required (i.e. an invalid nexson should be rejected), and a valid nexson has URLs where URLs are expected.

I've made the change just to get_ot_study_info_from_treebase_nexml, so this should produce the desired behavior. Note that I've also updated the unit test for TreeBASE imports and our expected-result file. This PR partially fixes #138, https://github.com/OpenTreeOfLife/opentree/issues/907, and https://github.com/OpenTreeOfLife/clade-workshops/issues/5 ; in all cases, we really should also sweep the existing studies in https://github.com/opentreeoflife/phylesystem-1 and update any bare DOIs found there.

jimallman commented 7 years ago

@mtholder Thanks for taking a look! Sorry to bug you while you're on walkabout.