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

Fix bug: Figshare downloaders fetch correct version #343

Merged
merged 3 commits into from
Feb 24, 2023

Conversation

santisoler
Copy link
Member

Fix bug that made Figshare downloaders to fetch always the latest version. Now the api_response property of FigshareRepository parses the DOI to get the desired version of the repository and makes use of the Figshare API to get the list of available files for that particular version. If no version is specified through the DOI, the last version will be fetched, keeping backward compatibility and the default behaviour of Zenodo. Add test functions.

Relevant issues/PRs:

Fixes #342

Fix bug that made Figshare downloaders to fetch always the latest
version. Now the `api_response` property parses the DOI to get the
desired version of the repository and makes use of the Figshare API to
get the list of files available for that particular version. If no
version is specified through the DOI, the last version will be fetched,
keeping backward compatibility and the default behaviour of Zenodo.
Add test functions.
@santisoler
Copy link
Member Author

@leouieda I went through this PR a couple of times and I think it's ready. It solves the bug, doesn't break any backward compatibility (in fact it keeps the old behaviour of letting figshare to return the latest version if no version is specified), it adds a test for this bug and the code is tidy.

I'm merging this so we can work on the next release of Pooch. If any change should be made, we can always release a patch.

@santisoler santisoler merged commit 3817c67 into main Feb 24, 2023
@santisoler santisoler deleted the figshare-versions branch February 24, 2023 17:30
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

Successfully merging this pull request may close these issues.

Fetching from figshare DOIs always gets the latest version
1 participant