-
Notifications
You must be signed in to change notification settings - Fork 140
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
484/zenodo integration #1257
484/zenodo integration #1257
Conversation
Added read/write/catalog function Added tests for all 3 functions Fixed code in plugin and control class Added functions read/write to package class
Fixed formatting of test datapackage file for ndjson Filter token key from url in vcr
5ba16ad
to
41bf168
Compare
@roll this is ready for review. Thanks! |
try: | ||
package = Package.from_zip(path, title=title) | ||
except FrictionlessException as exception: | ||
if not "[Errno 2] No such file or directory" in str(exception): |
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 the error message "No such file or directory" the best one from when the zippeds package fails to be loaded?
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.
This error is raised when from_zip
function doesn't find "datapackage.json" file after it unzips the folder and searches for 'datapackage.json' or 'datapackage.yaml' file in unzipped folder.
https://github.com/frictionlessdata/framework/blob/main/frictionless/package/package.py#L838
https://github.com/frictionlessdata/framework/blob/main/frictionless/package/package.py#L154
So this is to skip the error and continue reading files if it can't read the zipped folder. But I am not sure if this is the right way to skip the exception.
* added fix for zipped resource * added new tests
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.
Thanks! Amazing work!
Of course, we need docs also - https://framework.frictionlessdata.io/docs/portals/zenodo.html. Can you please add a separate PR for it? (also a small blog post I think)
Please make sure that all the checks pass. Please add here any additional information regarding this pull request. It's highly recommended that you link this PR to an issue (please create one if it doesn't exist for this PR)