Open snacktavish opened 4 years ago
Thanks! I will take a look.
Oh, thoughts on whether this is a backend issue, or an opentree issue?
Pretty confident it’s an opentree issue. Behaves fine on direct api calls.
Found it! There's a PR on opentree
that watches for new behavior in bulk TNRS.
Its code is in otcetera, right? I'm guessing the problem is in how this json
object is populated. If there's no match of any kind, it look like this defaults to null instead of an empty array.
I'll just fix this to return an empty array.
I fixed this on the optimize-dp
branch for now: https://github.com/OpenTreeOfLife/otcetera/commit/684d62cde8da2f148deb44dcb45fa9a3ef80b71c
Does the optimize-dp
branch have a special status vs. develop
? Or can I merge it there, for a standard push to devapi?
It looks like api
is pulling from the faster-search
branch, so that we can merge to development
without affecting production. I think we'd eventually like to get back to the point where development
becomes master after we successfully deploy it to production.
So, yes, I think that's fine.
I just merged that into development
.
Ah, I think related to this if you search terms that don't match in the taxon browser you get no response. e.g. https://tree.opentreeoflife.org/taxonomy/browse?name=dinodaur
whereas on dev, where this fix is implemented, you get that nothing is matched e.g. https://tree.opentreeoflife.org/taxonomy/browse?name=dinodaur
Should be fixed when development branch of otcerta is merged to master and deployed.
I tried running these names https://github.com/McTavishLab/OT2020/blob/master/unmatched_mammal_names.txt through the bulk TNRS, and it hangs when it gets to "Pipistrellus alaschanicus" it hangs.
Which we don't have a match for according to:
curl -X POST https://api.opentreeoflife.org/v3/tnrs/match_names -H "content-type:application/json" -d '{"names":["Pipistrellus alaschanicus"],"do_approximate_matching":true}'