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

Adds new update dataverse general endpoint #10925

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from

Conversation

GPortas
Copy link
Contributor

@GPortas GPortas commented Oct 15, 2024

What this PR does / why we need it:

Adds a new endpoint (PUT /api/dataverses/<identifier>) for updating an existing Dataverse collection using a JSON file following the same structure as the one used in the API for the creation.

Which issue(s) this PR closes:

Special notes for your reviewer:

I have refactored commands CreateDataverseCommand and UpdateDataverseCommand, so that they now inherit from a common parent class called AbstractWriteDataverseCommand, where the shared logic of these commands is centralized.

Suggestions on how to test this:

Call the new API endpoint using curl:

curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -X PUT "http://localhost:8080/api/dataverses/<ALIAS_OF_CREATED_DV>" --upload-file <YOUR_JSON_FILE>

Verify that the new properties specified in the JSON are correctly reflected in the dataverse collection.

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?:

Yes. Attached.

@coveralls
Copy link

coveralls commented Oct 15, 2024

Coverage Status

coverage: 20.889% (+0.02%) from 20.868%
when pulling 4f98be6 on 10904-edit-dataverse-collection
into d039a10 on develop.

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.

@DS-INRAE
Copy link
Member

Hi @GPortas Sorry I didn't take a look at the code if it would have answered my question.
Does this new endpoint also addresses some of the editable elements of the collections that are hard-coded ?

This comment has been minimized.

2 similar comments

This comment has been minimized.

This comment has been minimized.

@GPortas
Copy link
Contributor Author

GPortas commented Oct 21, 2024

Hi @GPortas Sorry I didn't take a look at the code if it would have answered my question. Does this new endpoint also addresses some of the editable elements of the collections that are hard-coded ?

Hi @DS-INRAE,

If I understood it correctly, your issue is related to creating custom metadata structures for collections, while this PR focuses on creating a new endpoint for updating existing collections based on the only structure currently supported.

So I think your requested changes are not related, sorry!

@GPortas GPortas marked this pull request as ready for review October 21, 2024 15:58
@GPortas GPortas added Size: 3 A percentage of a sprint. 2.1 hours. SPA These changes are required for the Dataverse SPA Original size: 3 labels Oct 21, 2024
@GPortas GPortas added SPA.Q4.3 Edit Collection Page GREI Re-arch Issues related to the GREI Dataverse rearchitecture labels Oct 21, 2024
Copy link

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:10904-edit-dataverse-collection
ghcr.io/gdcc/configbaker:10904-edit-dataverse-collection

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

@GPortas GPortas self-assigned this Oct 22, 2024
@scolapasta scolapasta added the Status: Waiting for Related Issues/PRs This issue depends upon the completion of one or more issues/PRs label Oct 22, 2024
@cmbz cmbz added FY25 Sprint 8 FY25 Sprint 8 (2024-10-09 - 2024-10-23) FY25 Sprint 9 FY25 Sprint 9 (2024-10-23 - 2024-11-06) labels Oct 23, 2024
@GPortas GPortas removed the Status: Waiting for Related Issues/PRs This issue depends upon the completion of one or more issues/PRs label Oct 24, 2024
@GPortas GPortas removed their assignment Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 8 FY25 Sprint 8 (2024-10-09 - 2024-10-23) FY25 Sprint 9 FY25 Sprint 9 (2024-10-23 - 2024-11-06) GREI Re-arch Issues related to the GREI Dataverse rearchitecture Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q4.3 Edit Collection Page SPA These changes are required for the Dataverse SPA
Projects
Status: Ready for Review ⏩
Development

Successfully merging this pull request may close these issues.

Edit Dataverse Collection Native API endpoint
5 participants