Skip to content

Add endpoint to retrieve all pretranslation confidences#935

Merged
pmachapman merged 1 commit into
mainfrom
confidences_endpoint
May 7, 2026
Merged

Add endpoint to retrieve all pretranslation confidences#935
pmachapman merged 1 commit into
mainfrom
confidences_endpoint

Conversation

@pmachapman
Copy link
Copy Markdown
Collaborator

@pmachapman pmachapman commented Apr 30, 2026

Fixes #933


This change is Reviewable

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 76.80000% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.73%. Comparing base (fa53b59) to head (863b6b2).

Files with missing lines Patch % Lines
src/Serval/src/Serval.Client/Client.g.cs 62.66% 18 Missing and 10 partials ⚠️
...eatures/Engines/GetAllPretranslationConfidences.cs 98.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #935      +/-   ##
==========================================
+ Coverage   66.71%   66.73%   +0.01%     
==========================================
  Files         371      372       +1     
  Lines       21562    21687     +125     
  Branches     2745     2771      +26     
==========================================
+ Hits        14386    14472      +86     
- Misses       6149     6179      +30     
- Partials     1027     1036       +9     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pmachapman pmachapman requested review from Enkidu93 and ddaspit April 30, 2026 04:43
Copy link
Copy Markdown
Contributor

@ddaspit ddaspit left a comment

Choose a reason for hiding this comment

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

@ddaspit reviewed 3 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on Enkidu93 and pmachapman).


src/Serval/src/Serval.Translation/Features/Engines/GetAllPretranslationConfidences.cs line 5 at r1 (raw file):

public record PretranslationConfidenceDto
{
    public required IReadOnlyList<string> TargetRefs { get; init; }

Do we need TextId and SourceRefs?

Copy link
Copy Markdown
Collaborator Author

@pmachapman pmachapman left a comment

Choose a reason for hiding this comment

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

@pmachapman made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on ddaspit and Enkidu93).


src/Serval/src/Serval.Translation/Features/Engines/GetAllPretranslationConfidences.cs line 5 at r1 (raw file):

Previously, ddaspit (Damien Daspit) wrote…

Do we need TextId and SourceRefs?

No, as I want to keep this as small as possible, and in SF we only use the TargetRefs. I think if an application/use case needed TextId or SourceRefs, they could use the full GetAllPretranslations endpoint.

@Enkidu93
Copy link
Copy Markdown
Collaborator

Enkidu93 commented May 6, 2026

src/Serval/src/Serval.Translation/Features/Engines/GetAllPretranslationConfidences.cs line 5 at r1 (raw file):

Previously, pmachapman (Peter Chapman) wrote…

No, as I want to keep this as small as possible, and in SF we only use the TargetRefs. I think if an application/use case needed TextId or SourceRefs, they could use the full GetAllPretranslations endpoint.

Just curious, Peter: Do you use template=Source when fetching USFM? I wonder if you should be using the source refs then. In most cases, it wouldn't matter, but I think it is possible that a verse could be mismapped or at least collide with another verse.

Copy link
Copy Markdown
Collaborator

@Enkidu93 Enkidu93 left a comment

Choose a reason for hiding this comment

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

:lgtm:

@Enkidu93 reviewed 3 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on ddaspit).

@pmachapman pmachapman force-pushed the confidences_endpoint branch from c8ad52b to fc2c16d Compare May 6, 2026 21:06
Copy link
Copy Markdown
Collaborator Author

@pmachapman pmachapman left a comment

Choose a reason for hiding this comment

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

@pmachapman made 1 comment.
Reviewable status: 1 of 3 files reviewed, 1 unresolved discussion (waiting on ddaspit and Enkidu93).


src/Serval/src/Serval.Translation/Features/Engines/GetAllPretranslationConfidences.cs line 5 at r1 (raw file):

Previously, Enkidu93 (Eli C. Lowry) wrote…

Just curious, Peter: Do you use template=Source when fetching USFM? I wonder if you should be using the source refs then. In most cases, it wouldn't matter, but I think it is possible that a verse could be mismapped or at least collide with another verse.

Done. I have added the source refs.

Copy link
Copy Markdown
Contributor

@ddaspit ddaspit left a comment

Choose a reason for hiding this comment

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

:lgtm:

@ddaspit reviewed 2 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on pmachapman).

@pmachapman pmachapman force-pushed the confidences_endpoint branch from fc2c16d to 863b6b2 Compare May 7, 2026 21:59
@pmachapman pmachapman merged commit 69cf4f9 into main May 7, 2026
2 checks passed
@pmachapman pmachapman deleted the confidences_endpoint branch May 7, 2026 22:14
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.

Add confidence values endpoint

4 participants