-
Notifications
You must be signed in to change notification settings - Fork 8
Set Dataset License and Custom Terms Use Case #376
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?
Set Dataset License and Custom Terms Use Case #376
Conversation
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.
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
UpdateDatasetLicense
use case and repository method for thePUT /datasets/{id}/license
endpoint - Introduces
DatasetLicenseUpdateRequest
DTO 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 <[email protected]>
@ChengShi-1 What about setting the TermsOfAccess? |
IQSS/dataverse#11772 is still in progress, I'll create new issue once it's ready |
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.
Cool, approving!
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