Set Dataset License and Custom Terms Use Case#376
Merged
ChengShi-1 merged 4 commits intodevelopfrom Nov 5, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements the "Set Dataset License and Custom Terms Use Case" which adds functionality to update dataset licenses or custom terms through the Dataverse API. It provides support for both predefined licenses (by name) and custom terms of use and access.
- Adds
UpdateDatasetLicenseuse case and repository method for thePUT /datasets/{id}/licenseendpoint - Introduces
DatasetLicenseUpdateRequestDTO to handle both predefined and custom license updates - Includes comprehensive test coverage across unit, integration, and functional test levels
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/datasets/domain/dtos/DatasetLicenseUpdateRequest.ts | New DTO defining the structure for license update requests |
| src/datasets/domain/useCases/UpdateDatasetLicense.ts | New use case implementing the license update functionality |
| src/datasets/domain/repositories/IDatasetsRepository.ts | Interface extension adding updateDatasetLicense method |
| src/datasets/infra/repositories/DatasetsRepository.ts | Repository implementation for the license update endpoint |
| src/datasets/index.ts | Module exports for the new functionality |
| test/unit/datasets/UpdateDatasetLicense.test.ts | Unit tests for the use case |
| test/integration/datasets/DatasetsRepository.test.ts | Integration tests for repository methods |
| test/functional/datasets/UpdateDatasetLicense.test.ts | Functional tests for end-to-end scenarios |
| docs/useCases.md | Documentation for the new use case |
| CHANGELOG.md | Release notes entry |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
|
@ChengShi-1 What about setting the TermsOfAccess? |
Contributor
Author
IQSS/dataverse#11772 is still in progress, I'll create new issue once it's ready |
Contributor
|
conflicts need to be resolved, tests also failing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Inspired from Edit terms page, related to 2025 Q3 features.
Update from Germán: re-run tests once related backend PR is merged.
Which issue(s) this PR closes:
Is there a release notes or changelog update needed for this change?:
yes it should have