Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upcoming version of rredlist breaks taxize #937

Open
willgearty opened this issue Sep 19, 2024 · 9 comments
Open

Upcoming version of rredlist breaks taxize #937

willgearty opened this issue Sep 19, 2024 · 9 comments

Comments

@willgearty
Copy link

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
Copy link

Thank you so much!

@zachary-foster
Copy link
Collaborator

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
Copy link
Author

willgearty commented Sep 27, 2024

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

@zachary-foster
Copy link
Collaborator

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
Copy link
Author

willgearty commented Sep 27, 2024

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
Copy link
Author

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
Copy link
Collaborator

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
Copy link
Author

willgearty commented Oct 2, 2024

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
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants