-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix usfm parsing bugs #447
Conversation
Parallel PR: sillsdev/machine#229 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 6 of 6 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Enkidu93 and @johnml1135)
src/Serval/src/Serval.Shared/Services/IScriptureDataFileService.cs
line 6 at r1 (raw file):
{ ParatextProjectSettings GetParatextProjectSettings(string filename); public ZipParatextProjectTextUpdater GetZipParatextProjectTextUpdater(string filename);
The public
keyword shouldn't be needed in an interface.
src/Serval/src/Serval.Translation/Services/PretranslationService.cs
line 122 at r1 (raw file):
} // In order to support PretranslationUsfmTemplate.Auto if (usfm != "")
I think we need to check if the usfm is null
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 4 of 6 files reviewed, 2 unresolved discussions (waiting on @ddaspit and @johnml1135)
src/Serval/src/Serval.Shared/Services/IScriptureDataFileService.cs
line 6 at r1 (raw file):
Previously, ddaspit (Damien Daspit) wrote…
The
public
keyword shouldn't be needed in an interface.
Done.
src/Serval/src/Serval.Translation/Services/PretranslationService.cs
line 122 at r1 (raw file):
Previously, ddaspit (Damien Daspit) wrote…
I think we need to check if the usfm is
null
.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @johnml1135)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, @ddaspit , few more changes: I realized that I was disposing of the ZipContainer
prematurely. Also, if a book is totally empty, you do end up with usfm = ""
at that check, so a test fails if we just have if(usfm!=null)...
- switched to IsNullOrEmpty
.
Reviewable status: 1 of 6 files reviewed, all discussions resolved (waiting on @ddaspit and @johnml1135)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Enkidu93 and @johnml1135)
src/Serval/src/Serval.Shared/Services/ZipParatextProjectTextUpdater.cs
line 3 at r3 (raw file):
namespace Serval.Shared.Services; public class ZipParatextProjectTextUpdater : ParatextProjectTextUpdaterBase, IDisposable
You should follow the dispose pattern when implementing IDisposable
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 5 of 6 files reviewed, 1 unresolved discussion (waiting on @ddaspit and @johnml1135)
src/Serval/src/Serval.Shared/Services/ZipParatextProjectTextUpdater.cs
line 3 at r3 (raw file):
Previously, ddaspit (Damien Daspit) wrote…
You should follow the dispose pattern when implementing
IDisposable
.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @johnml1135)
6f3d89b
to
32bd91e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #447 +/- ##
==========================================
+ Coverage 61.84% 61.87% +0.03%
==========================================
Files 234 235 +1
Lines 11866 11880 +14
Branches 1514 1519 +5
==========================================
+ Hits 7338 7351 +13
+ Misses 4003 4002 -1
- Partials 525 527 +2 ☔ View full report in Codecov by Sentry. |
Update Serval to use
ParatextProjectTextUpdater
This change is