Skip to content

SF-3759 Add Slope and Intercept input to Serval Admin#3766

Open
pmachapman wants to merge 7 commits intomasterfrom
feature/SF-3759
Open

SF-3759 Add Slope and Intercept input to Serval Admin#3766
pmachapman wants to merge 7 commits intomasterfrom
feature/SF-3759

Conversation

@pmachapman
Copy link
Copy Markdown
Collaborator

@pmachapman pmachapman commented Mar 31, 2026

I have marked as do not merge, as the final logic for Quality Estimation needs to be confirmed. This PR is ready for review, however.


This change is Reviewable


Open with Devin

@pmachapman pmachapman added testing not required do not merge See PR description and/or comments for explanation labels Mar 31, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 95.91837% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.35%. Comparing base (b691ada) to head (7dae17c).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
.../SIL.XForge.Scripture/Services/SFProjectService.cs 92.00% 0 Missing and 2 partials ⚠️
.../serval-administration/serval-project.component.ts 97.22% 0 Missing and 1 partial ⚠️
...e.Scripture/Controllers/SFProjectsRpcController.cs 96.87% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3766      +/-   ##
==========================================
+ Coverage   81.27%   81.35%   +0.08%     
==========================================
  Files         622      623       +1     
  Lines       39322    39402      +80     
  Branches     6415     6422       +7     
==========================================
+ Hits        31958    32057      +99     
+ Misses       6366     6344      -22     
- Partials      998     1001       +3     

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

@pmachapman pmachapman marked this pull request as ready for review March 31, 2026 00:53
devin-ai-integration[bot]

This comment was marked as resolved.

@pmachapman pmachapman added will require testing PR should not be merged until testers confirm testing is complete do not merge See PR description and/or comments for explanation and removed testing not required do not merge See PR description and/or comments for explanation labels Mar 31, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 9 additional findings in Devin Review.

Open in Devin Review

@marksvc marksvc self-assigned this Apr 9, 2026
Copy link
Copy Markdown
Collaborator

@marksvc marksvc left a comment

Choose a reason for hiding this comment

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

@marksvc reviewed 15 files and all commit messages, and made 3 comments.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on pmachapman).


src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-project.component.ts line 397 at r4 (raw file):
(Just saying.) It occurs to me that if the user enters

{
  "version": "0.1",
  "slope": 1.1,
  "intercept": 1.1,
  "something": "else"
}

, that the "something": "else" will be passed from the frontend to the server. I expect that he server, being C#, will not include the something field and it won't be a problem.

Devin agrees that it will not be a problem. And mentions

The JSON-RPC framework deserializes the payload into a QualityEstimationConfig C# object. By default, extra JSON properties are silently ignored during deserialization — something is dropped. The C# object only has Version, Slope, and Intercept.


src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-project.component.ts line 379 at r4 (raw file):

      projectId == null ||
      (this.form.value.qualityEstimationConfig ?? '') ===
        (project.translateConfig.draftConfig.qualityEstimationConfig ?? '')

Hmm. Okay. This is a bit of an odd construct with the types. But I see how it works. Helped by the comment above.

You might consider the following as well, if you don't prefer the current lines.

      (project.translateConfig.draftConfig.qualityEstimationConfig == null &&
        !isPopulatedString(this.form.value.qualityEstimationConfig))

Hmm, I see that the updateServalConfig below is written in a similar way.


src/SIL.XForge.Scripture/Models/QualityEstimationConfig.cs line 8 at r4 (raw file):

public class QualityEstimationConfig
{
    public required string Version { get; set; }

I've done some searching but am still a bit confused about the relationship between required and this type being non-nullable. What is the motivation to specify required here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge See PR description and/or comments for explanation will require testing PR should not be merged until testers confirm testing is complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants