Skip to content
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

LT-21760: Prevent Find and Fix from dropping homograph numbers #299

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

JakeOliver28
Copy link
Contributor

@JakeOliver28 JakeOliver28 commented Jun 13, 2024

This change is Reviewable

@jasonleenaylor
Copy link
Contributor

tests/SIL.LCModel.FixData.Tests/FwDataFixerTests.cs line 869 at r1 (raw file):

		/// </summary>
		[Test]
		public void HomographNumberDrops()

I would name the test HomographFixerIgnoresAlternativeCitationForms

@jasonleenaylor
Copy link
Contributor

src/SIL.LCModel.FixData/HomographFixer.cs line 149 at r1 (raw file):

				// if there was a citation form which matches the form of this MoStemAllomorph the MorphType
				// is not important to the homograph determination.
				if (m_Homographs.ContainsKey(rtFormText) || m_MorphTypeSort.Any())

Was this change still necessary?

Copy link
Contributor Author

@JakeOliver28 JakeOliver28 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 4 files reviewed, all discussions resolved (waiting on @jasonleenaylor)


src/SIL.LCModel.FixData/HomographFixer.cs line 149 at r1 (raw file):

Previously, jasonleenaylor (Jason Naylor) wrote…

Was this change still necessary?

I'm honestly not sure how necessary the change is, but it does safe guard against a potential KeyNotFoundException. Do you think this is significant enough to leave in or should I remove it? Or should I do some more digging to check if I can find a case where the error occurs?

@jasonleenaylor
Copy link
Contributor

src/SIL.LCModel.FixData/HomographFixer.cs line 149 at r1 (raw file):

Previously, JakeOliver28 (Jake Oliver) wrote…

I'm honestly not sure how necessary the change is, but it does safe guard against a potential KeyNotFoundException. Do you think this is significant enough to leave in or should I remove it? Or should I do some more digging to check if I can find a case where the error occurs?

I suppose there could be real data where this could cause a crash, so I think it is fine to leave it.

Copy link
Contributor Author

@JakeOliver28 JakeOliver28 left a comment

Choose a reason for hiding this comment

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

Test case renamed

Reviewable status: 0 of 4 files reviewed, all discussions resolved (waiting on @jasonleenaylor)

@JakeOliver28 JakeOliver28 merged commit f8c0ecd into master Jun 13, 2024
2 of 3 checks passed
@JakeOliver28 JakeOliver28 deleted the LT-21760 branch June 13, 2024 21:41
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.

2 participants