Skip to content

Conversation

@RaymondLuong3
Copy link
Collaborator

@RaymondLuong3 RaymondLuong3 commented Jan 6, 2026

This PR will detect if a training data file contains rows that are invalid. Rows must have two columns of data. When a row contains fewer than 2 columns of data, the file will be rejected and the user is notified to check their data. If a row is blank, it will be skipped over.
Spreadsheet Warning


This change is Reviewable

@RaymondLuong3 RaymondLuong3 added the will require testing PR should not be merged until testers confirm testing is complete label Jan 6, 2026
@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

❌ Patch coverage is 88.88889% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.82%. Comparing base (dd2b2cb) to head (9106789).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...L.XForge.Scripture/Services/TrainingDataService.cs 88.88% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3625   +/-   ##
=======================================
  Coverage   82.82%   82.82%           
=======================================
  Files         610      610           
  Lines       37414    37429   +15     
  Branches     6152     6155    +3     
=======================================
+ Hits        30987    31000   +13     
+ Misses       5494     5482   -12     
- Partials      933      947   +14     

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

Copy link
Collaborator Author

@RaymondLuong3 RaymondLuong3 left a comment

Choose a reason for hiding this comment

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

@RaymondLuong3 made 1 comment.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion.


test/SIL.XForge.Scripture.Tests/Services/TrainingDataServiceTests.cs line 603 at r1 (raw file):

        text = text.TrimEnd(); // Remove trailing new lines
        text = text.Replace("\r\n", " "); // Handle newlines in both linux and windows environments
        text = text.Replace("\n", " ");

When I used Environment.NewLine it was working locally and detecting the NewLine convention, but when this was run on GHA the excel file NewLine came back with the windows convention. I chose to just do a replace so it will be more robust.

Code quote:

        text = text.Replace("\r\n", " "); // Handle newlines in both linux and windows environments
        text = text.Replace("\n", " ");

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

Labels

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