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

Feature Request: Automatically update objects retrieved on older versions #269

Closed
ceorellana opened this issue Nov 16, 2022 · 1 comment
Closed

Comments

@ceorellana
Copy link

pybliometrics version:
3.4.0

Affected classes:
AuthorRetrieval (so far)

I was thinking of reporting this as a bug but it's more of a request for "legacy support" per se. I was using AuthorRetrieval when I got an UnicodeDecodeError. Upon further inspection, I noticed that the object had already been downloaded on January 2021, which would correspond to at most version 2.7.2. Using the refresh parameter fixed the issue, but I don't think it would be viable to manually check for every object retrieved on prior versions to use the refresh parameter. I haven't checked if this is the case for the other classes, but I'm guessing it might be.

Would it be feasible to check on retrieval if an object was downloaded on a prior version to that retrieval function being updated, to then automatically apply the refresh parameter?

I would like to see if this is an isolated case or if this has happened to other users.

@Michael-E-Rose
Copy link
Contributor

The refresh parameter accepts a number. It will be interpreted as maximum age in days. When you put refresh=500, the file gets automatically updated if it's older than 500 days, otherwise it stays as it is. I think this solves your issue.

As for what you proposed as solution, issue #125 is about the same idea: Let users know if the file has been downloaded already.

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

No branches or pull requests

2 participants