-
Notifications
You must be signed in to change notification settings - Fork 493
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
file citation via API #10246
file citation via API #10246
Conversation
This comment has been minimized.
This comment has been minimized.
926ebfb
to
5214d7b
Compare
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
286657f
to
f34f82b
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Conflicts: src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@GPortas et al., I'm ready for more review. Thanks for all the feedback so far! |
This comment has been minimized.
This comment has been minimized.
} | ||
|
||
@Test | ||
public void testFileCitationToStringHtmlFilePid() throws ParseException { |
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 is great, thanks!
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 to me! Thank you for applying the requested changes @pdurbin
📦 Pushed preview images as
🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
@pdurbin, Should I be worried that https://dataverse-guide--10246.org.readthedocs.build/en/10246/api/native-api.html#get-file-citation-as-json looks like this in Safari? |
@sekmiller huh. I can't reproduce it. It shouldn't have anything to do with this PR. |
What this PR does / why we need it:
Returns a file citation like this:
This will be used by the the file landing page in the new frontend. See IQSS/dataverse-client-javascript#117
Which issue(s) this PR closes:
Special notes for your reviewer:
As requested in the issue, I followed the conventions in for the dataset-level equivalent of getting the citation: https://guides.dataverse.org/en/6.0/api/native-api.html#get-citation It was added in PR #9592 and updated in PR #10121.
This means that passing the dataset version is required.
I'm somewhat confused by what "direct" means. I see it was added in a commit by @qqmyers in c0c852f . I hope I'm using it right. Some Javadoc would be welcome.
Suggestions on how to test this:
Create datasets, upload files, check the file citation JSON for drafts, published, and deaccessioned. Note that there are automated tests for all of these cases.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No.
Is there a release notes update needed for this change?:
Included.
Additional documentation:
Included: https://dataverse-guide--10246.org.readthedocs.build/en/10246/api/native-api.html#get-file-citation-as-json