Skip to content

Export Metadata Use Case#463

Merged
ekraffmiller merged 4 commits into
developfrom
462-export-metadata-use-case
Jul 14, 2026
Merged

Export Metadata Use Case#463
ekraffmiller merged 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>

@ekraffmiller ekraffmiller 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.

looks good, approved 👍

@github-project-automation github-project-automation Bot moved this from Ready for Review ⏩ to Ready for QA ⏩ in IQSS Dataverse Project Jul 14, 2026
@ekraffmiller

Copy link
Copy Markdown
Contributor

all tests passed, ok to merge

@ekraffmiller
ekraffmiller merged commit 3505065 into develop Jul 14, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from Ready for QA ⏩ to Merged 🚀 in IQSS Dataverse Project Jul 14, 2026
@pdurbin pdurbin moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Jul 14, 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: Done 🧹

Development

Successfully merging this pull request may close these issues.

Export Metadata Use Case

4 participants