-
-
Notifications
You must be signed in to change notification settings - Fork 6
Seed canonical morph types and regenerate search index #2219
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
Merged
myieye
merged 28 commits into
feat/sync-morph-types
from
claude/fix-morph-type-syncing-bQo8X
Apr 9, 2026
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
d33d746
Seed canonical morph-types into CRDT projects
claude 79b95da
Make SecondaryOrder explicit on all morph types, add reverse coverage…
claude f296a6c
Stop creating morph-types in tests. They're now prepopulated
myieye a23730e
Remove references to delete MorphTypeKind.Other
myieye c24dd8f
Stop printing verify diff content. It's too much.
myieye 016adb6
Fix test
myieye 0e09fb9
Seed morph types before API testing
rmunn 6f5d258
ResumableTests should expect real morph types now
rmunn 71371e6
Fix bad LLM-generated test
rmunn d082d90
Fix another wrong pre-cleanup filename
rmunn c87dbfb
Add descriptions to canonical morph types
rmunn c17dda6
Don't depend on entry order in snapshots
rmunn b2baf47
Sort entries identically in FW and CRDT APIs
rmunn 7f13150
Mention correct SecondaryOrder in test comments
rmunn 925efa8
Address my own review comments
rmunn 46e2374
Improve MorphTypeSeedingTests a bit
rmunn bcbe1bc
Remove RegressionVersion value we don't need yet
rmunn d04084f
Format
myieye a931a7d
Update comment
myieye fa2d764
Update morph-type descriptions
myieye 32e39f8
Sync morph-types when importing, because they already exist in CRDT
myieye 9e753c2
Simplify test
myieye b37f16f
Verify our canonical morph-types match new fwdata projects
myieye bb92b7c
Fix verified files
myieye 228c153
Remove uninteresting tests
myieye 1b319ec
Minor refactor
myieye 73ae741
Make NewLangProj.fwdata available to test.
myieye 8a43b19
Fix non-FTS relevance order with morph-tokens in query
myieye File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
backend/FwLite/FwDataMiniLcmBridge.Tests/CanonicalMorphTypeTests.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| using FwDataMiniLcmBridge.Api; | ||
| using FwDataMiniLcmBridge.LcmUtils; | ||
| using FwDataMiniLcmBridge.Tests.Fixtures; | ||
| using Microsoft.Extensions.DependencyInjection; | ||
| using Microsoft.Extensions.Options; | ||
| using MiniLcm.Models; | ||
|
|
||
| namespace FwDataMiniLcmBridge.Tests; | ||
|
|
||
| public class CanonicalMorphTypeTests : IDisposable | ||
| { | ||
| private readonly ServiceProvider _serviceProvider; | ||
| private readonly FwDataMiniLcmApi _api; | ||
| private readonly FwDataProject _project; | ||
|
|
||
| public CanonicalMorphTypeTests() | ||
| { | ||
| var services = new ServiceCollection() | ||
| .AddTestFwDataBridge(mockProjectLoader: false) | ||
| .PostConfigure<FwDataBridgeConfig>(config => | ||
| config.TemplatesFolder = Path.GetFullPath("Templates")) | ||
| .BuildServiceProvider(); | ||
| _serviceProvider = services; | ||
|
|
||
| var config = services.GetRequiredService<IOptions<FwDataBridgeConfig>>(); | ||
| Directory.CreateDirectory(config.Value.ProjectsFolder); | ||
| var projectName = $"canonical-morph-types-test_{Guid.NewGuid()}"; | ||
| _project = new FwDataProject(projectName, config.Value.ProjectsFolder); | ||
| var projectLoader = services.GetRequiredService<IProjectLoader>(); | ||
| projectLoader.NewProject(_project, "en", "en"); | ||
|
|
||
| var fwDataFactory = services.GetRequiredService<FwDataFactory>(); | ||
| _api = fwDataFactory.GetFwDataMiniLcmApi(_project, false); | ||
| } | ||
|
|
||
| public void Dispose() | ||
| { | ||
| _api.Dispose(); | ||
| _serviceProvider.Dispose(); | ||
| if (Directory.Exists(_project.ProjectFolder)) | ||
| Directory.Delete(_project.ProjectFolder, true); | ||
| } | ||
|
|
||
| [Fact] | ||
| public async Task CanonicalMorphTypes_MatchNewLangProjMorphTypes() | ||
| { | ||
| var libLcmMorphTypes = await _api.GetMorphTypes().ToArrayAsync(); | ||
| libLcmMorphTypes.Should().NotBeEmpty(); | ||
| CanonicalMorphTypes.All.Values.Should().BeEquivalentTo(libLcmMorphTypes); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.