Skip to content

Conversation

@RaymondLuong3
Copy link
Collaborator

@RaymondLuong3 RaymondLuong3 commented Jan 19, 2026

Excel files were being accepted even though there were missing translations on rows especially if the missing translation was in the first column. This PR explicitly checks the first two columns of the spreadsheet to ensure that the data is present on every row, skipping empty rows.


This change is Reviewable

@RaymondLuong3 RaymondLuong3 added the will require testing PR should not be merged until testers confirm testing is complete label Jan 19, 2026
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 2 files reviewed, 1 unresolved discussion.


src/SIL.XForge.Scripture/Services/TrainingDataService.cs line 69 at r1 (raw file):

                continue;
            }
            if (row.LastCellNum - row.FirstCellNum < NumTrainingDataColumns)

It seemed like this would not accurately detect that a column was empty. The spreadsheets on the issue show empty cells but this does not appear to consistently detect the empty cells (there might be a logical reason but I did not discover it). So instead of relying on this way of detecting empty cells I have chosen to check the value of each cell instead.

Code quote:

if (row.LastCellNum - row.FirstCellNum < NumTrainingDataColumns)

@codecov
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

❌ Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.52%. Comparing base (34b607b) to head (883ac78).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...L.XForge.Scripture/Services/TrainingDataService.cs 77.77% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3639   +/-   ##
=======================================
  Coverage   83.52%   83.52%           
=======================================
  Files         610      610           
  Lines       37509    37512    +3     
  Branches     6171     6172    +1     
=======================================
+ Hits        31329    31332    +3     
- Misses       5226     5239   +13     
+ Partials      954      941   -13     

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

@pmachapman pmachapman self-assigned this Jan 19, 2026
@pmachapman pmachapman self-requested a review January 19, 2026 18:16
Copy link
Collaborator

@pmachapman pmachapman left a comment

Choose a reason for hiding this comment

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

:lgtm:

@pmachapman reviewed 2 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @RaymondLuong3).

@pmachapman pmachapman added ready to test and removed will require testing PR should not be merged until testers confirm testing is complete labels Jan 19, 2026
@Nateowami Nateowami added testing complete Testing of PR is complete and should no longer hold up merging of the PR and removed ready to test labels Jan 21, 2026
@Nateowami Nateowami force-pushed the fix/sf-3692-excel-file branch from 3b6c5f6 to 6a930cb Compare January 21, 2026 16:22
@Nateowami Nateowami force-pushed the fix/sf-3692-excel-file branch from 6a930cb to 883ac78 Compare January 21, 2026 16:54
@Nateowami Nateowami enabled auto-merge (squash) January 21, 2026 16:54
@Nateowami Nateowami merged commit b23df58 into master Jan 21, 2026
21 checks passed
@Nateowami Nateowami deleted the fix/sf-3692-excel-file branch January 21, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing complete Testing of PR is complete and should no longer hold up merging of the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants