Skip to content

wip#68

Merged
janvanmansum merged 4 commits intoDANS-KNAW:masterfrom
janvanmansum:DD-2237
Apr 22, 2026
Merged

wip#68
janvanmansum merged 4 commits intoDANS-KNAW:masterfrom
janvanmansum:DD-2237

Conversation

@janvanmansum
Copy link
Copy Markdown
Contributor

@janvanmansum janvanmansum commented Apr 18, 2026

Fixes DD-2237

Description of changes

  • Adds method for getting file metadata
  • Changes type of file ID to long.
  • Major version bump because of possibly backwards incompatible change.

Notify

@DANS-KNAW/core-systems

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 18, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.10%. Comparing base (66ee309) to head (75c2c95).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...va/nl/knaw/dans/lib/dataverse/DataverseClient.java 0.00% 2 Missing ⚠️
.../main/java/nl/knaw/dans/lib/dataverse/FileApi.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master      #68      +/-   ##
============================================
- Coverage     25.12%   25.10%   -0.03%     
  Complexity       79       79              
============================================
  Files            54       54              
  Lines           979      980       +1     
  Branches         60       60              
============================================
  Hits            246      246              
- Misses          725      726       +1     
  Partials          8        8              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@janvanmansum janvanmansum requested a review from Copilot April 22, 2026 11:51
@janvanmansum janvanmansum marked this pull request as ready for review April 22, 2026 11:51
@janvanmansum janvanmansum requested a review from a team as a code owner April 22, 2026 11:51
Copy link
Copy Markdown

Copilot AI left a 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 addresses DD-2237 by extending the Dataverse client library with a file-metadata retrieval endpoint and updating file-ID-related APIs/models to use long-based identifiers (with a major version bump to reflect the breaking API change).

Changes:

  • Bump project version to 2.0.0-SNAPSHOT to reflect breaking API changes.
  • Add FileApi#getMetadata() for retrieving a file’s JSON representation/metadata.
  • Change file ID types from int to long/Long across relevant models and client entry points (including deleteFiles).

Reviewed changes

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

Show a summary per file
File Description
pom.xml Bumps parent build version to 2.0.0-SNAPSHOT.
lib/pom.xml Bumps library module version to 2.0.0-SNAPSHOT.
examples/pom.xml Bumps examples module version to 2.0.0-SNAPSHOT.
lib/src/main/java/nl/knaw/dans/lib/dataverse/model/file/DataFile.java Updates file-related ID fields to long/Long.
lib/src/main/java/nl/knaw/dans/lib/dataverse/model/DataMessageWithId.java Adjusts Lombok equality/hashCode generation to include superclass fields.
lib/src/main/java/nl/knaw/dans/lib/dataverse/FileApi.java Adds getMetadata() API method.
lib/src/main/java/nl/knaw/dans/lib/dataverse/DataverseClient.java Updates client entry points to accept long for file-related IDs.
lib/src/main/java/nl/knaw/dans/lib/dataverse/DatasetApi.java Updates deleteFiles to accept List<Long>.
examples/src/main/java/nl/knaw/dans/lib/dataverse/example/FileGetMetadata.java Adds runnable example for the new getMetadata() API.
examples/src/main/java/nl/knaw/dans/lib/dataverse/example/DatasetDeleteFiles.java Updates example to use List<Long> file IDs.

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

Comment thread lib/src/main/java/nl/knaw/dans/lib/dataverse/FileApi.java Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@janvanmansum janvanmansum merged commit 8b42f67 into DANS-KNAW:master Apr 22, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants