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

Extract language tags from FLEx projects and store in DB metadata #952

Merged
merged 26 commits into from
Jul 23, 2024

Conversation

rmunn
Copy link
Contributor

@rmunn rmunn commented Jul 11, 2024

Fixes #922.

This PR extracts language tags from FLEx projects, but does nothing yet to validate or process them. That might come in a separate PR; this one just stores the language tag data into a JSON column and leaves the analysis for later.

Doesn't store anything in the DB yet.
Copy link

github-actions bot commented Jul 11, 2024

C# Unit Tests

53 tests  +1   53 ✅ +1   5s ⏱️ ±0s
10 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 388e474. ± Comparison against base commit ca160ca.

♻️ This comment has been updated with latest results.

rmunn and others added 9 commits July 12, 2024 08:37
We skip pronunciation since it's a subset of vernacular and we don't
need it. We load all vern/analysis, and current vern/analysis.
This can go in another PR
Migration will be in the next commit.
VernacularAndAnalysisLangTags now returns two lists of FLExWsId objects
with the IsActive properties set, rather than four arrays of strings.
@rmunn rmunn marked this pull request as ready for review July 12, 2024 09:14
@rmunn rmunn requested a review from hahn-kev July 12, 2024 09:14
@rmunn
Copy link
Contributor Author

rmunn commented Jul 12, 2024

Actually, now that I take another look at #922 this doesn't yet do everything the issue asks for. For example, there's no GraphQL filtering available yet. Marking as draft and removing review request for now.

@rmunn rmunn marked this pull request as draft July 12, 2024 09:53
Copy link

github-actions bot commented Jul 15, 2024

UI unit Tests

11 tests   11 ✅  0s ⏱️
 3 suites   0 💤
 1 files     0 ❌

Results for commit 388e474.

♻️ This comment has been updated with latest results.

rmunn added 10 commits July 15, 2024 12:41
While we're adding hg runner commands, we can easily add one to extract
the GUID from the LangProject element, which may allow identifying
projects which started out as copies of each other even though their
Mercurial repo histories have no common commits.
Also include a DB migration and GQL schema update
Since we're using `\K`, a rarely-used feature, we should explain it.
The XML element is named VernWss, not VernVss.
The order in which FLEx returns writing systems is current first, then
all non-current (if any) at the end. We want what we store in the
project metadata to match that ordering.
Copy link
Contributor Author

@rmunn rmunn left a comment

Choose a reason for hiding this comment

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

Self-review finished. Marked a few places I'd like specific feedback on: e.g,, should I spend the time to do the proposed refactor, or is it readable enough already and I should move on to something else?

@rmunn rmunn marked this pull request as ready for review July 15, 2024 09:34
@rmunn rmunn self-assigned this Jul 15, 2024
@rmunn rmunn linked an issue Jul 15, 2024 that may be closed by this pull request
Copy link
Collaborator

@hahn-kev hahn-kev left a comment

Choose a reason for hiding this comment

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

just some minor requests, including removing an empty migration

Copy link
Collaborator

@hahn-kev hahn-kev left a comment

Choose a reason for hiding this comment

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

looks good to me

Eventually these tests should clean up after themselves, or use
randomly-assigned project codes so that they don't conflict. But for now
this is good enough for a quick fix.
@rmunn rmunn merged commit 3b5c99a into develop Jul 23, 2024
16 checks passed
@rmunn rmunn deleted the feat/extract-langtags-from-flex-projects branch July 23, 2024 02:06
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.

Pull fw project Id from xml Pull vernacular and analysis language from flex project data
2 participants