Skip to content

Conversation

@Enkidu93
Copy link
Collaborator

@Enkidu93 Enkidu93 commented Oct 13, 2025

Fixes #318

Partially addresses sillsdev/serval#768


This change is Reviewable

@Enkidu93 Enkidu93 requested a review from ddaspit October 13, 2025 14:54
@Enkidu93
Copy link
Collaborator Author

Still need to add tests.

@Enkidu93 Enkidu93 force-pushed the validate_usfm_versification branch from 7ff60f6 to b8a9089 Compare October 15, 2025 13:14
@codecov-commenter
Copy link

codecov-commenter commented Oct 15, 2025

Codecov Report

❌ Patch coverage is 89.07563% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.57%. Comparing base (53b745a) to head (3ff1c87).

Files with missing lines Patch % Lines
...chine/Corpora/UsfmVersificationMismatchDetector.cs 92.15% 8 Missing and 4 partials ⚠️
...ra/ParatextProjectVersificationMismatchDetector.cs 74.19% 8 Missing ⚠️
...L.Machine/Corpora/ZipParatextProjectFileHandler.cs 88.23% 1 Missing and 1 partial ⚠️
...ileParatextProjectVersificationMismatchDetector.cs 0.00% 1 Missing ⚠️
...L.Machine/Corpora/ZipParatextProjectTextUpdater.cs 0.00% 1 Missing ⚠️
...ZipParatextProjectVersificationMismatchDetector.cs 0.00% 1 Missing ⚠️
...lysis/ZipParatextProjectQuoteConventionDetector.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #353      +/-   ##
==========================================
+ Coverage   72.38%   72.57%   +0.19%     
==========================================
  Files         417      423       +6     
  Lines       35632    35798     +166     
  Branches     4929     4949      +20     
==========================================
+ Hits        25793    25982     +189     
+ Misses       8744     8718      -26     
- Partials     1095     1098       +3     

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

@Enkidu93
Copy link
Collaborator Author

Tests have been added. I'm really excited to get this in 🎉.

Copy link
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.

@ddaspit reviewed 16 of 22 files at r1, 2 of 3 files at r2, 7 of 10 files at r3, 3 of 4 files at r4, 1 of 1 files at r5, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @Enkidu93)


src/SIL.Machine/Corpora/UsfmVersificationMismatchDetector.cs line 108 at r4 (raw file):

                if (
                    Type == UsfmVersificationMismatchType.MissingVerseSegment
                    && VerseRef.TryParse(

Why are you using TryParse here and not the constructor?


src/SIL.Machine/Corpora/IParatextProjectFileHandler.cs line 5 at r1 (raw file):

namespace SIL.Machine.Corpora
{
    public interface IParatextProjectFileHandler

Shouldn't we also use this interface in ParatextProjectSettingsParserBase?


src/SIL.Machine/Corpora/ParatextProjectVersificationMismatchDetector.cs line 8 at r1 (raw file):

namespace SIL.Machine.Corpora
{
    public abstract class ParatextProjectVersificationMismatchDetector

By convention, ABCs are suffixed with Base.


src/SIL.Machine/Corpora/ParatextProjectTermsParserBase.cs line 299 at r1 (raw file):

        }

        private Stream Open(string fileName) => _paratextProjectFileHandler.Open(fileName);

This indirection is unnecessary. I would just call _paratextProjectFileHandler directly.

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.

Refactor Zip/File/Memory Paratext project classes to use a file handling interface

3 participants