-
Notifications
You must be signed in to change notification settings - Fork 495
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
RO-Crate metadata mime type detection #10016
Conversation
This is a nice improvement! Wouldn't the next logical step be to edit the following files...
... so that we can show Also, some tests would be nice. And a release note. 😄 |
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.
Looks good.
@pdurbin |
Sounds good. In line with https://www.researchobject.org/ro-crate/1.1/terminology.html
No objection from me. It's the first of these but it doesn't seem to fit with anything more popular:
@jggautier do you have an opinion on this? Also, @ErykKul the release notes look good. I'm glad tests are passing. I haven't really looked at the code yet but I'm giving this a small effort size for review and QA. |
Thanks for asking. I don't have an informed opinion. |
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.
Looks good. I left comments about dropping some now duplicate code and getting rid of the example file (which I think is not needed). Otherwise, it looks ready to go. I see that the build failed way back when but the results are no longer available, so we should check when this rebuilds after changes.
Related to IQSS/dataverse-pm#175. Added related GREI tag. |
@qqmyers, I have refactored the lookup logic. It looks better now and is slightly more readable. |
@qqmyers I am not sure why the test was failing, but if it is not related to this PR, it can go to "ready for QA" |
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.
Looks good.
What this PR does / why we need it:
This PR adds support for RO-Crate metadata detection. It does so by extending
MimeTypeDetectionByFileName.properties
to accept filenames with extensions and adding the two possible RO-Crate metadata file names:Which issue(s) this PR closes:
Closes #10015
Suggestions on how to test this:
Add a file named
ro-crate-metadata.json
to a dataset. The displayed mime type should beapplication/ld+json
instead ofapplication/json
(the default forJSON
files):When you add the RO-Crate previewer (gdcc/dataverse-previewers#41) to the external tools, it should then preview the metadata file as RO-Crate.
Is there a release notes update needed for this change?:
Yes.