Skip to content
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

Add API endpoint for comparing Dataset Versions #10945

Merged
merged 9 commits into from
Nov 22, 2024

Conversation

stevenwinship
Copy link
Contributor

@stevenwinship stevenwinship commented Oct 21, 2024

What this PR does / why we need it: Need an API endpoint that will compare two dataset versions and return a list of differences between the versions. This is needed to support the SPA Dataset Page

Which issue(s) this PR closes: #10888

Special notes for your reviewer:

Suggestions on how to test this: See IT and Unit tests

Does this PR introduce a user interface change? If mockups are available, please link/include them here: New API

Is there a release notes update needed for this change?: Included

Additional documentation:
https://dataverse-guide--10945.org.readthedocs.build/en/10945/

@stevenwinship stevenwinship self-assigned this Oct 21, 2024
@stevenwinship stevenwinship added Feature: API GREI Re-arch Issues related to the GREI Dataverse rearchitecture FY25 Sprint 8 FY25 Sprint 8 (2024-10-09 - 2024-10-23) Size: 30 A percentage of a sprint. 21 hours. (formerly size:33) SPA.Q4.1 Collection Page: All Filtering Options SPA These changes are required for the Dataverse SPA Type: Feature a feature request and removed SPA.Q4.1 Collection Page: All Filtering Options labels Oct 21, 2024
@coveralls
Copy link

coveralls commented Oct 21, 2024

Coverage Status

coverage: 22.4% (+0.5%) from 21.856%
when pulling 91fef44 on 10888-add-api-for-comparing-dataset-versions
into e208eed on develop.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@cmbz cmbz added the FY25 Sprint 9 FY25 Sprint 9 (2024-10-23 - 2024-11-06) label Oct 23, 2024
@ekraffmiller
Copy link
Contributor

HI @stevenwinship I tried the latest version of the API, it looks good, just needs a few small changes:

  • oldVersion: use 'lastUpdatedDate' rather than 'createdDate'
  • files: (added, removed or replaced): include tags (categories) and filePath (directoryLabel)

This comment has been minimized.

@stevenwinship
Copy link
Contributor Author

HI @stevenwinship I tried the latest version of the API, it looks good, just needs a few small changes:

  • oldVersion: use 'lastUpdatedDate' rather than 'createdDate'
  • files: (added, removed or replaced): include tags (categories) and filePath (directoryLabel)

Fixed

@stevenwinship stevenwinship removed their assignment Oct 24, 2024
@stevenwinship stevenwinship added Original size: 30 Size: 3 A percentage of a sprint. 2.1 hours. and removed Size: 30 A percentage of a sprint. 21 hours. (formerly size:33) labels Oct 24, 2024
@pdurbin
Copy link
Member

pdurbin commented Oct 25, 2024

There's potential for merge conflicts with this PR:

Right? 🤔

@luddaniel
Copy link
Contributor

There's potential for merge conflicts with this PR:

Right? 🤔

I think it's conflict-free. Maybe in IT tests. I will help if needed.
Good job @stevenwinship by the way.

DataverseRequest req = createDataverseRequest(getRequestUser(crc));
DatasetVersion dsv1 = getDatasetVersionOrDie(req, versionId1, findDatasetOrDie(id), uriInfo, headers);
DatasetVersion dsv2 = getDatasetVersionOrDie(req, versionId2, findDatasetOrDie(id), uriInfo, headers);
return ok(DatasetVersion.compareVersions(dsv1, dsv2));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a test to make sure that the versions are considered in the correct order?

Copy link
Contributor Author

@stevenwinship stevenwinship Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added check. return 400 if not in proper order

Copy link
Contributor

@sekmiller sekmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very good. Just a couple of minor nits and a reminder to bring the branch up to date with Dev. Thanks

This comment has been minimized.

This comment has been minimized.

1 similar comment

This comment has been minimized.

Copy link
Contributor

@sekmiller sekmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates. approved

@sekmiller sekmiller removed their assignment Nov 6, 2024
@cmbz cmbz added the FY25 Sprint 10 FY25 Sprint 10 (2024-11-06 - 2024-11-20) label Nov 7, 2024
@ofahimIQSS ofahimIQSS self-assigned this Nov 13, 2024

This comment has been minimized.

This comment has been minimized.

@ofahimIQSS
Copy link
Contributor

IT and unit test passed - merging PR

@ofahimIQSS
Copy link
Contributor

@stevenwinship can you please resolve the branch conflicts. Thanks!

@pdurbin pdurbin assigned stevenwinship and unassigned ofahimIQSS Nov 20, 2024
Copy link

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:10888-add-api-for-comparing-dataset-versions
ghcr.io/gdcc/configbaker:10888-add-api-for-comparing-dataset-versions

🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name.

@cmbz cmbz added the FY25 Sprint 11 FY25 Sprint 11 (2024-11-20 - 2024-12-04) label Nov 21, 2024
@cmbz cmbz added this to the 6.5 milestone Nov 21, 2024
@ofahimIQSS
Copy link
Contributor

IT and Unit tests passing - Merging PR monitoring and Jenkins.

@ofahimIQSS ofahimIQSS merged commit a3a11a4 into develop Nov 22, 2024
22 checks passed
@ofahimIQSS ofahimIQSS deleted the 10888-add-api-for-comparing-dataset-versions branch November 22, 2024 16:46
@ofahimIQSS ofahimIQSS removed their assignment Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: API FY25 Sprint 8 FY25 Sprint 8 (2024-10-09 - 2024-10-23) FY25 Sprint 9 FY25 Sprint 9 (2024-10-23 - 2024-11-06) FY25 Sprint 10 FY25 Sprint 10 (2024-11-06 - 2024-11-20) FY25 Sprint 11 FY25 Sprint 11 (2024-11-20 - 2024-12-04) GREI Re-arch Issues related to the GREI Dataverse rearchitecture Original size: 30 Size: 3 A percentage of a sprint. 2.1 hours. SPA These changes are required for the Dataverse SPA Type: Feature a feature request
Projects
Status: Merged 🚀
Development

Successfully merging this pull request may close these issues.

Feature Request: Add API endpoint for comparing Dataset Versions
8 participants