-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
New zenodo api bandaid #2942
New zenodo api bandaid #2942
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this PR really supposed to be going into main
rather than dev
?
Another simplifying change I think we can make with the new API is getting rid of the API keys / tokens entirely, since it seems like read-only operations are fine without them (at least, curl
works without them which I don't think was the case before!)
for f in dpkg.json()["entries"]: | ||
if f["key"] == "datapackage.json": | ||
resp = self._fetch_from_url(f["links"]["content"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If our whole setup is contingent on being able to construct a path to a file given the filename and record ID, is there a reason to use the API to obtain the datapackage.json
?
I guess if we want to verify the checksum on datapackage.json
we need to get the checksum from Zenodo, since the file can't contain its own checksum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My reason for doing this is that "keeping the datapackage.json around lets me not think too hard about how to construct a DatapackageDescriptor
."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry if I was unclear, I meant why not just pull down the datapackage.json
by constructing its URL, rather than querying the API to get its URL -- having it around is clearly useful!
932ec05
to
7db9f07
Compare
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #2942 +/- ##
=====================================
Coverage 88.5% 88.5%
=====================================
Files 90 90
Lines 10797 10800 +3
=====================================
+ Hits 9564 9568 +4
+ Misses 1233 1232 -1
☔ View full report in Codecov by Sentry. |
Closes #2939 .
datapackage.json
/ pretend that we were using the "best, most stable URLs" the whole time