Skip to content

Export Metadata Use Case#463

Open
ChengShi-1 wants to merge 4 commits into
developfrom
462-export-metadata-use-case
Open

Export Metadata Use Case#463
ChengShi-1 wants to merge 4 commits into
developfrom
462-export-metadata-use-case

Conversation

@ChengShi-1

@ChengShi-1 ChengShi-1 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Export Metadata Use Case

Which issue(s) this PR closes:

Related Dataverse PRs:

  • Depends on #

Special notes for your reviewer:

UnlinkCollection test error, the subcollection was removed from the collection links API response, but it still appeared in the Solr-backed /search?subtree=... response, which led an error when of getCollectionItem use case. I fixed by using getCollectionLinks use case to check if the unlinking works successfully

Suggestions on how to test this:

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

YES

Additional documentation:

@ChengShi-1 ChengShi-1 linked an issue Jul 8, 2026 that may be closed by this pull request
@github-actions github-actions Bot added FY26 Sprint 26 FY26 Sprint 26 (2026-06-17 - 2026-07-01) GREI Re-arch GREI re-architecture-related labels Jul 8, 2026
@ChengShi-1 ChengShi-1 marked this pull request as ready for review July 8, 2026 21:49
Copilot AI review requested due to automatic review settings July 8, 2026 21:49
@ChengShi-1 ChengShi-1 added the Size: 3 A percentage of a sprint. 2.1 hours. label Jul 8, 2026
@ChengShi-1 ChengShi-1 moved this to Ready for Review ⏩ in IQSS Dataverse Project Jul 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new datasets use case for exporting dataset metadata via Dataverse GET /datasets/export (including draft support), exposing it through the public datasets API and documenting it. Also updates unlink-collection tests to validate unlinking through the links API rather than Solr-backed search results.

Changes:

  • Introduce exportDatasetMetadata use case + repository method, and export ExportedDatasetMetadata type.
  • Add unit + integration coverage for metadata export (latest published default + draft export).
  • Stabilize unlink-collection tests by asserting via getCollectionLinks instead of /search?subtree=....

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/unit/datasets/ExportDatasetMetadata.test.ts Adds unit tests for the new ExportDatasetMetadata use case behavior.
test/integration/datasets/DatasetsRepository.test.ts Adds integration coverage for exporting latest published and draft dataset metadata.
test/integration/collections/CollectionsRepository.test.ts Updates unlink test to validate via collection links API instead of Solr search.
test/functional/collections/UnlinkCollection.test.ts Updates functional unlink test to verify via getCollectionLinks.
src/datasets/infra/repositories/DatasetsRepository.ts Implements exportDatasetMetadata API call and response shaping.
src/datasets/index.ts Wires/export the new use case and exports the response type.
src/datasets/domain/useCases/ExportDatasetMetadata.ts Adds the new domain use case wrapper.
src/datasets/domain/repositories/IDatasetsRepository.ts Extends repository interface with exportDatasetMetadata.
src/datasets/domain/models/ExportedDatasetMetadata.ts Introduces the response type for exported metadata.
docs/useCases.md Documents the new use case and updates the datasets read use-cases list.
CHANGELOG.md Adds a changelog entry for the new dataset metadata export feature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/datasets/infra/repositories/DatasetsRepository.ts Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@ChengShi-1 ChengShi-1 added the SPA label Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 26 FY26 Sprint 26 (2026-06-17 - 2026-07-01) GREI Re-arch GREI re-architecture-related Size: 3 A percentage of a sprint. 2.1 hours. SPA

Projects

Status: Ready for Review ⏩

Development

Successfully merging this pull request may close these issues.

Export Metadata Use Case

2 participants