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

CLDR-15161 progress: back end for locale completion(3) #1638

Merged
merged 1 commit into from
Dec 13, 2021

Conversation

srl295
Copy link
Member

@srl295 srl295 commented Dec 1, 2021

CLDR-15161 progress: back end for locale completion (third meter)

  • enable third meter in cldrProgress.js
  • back end API for LocaleCompletion
  • test case for LocaleCompletion, including minor changes to enable
    testability of STFactory-related code.
  • This PR completes the ticket.

@srl295 srl295 self-assigned this Dec 1, 2021
@srl295
Copy link
Member Author

srl295 commented Dec 1, 2021

Not quite working yet, but some progress

  • verify that all errors (even comprehensive) are counted
  • check M/P at the specified level
Grabacion.de.pantalla.2021-12-01.a.la.s.9.45.13.a.m.mov

@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • tools/cldr-apps/js/src/esm/cldrProgress.js is different
  • tools/cldr-apps/src/main/java/org/unicode/cldr/util/SandboxLocales.java is different
  • tools/cldr-apps/src/main/java/org/unicode/cldr/web/api/LocaleCompletion.java is different
  • tools/cldr-apps/src/test/java/org/unicode/cldr/web/api/TestLocaleCompletion.java is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

Comment on lines 191 to 206
// ** Step two.
// Make some changes, and we should have a couple of errors.
// "Expected <100%"
// Mutate
localeFile.add("//ldml/characters/exemplarCharacters", "[]");
localeFile.add("//ldml/numbers/symbols[@numberSystem=\"latn\"]/group",
",,,"); // err; expected 1, not 3
// rootFile.add("//ldml/localeDisplayNames/languages/language[@type=\""+TEST_LOCALE+"\"]",
// TEST_LOCALE); // for fallback
localeFile.remove("//ldml/localeDisplayNames/languages/language[@type=\"" + TEST_LOCALE + "\"]");
localeFile.add("//ldml/dates/timeZoneNames/zone[@type=\"Pacific/Kanton\"]/exemplarCity[@draft=\"provisional\"]", "cabaca");
localeFile.add("//ldml/dates/timeZoneNames/zone[@type=\"Asia/Qyzylorda\"]/exemplarCity[@draft=\"unconfirmed\"]", "bacaba");
tc.invalidateAllCached();
final int EXPECT_ERROR = 2;
final int EXPECT_MISSING = 1;
final int EXPECT_PROVISIONAL = 2;
Copy link
Member Author

Choose a reason for hiding this comment

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

The above results in 2 errors, 1 missing, 2 provisional.

The front end doesn't need the M/E/P split out, but it's useful for debugging.

@srl295 srl295 marked this pull request as ready for review December 2, 2021 19:48
@srl295 srl295 changed the title CLDR-15161 wip back end for locale completion CLDR-15161 progress: back end for locale completion(3) Dec 2, 2021
@srl295 srl295 marked this pull request as draft December 2, 2021 20:01
@srl295
Copy link
Member Author

srl295 commented Dec 2, 2021

random failing tests notwithstanding, I am still not getting the right behavior from this. It shows more work to do when nothing shows up in the dashboard.

Leaving this in draft.

@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • .vscode/launch.json is now changed in the branch
  • tools/cldr-apps/src/main/java/org/unicode/cldr/web/api/LocaleCompletion.java is different
  • tools/cldr-apps/src/main/java/org/unicode/cldr/web/api/STError.java is now changed in the branch

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • tools/cldr-apps/src/main/java/org/unicode/cldr/web/api/LocaleCompletion.java is different
  • tools/cldr-apps/src/main/java/org/unicode/cldr/web/STFactory.java is now changed in the branch
  • tools/cldr-apps/src/test/java/org/unicode/cldr/web/api/TestLocaleCompletion.java is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@srl295 srl295 marked this pull request as ready for review December 10, 2021 21:47
@srl295
Copy link
Member Author

srl295 commented Dec 10, 2021

Think this is ready.

Comment on lines 169 to 172
localeFile.add("//ldml/numbers/currencies/currency[@type=\"XTS\"]/displayName[@draft=\"provisional\"]",
"Test Currency (comprehensive level, should not have an effect on completion)");
localeFile.add("//ldml/numbers/currencies/currency[@type=\"XUA\"]/displayName[@draft=\"unconfirmed\"]",
"Other Test Currency (comprehensive level, should not have an effect on completion)");
Copy link
Member Author

Choose a reason for hiding this comment

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

Ignored due to limited submission, but tested to work otherwise.

private static final String TEST_LOCALE = "es";

@Test
void testLocaleCompletion() throws SQLException, IOException {
Copy link
Member

Choose a reason for hiding this comment

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

this function is too long, even for a unit test

@btangmu
Copy link
Member

btangmu commented Dec 13, 2021

@srl295 one concern is that I haven't yet done what Mark proposed last week: make the 2nd meter visible but grayed out when the dash data hasn't been fetched. Without that, the 3rd meter will sometimes be the 2nd visible meter. That might be confusing. I'll work on the grayed-out 2nd meter today. In the meantime, I wonder if we should merge this except keep CAN_GET_LOCALE_PROGRESS = false? Then I'd be able to test locally with all 3 meters. If there's no push to production today or tomorrow, then CAN_GET_LOCALE_PROGRESS = true is fine and will enable testing on smoketest; maybe it's fine anyway; what do you think?

@srl295
Copy link
Member Author

srl295 commented Dec 13, 2021

@srl295 one concern is that I haven't yet done what Mark proposed last week: make the 2nd meter visible but grayed out when the dash data hasn't been fetched. Without that, the 3rd meter will sometimes be the 2nd visible meter. That might be confusing. I'll work on the grayed-out 2nd meter today. In the meantime, I wonder if we should merge this except keep CAN_GET_LOCALE_PROGRESS = false? Then I'd be able to test locally with all 3 meters. If there's no push to production today or tomorrow, then CAN_GET_LOCALE_PROGRESS = true is fine and will enable testing on smoketest; maybe it's fine anyway; what do you think?

I filed CLDR-15239 to get these switches out of source.

Sure, i will change it to false…

- back end API for LocaleCompletion
- test case for LocaleCompletion, including minor changes to enable
  testability of STFactory-related code.
- update launch.json to improve attaching to OpenLiberty
- return 503 error if the SurveyTool is not yet started
- Ignore some paths per Phase and SubmissionLocales
@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • tools/cldr-apps/js/src/esm/cldrProgress.js is different
  • tools/cldr-apps/src/test/java/org/unicode/cldr/web/api/TestLocaleCompletion.java is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@btangmu
Copy link
Member

btangmu commented Dec 13, 2021

uh-oh: "cldrTable.cldrChecksum
should be fast enough:
AssertionError: Duration was 101 ms; 1000 iterations should take less than 100 ms"
I'll restart the test; really that test (my fault) should be disabled or made into a warning

@btangmu
Copy link
Member

btangmu commented Dec 13, 2021

@srl295 let's go ahead and merge this, ok?

@srl295 srl295 merged commit 686de2b into unicode-org:main Dec 13, 2021
@srl295 srl295 deleted the cldr-15161/locale2 branch December 13, 2021 18:33
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