-
Notifications
You must be signed in to change notification settings - Fork 10
Add use case for getting dataset versions #402
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
base: develop
Are you sure you want to change the base?
Conversation
ekraffmiller
left a comment
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.
Hi @vera, thanks for your PR. We don't currently need this use case in our SPA, because we use GetDatasetVersionsSummaries, and GetDatasetVersionDiff to display a list of Dataset versions. But since it is available on the Dataverse API I think it's ok to add. The only caveat I have is to not return the list of files, for performance reasons.
docs/useCases.md
Outdated
| - **limit**: (number) Limit for pagination. | ||
| - **offset**: (number) Offset for pagination. | ||
| - **excludeMetadataBlocks**: (boolean) Exclude metadata blocks (default: false). | ||
| - **excludesFiles**: (boolean) Exclude files (default: true). |
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.
I think returning the complete list of files in the response could be a problem - some of our datasets have several thousand files. We have another use case, GetDatasetFiles, which returns the files with pagination. My suggestion is to remove files from the response, and use the other use case to get the files with pagination.
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.
@ekraffmiller thanks for your review and sorry for the delay in getting back to this.
I have removed the excludesFiles param from this client implementation, so it's no longer possible to request the list of files without pagination.
I'm just wondering:
- Should I also add a note in the documentation of the use case that we are differing from the Dataverse API specification here, and why?
- Does this mean that the param should really be removed from the Dataverse API entirely? Or are there other use cases, outside of dataverse-client-javascript, which won't have this problem?
What this PR does / why we need it:
This PR adds code for using the "List Versions of a Dataset" API.
Which issue(s) this PR closes:
I'm not aware of an open issue.
Related Dataverse PRs:
Depends on feat: add "isInReviewState" to API responses about dataset versions dataverse#12008Since during review of IQSS/dataverse#12008, it was decided not to add the
isInReviewStateflag to dataset versions API responses, I've removed them from the code here as well. This PR no longer depends on/is related to any dataverse PRs.Special notes for your reviewer:
/
Suggestions on how to test this:
I've added tests and docs on how to use.
Is there a release notes or changelog update needed for this change?:
Yes
Additional documentation:
/