Closed ddaspit closed 9 months ago
Attention: 71 lines
in your changes are missing coverage. Please review.
Comparison is base (
79c0832
) 66.04% compared to head (267de3c
) 66.59%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
src/SIL.Machine/Corpora/FileParatextProjectSettingsParser.cs
line 5 at r1 (raw file):
using System.IO; using System.Linq; using System.Text;
Wouldn't you put the usings into their own file?
src/SIL.Machine/Corpora/FileParatextProjectSettingsParser.cs
line 5 at r1 (raw file):
Wouldn't you put the usings into their own file?
Ah, older version of .net.
src/SIL.Machine/Corpora/ParatextProjectSettingsParserBase.cs
line 67 at r1 (raw file):
string prefix = ""; string form = "41MAT";
So, we default to Matthew? Shouldn't we default to crashing? I don't think I fully understand this logic and intention.
src/SIL.Machine/Corpora/ParatextProjectSettingsParserBase.cs
line 69 at r1 (raw file):
string form = "41MAT"; string suffix = ".SFM"; XElement namingElem = settingsDoc.Root.Element("Naming");
Part of the general question of if the data is not meeting expectations. I don't know the history of this code (I am assuming it is copied from somewhere else with minor edits). If that is the case, are there any substantive logic changes?
src/SIL.Machine/Corpora/ParatextProjectSettingsParserBase.cs
line 69 at r1 (raw file):
Part of the general question of if the data is not meeting expectations. I don't know the history of this code (I am assuming it is copied from somewhere else with minor edits). If that is the case, are there any substantive logic changes?
How to handle missing data, exceptions, etc.
src/SIL.Machine/Corpora/ParatextProjectSettingsParserBase.cs
line 86 at r1 (raw file):
string biblicalTerms = settingsDoc.Root.Element("BiblicalTermsListSetting").Value; string[] parts = biblicalTerms.Split(new[] { ':' }, 3);
There are so many ways to fail, including not getting 3 sections. Are we ok with just throwing an exception and failing the process?
src/SIL.Machine/Corpora/ParatextTextCorpus.cs
line 9 at r1 (raw file):
public ParatextTextCorpus(string projectDir, bool includeMarkers = false) { var parser = new FileParatextProjectSettingsParser(projectDir);
For my information, what is the difference between ParatextTextCorpus and ParatextBackupTextCorpus?
src/SIL.Machine/Corpora/UsfmParser.cs
line 47 at r1 (raw file):
} private static readonly Regex OptBreakSplitter = new Regex("(//)", RegexOptions.Compiled);
I'm assuming this is just a naming update. Descriptive names are better than comments?
src/SIL.Machine/Corpora/ParatextBackupTermsCorpus.cs
line 31 at r1 (raw file):
return; var settingsParser = new ZipParatextProjectSettingsParser(archive);
Ah, the backup is using the zipped one...
src/SIL.Machine/Corpora/ParatextTextCorpus.cs
line 9 at r1 (raw file):
For my information, what is the difference between ParatextTextCorpus and ParatextBackupTextCorpus?
Ah - one grabs from a zip file, the other from files on the computer.
src/SIL.Machine/Corpora/UsfmVerseTextUpdater.cs
line 117 at r1 (raw file):
string pubNumber ) {
A really simple explanation of what this is doing would be great. This class is not used in machine - likely only in Serval (which hasn't been pushed yet). It appears to be used to update an existing USFM file with pretranslations - but the logic appears split between a few locations.
There is a bit of a lack of coverage for the TextUpdater, specifically the Sidebar, Milestone, Ref, OptBreak , Unmatched. Also, there is some missing coverage in the other files (as seen above in the report).
src/SIL.Machine/Corpora/ParatextProjectSettingsParserBase.cs
line 69 at r1 (raw file):
Yes, this code was essentially extracted from another class and made to be reusable.
In aerospace, if code has been working for a long time, it's grandfathered in. That's fine - we can address issues if they come up.
I would like more testing for these cases...
I suspected that there could be an issue there :-)
This change is