Skip to content

Specify sourceRefs and targetRefs in JSON sent to machine.py#946

Open
pmachapman wants to merge 1 commit into
mainfrom
source_refs
Open

Specify sourceRefs and targetRefs in JSON sent to machine.py#946
pmachapman wants to merge 1 commit into
mainfrom
source_refs

Conversation

@pmachapman
Copy link
Copy Markdown
Collaborator

@pmachapman pmachapman commented May 14, 2026

Fixes #940.

Requires sillsdev/machine.py#297.


This change is Reviewable

@pmachapman pmachapman requested review from Enkidu93 and ddaspit May 14, 2026 02:31
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 14, 2026

Codecov Report

❌ Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.70%. Comparing base (39e9d69) to head (0c252e5).

Files with missing lines Patch % Lines
...e.Shared/Services/TranslationPreprocessBuildJob.cs 0.00% 5 Missing ⚠️
...Shared/Services/WordAlignmentPreprocessBuildJob.cs 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #946      +/-   ##
==========================================
- Coverage   66.73%   66.70%   -0.03%     
==========================================
  Files         372      372              
  Lines       21687    21695       +8     
  Branches     2771     2773       +2     
==========================================
  Hits        14472    14472              
- Misses       6179     6187       +8     
  Partials     1036     1036              

☔ 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.

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:

I can't believe I missed this 😵. Thank you, Peter! Sorry about all this!

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

@Enkidu93
Copy link
Copy Markdown
Collaborator

src/Machine/src/Serval.Machine.Shared/Services/WordAlignmentPreprocessBuildJob.cs line 86 at r1 (raw file):

                    wordAlignmentWriter.WriteString("textId", row.TextId);
                    wordAlignmentWriter.WriteStartArray("sourceRefs");
                    foreach (object rowRef in row.TargetRefs)

Do you mean row.SourceRefs? Or is Reviewable's diff just throwing my eye?

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.

@ddaspit, we were previously testing this code here: https://github.com/sillsdev/serval/blob/fc1bffdfe797abd94f0ffe1df0635e572b58e975/src/Machine/test/Serval.Machine.Shared.Tests/Consumers/TranslationInsertPretranslationsConsumerTests.cs. Is there some equivalent place in the new monolith tests that it should be tested?

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

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.

This code now lives in ServalTranslationPlatformService. We should add a new test fixture for the class that tests the InsertInferenceResultsAsync method.

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

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.

SourceRefs are not being specified for NMT pre-translations

4 participants