Closed fmichonneau closed 7 years ago
@@ master #32 diff @@
==========================================
Files 8 8
Lines 190 193 +3
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 151 154 +3
Misses 39 39
Partials 0 0
Powered by Codecov. Last update 85e0747...f4676ce
actually, it doesn't quite work... as it still fails if more than one data type is asked (ie bold_tax_id(321215, dataTypes="basic,stats")
). I'll revisit this in a couple of hours
Thanks! Hmm, maybe just Filter(length, ll)
to remove zero length elements, like
(ll <- list(publicspecies = 0, publicmarkersequences = list()))
#> $publicspecies
#> [1] 0
#>
#> $publicmarkersequences
#> list()
#>
Filter(length, ll)
#> $publicspecies
#> [1] 0
Can you add a test too in test-bold_tax_id
?
Thanks Scott. I generalized the code so that we can deal with the last example I gave. I added the tests. Let me know what you think.
LGTM, thanks lots @fmichonneau
When doing:
I get
Looking at the response from the API, I saw:
The proposed change in the code tries to deal with these situations where one the slots contains an empty list. I'm not entirely sure it's the best approach as I'm not too familiar with the other kinds of output this API provide, but all the tests pass.