SF-3759 Add Slope and Intercept input to Serval Admin#3766
SF-3759 Add Slope and Intercept input to Serval Admin#3766pmachapman wants to merge 7 commits intomasterfrom
Conversation
Codecov Report❌ Patch coverage is 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. |
cb5bf2d to
25e3887
Compare
25e3887 to
d9e52ec
Compare
d9e52ec to
6244cbf
Compare
6244cbf to
7dae17c
Compare
src/SIL.XForge.Scripture/ClientApp/src/app/serval-administration/serval-project.component.html
Show resolved
Hide resolved
marksvc
left a comment
There was a problem hiding this comment.
@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
QualityEstimationConfigC# object. By default, extra JSON properties are silently ignored during deserialization —somethingis dropped. The C# object only hasVersion,Slope, andIntercept.
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?
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