-
-
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
Prestranslation versification mismatch #471
Conversation
As per our chat in the stand up, I've made the changes we discussed to the code locally and am testing it now manually. |
@ddaspit, is this what you had in mind? Just to verify (unless I've made a mistake), this would leave that 65th verse blank for both template as source and as target (judging from manual testing). Is that what you expected? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #471 +/- ##
=======================================
Coverage 56.59% 56.59%
=======================================
Files 275 275
Lines 14174 14174
Branches 1908 1908
=======================================
Hits 8022 8022
Misses 5563 5563
Partials 589 589 ☔ View full report in Codecov by Sentry. |
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.
This looks correct, but it seems to work on my test. Check out my test and see if we are testing the same thing.
Reviewable status: 0 of 2 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.
Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Enkidu93)
One difference seems to be that in Serval, the ProjectTextUpdater is using the target project. If you use the target and the corresponding parameters to UpdateUsfm, it still fails. I still haven't figured out what the difference is when it's set to source. |
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.
From my testing, it works with PretranslationUsfmTemplate.Source
, but not with PretranslationUsfmTemplate.Target
, because of the error in the versification. If you are seeing the same thing, then it is working as expected.
Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Enkidu93)
OK, that's good to know. I reran an E2E manual test just to confirm, and no, it is not working for |
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.
This might be a silly question, but are you re-running the build for this E2E test or are you just retrieving the pretranslations from an already completed build? The bug fix impacts preprocessing, so you will need to run a full build, so that the pretranslations have the correct verse ref.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Enkidu93)
No, no silly questions at this point haha. But yes, I am rerunning the whole E2E. It's definitely something on the preprocess side. I keep getting side-tracked from debugging though. |
OK! I've figured it out - kind of. I've edited your test, Damien, and it now fails. When using text ids, it works, but when using chapters, it does not. That's why I couldn't figure it out for the life of me! What's happening is that ref |
65c60b3
to
22c88d4
Compare
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 all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Enkidu93)
Partial fix for #442
This solution has been verified by a manual test. However, I'm not convinced that this is the best course of action: My first go at a fix was to parse the pretranslation refs as source refs (which is what they should be, right, given that the
Refs
property yields the source refs as long as there are source refs which should be the case for any verse that's being pretranslated?) and then change the versification to the target when using the target as a template, but that did not work (it just flipped the issue - i.e., fail when template is set to target, works when set to source). I believe that this is becauseScriptureRef.Parse()
is happy to construct a verse that doesn't actually exist within the project's versification. That is to say, it doesn't care that the project versification is incorrect. However, theChangeVersification
method does care. The solution I'm giving here does solve this issue, but I'm concerned that it will ultimately cause issues elsewhere (even though tests are passing) since if you set template to target, you'll be potentially parsing source versifications as target versifications.It seems to me that the best solution would be to parse the pretranslation refs as source refs and convert to target versification when using target as a template and let this be an outstanding issue since this is really the fault of the project. Let me know what you all think. I can't think of a good way to implement our own versification conversion that would account for this issue since we're in a situation in which the project versification is incorrect.
This change is