ropensci / taxize

A taxonomic toolbelt for R
https://docs.ropensci.org/taxize
Other
270 stars 61 forks source link

Upcoming version of `rredlist` breaks `taxize` #937

Open willgearty opened 2 months ago

willgearty commented 2 months ago

I'm the maintainer of the rredlist package, and I wanted to make you aware that the next version of the rredlist package will break the IUCN functions in the taxize package. This is due to major changes in the IUCN API (v4, see discussion here), which I'm planning to track with the next version of rredlist. I'm removing all functionality related to the old API version (v3) from the package, which several functions in taxize depend on, but I'd be happy to work with you all to migrate some (or all) of the needed functionality over to taxize. Let me know how I can help.

dcuadrac commented 2 months ago

Thank you so much!

zachary-foster commented 1 month ago

Thanks for the info! I am working on a new CRAN release for taxize, so I will try to work these changes in. I will take a loko at the api_v4 branch, which I assume is where the relevant changes are?

willgearty commented 1 month ago

Yep, that's the one! Let me know if you have any questions.

zachary-foster commented 1 month ago

Thanks! It looks like there is no search for taxa in general now? I see functions for specific taxonomic levels (e.g. rl_species) but no generic search. This will make it difficult to make the IUCN functions in taxize work the same as functions for other data sources, since I dont see a way to know which taxonomic rank a random character supplied by a user is.

willgearty commented 1 month ago

That is correct, there is no longer any general taxonomic search in the IUCN API, see all of the endpoint options here: https://api.iucnredlist.org/api-docs/index.html. My understanding is that IUCN is trying to make the API more assessment-centric, rather than taxon-centric (since this is the way their database is set up).

All of the IUCN examples in the taxize documentation use \<Genus species>, and half of the functions are even explicit in the docs that this is the format (https://docs.ropensci.org/taxize/reference/iucn_summary.html, https://docs.ropensci.org/taxize/reference/iucn_id.html). Are the other two functions also supposed to work for other taxonomic levels?

willgearty commented 1 month ago

FYI, the changes have been merged to the main branch, so r-universe and the package's website are now updated to new version of the package. I'm hoping to publish to CRAN as soon as possible, so let me know if you have any other questions.

zachary-foster commented 1 month ago

Are the other two functions also supposed to work for other taxonomic levels?

I assumed so since that's how the other data source functions, but perhaps it was not an option for this one.

I am trying to get fix all the issues that have accumulated for taxize but I dont have a lot of free time for it. Do you think there is value in having versions of the IUCN functions in taxize or would just redirecting users to rredlist be better?

willgearty commented 1 month ago

As far as I can tell, taxize calls the following rredlist functions:

I'm pretty sure, based on the API docs, that all of these endpoints only support binomials, so it appears to me that these taxize functions only ever supported binomials as well?

Therefore, I don't think there should be too much work to do to maintain the functionality in taxize, but if you think it would be better to remove the IUCN functionality because it doesn't match the rest of the functionality of the package, that's fine too.

willgearty commented 3 weeks ago

@zachary-foster based on feedback by some beta testers, I added any old functions that I had removed back in as defunct functions and added lifecycle errors if they are ever used. So this update should no longer cause taxize to break, but it will still result in errors for users if they try to use taxize functions that call any of these now-defunct errors (and may break taxize tests).

At the moment, rredlist is going through rOpenSci peer review, so it'll be at least a few weeks (if not more than a month) before that wraps up and the new version heads to CRAN. Let me know if you need anymore information or insight about rredlist as you work towards the next version of taxize.