Skip to content

LT-22889 Add debugging possibiities to PcPatrFLEx - #1225

Open
AndyBlack wants to merge 3 commits into
mainfrom
PcPatrFLExMods
Open

AndyBlack wants to merge 3 commits into
mainfrom
PcPatrFLExMods

Conversation

@AndyBlack

@AndyBlack AndyBlack commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

This adds three options to the advanced menu of the Use PcPatr with FLEx utility. The first option is what we have been using. The two new ones are for debugging a PC-PATR grammar. They change the content of the PcPatrFLEx.tak file.
It adds four new items to the PCPATR custom list.
The change also includes enhancements to the user documentation.


This change is Reviewable

Change-Id: Ib4fe0cf04496ffdb44f4c2a6d11f36a8694ac409
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

NUnit Tests

    1 files  ± 0      1 suites  ±0   14m 45s ⏱️ -1s
7 003 tests +45  6 918 ✅ +45  85 💤 ±0  0 ❌ ±0 
7 012 runs  +45  6 927 ✅ +45  85 💤 ±0  0 ❌ ±0 

Results for commit fd6340a. ± Comparison against base commit 2d21d16.

This pull request removes 1 and adds 46 tests. Note that renamed tests count towards both.
LexTextControlsTests.EntryGoDialogLauncherTests ‑ BuildVernacularSearchFieldSpec_CarriesTheDefaultVernacularTypography
FwAvaloniaDialogsTests.EntryGoDialogTests ‑ ResultRow_HeadwordTypography_OverridesTheColumnTypography
FwAvaloniaDialogsTests.EntryGoDialogTests ‑ WritingSystemSelector_Change_RaisesSearchTypographyChange
FwAvaloniaDialogsTests.EntryGoDialogTests ‑ WritingSystemSelector_Change_ReportsIdAndReRunsSearch
FwAvaloniaDialogsTests.EntryGoDialogTests ‑ WritingSystemSelector_Cleared_KeepsSearchingInTheLastWritingSystem
FwAvaloniaDialogsTests.EntryGoDialogTests ‑ WritingSystemSelector_NoOptions_IsHidden
FwAvaloniaDialogsTests.EntryGoDialogTests ‑ WritingSystemSelector_OptionsAndInitialSelection_ComeFromTheSpec
FwAvaloniaDialogsTests.EntryGoDialogTests ‑ WritingSystemSelector_UnknownInitialId_SelectsFirstAndReportsIt
FwAvaloniaDialogsTests.EntryGoDialogTests ‑ WritingSystemSelector_View_ArrowOnTheClosedPicker_SwitchesTheSearch
FwAvaloniaDialogsTests.EntryGoDialogTests ‑ WritingSystemSelector_View_DismissingAHighlight_KeepsTheActiveWritingSystem
FwAvaloniaDialogsTests.EntryGoDialogTests ‑ WritingSystemSelector_View_HiddenWithoutOptions
…

♻️ This comment has been updated with latest results.

@codecov-commenter

codecov-commenter commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 40.43%. Comparing base (c734bff) to head (fd6340a).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
...s/pcpatrflex/DisambiguateInFLExDB/PCPatrInvoker.cs 94.44% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1225      +/-   ##
==========================================
+ Coverage   39.93%   40.43%   +0.50%     
==========================================
  Files        1542     1552      +10     
  Lines      355165   355849     +684     
  Branches    41317    41531     +214     
==========================================
+ Hits       141833   143897    +2064     
+ Misses     183999   182641    -1358     
+ Partials    29333    29311      -22     
Files with missing lines Coverage Δ
Src/Utilities/pcpatrflex/PrepFLExDBDll/Preparer.cs 98.13% <100.00%> (+0.02%) ⬆️
...s/pcpatrflex/DisambiguateInFLExDB/PCPatrInvoker.cs 94.11% <94.44%> (-0.06%) ⬇️

... and 99 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Change-Id: If4150ba3a95346b9cc4747bd811793d6587b0816
regkey.SetValue(m_strMaxAmbiguities, MaxAmbiguities);
regkey.SetValue(m_strTimeLimit, TimeLimit);
regkey.SetValue(m_strRunIndividually, RunIndividually);
regkey.SetValue(m_strShowFailures, ShowFailures);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Show Failures setting carries over between sessions

The Show Failures choice is saved to the registry and restored the next time PcPatrFLEx opens. Nothing in the main window shows that a debug mode is still on. The same setting also applies when Disambiguate is clicked, which runs the whole text and writes the results back into the FLEx project.

Example: a user switches to "Only use phrase structure rules" to find out why one segment won't parse, then closes the tool. A week later they disambiguate a text. PC-PATR ignores every feature constraint, and the resulting analyses are written into the text. With "Use phrase structure rules and all constraints" on a full grammar, the run can take a very long time, as the documentation warns.

Possible fixes:

  • Don't save the setting, so every launch starts at Off. Since these are debugging modes, this is the safer default.
  • Keep saving it, but ask the user to confirm before Disambiguate runs while a debug mode is on.

If there's a reason to keep the setting across sessions, either fix still prevents a whole text from being disambiguated in a debug mode by accident.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good points! I'll work on a soluton.
We also need to add some more documentation we're working on.

Change-Id: I5261538de08b6ac14b216b848a9d77b4ea770761
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.

3 participants