-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
feat(developer): kmc generate #11014
Conversation
User Test ResultsTest specification and instructions
Test Artifacts
|
3d22452
to
027ebfa
Compare
Plenty of todo items left but this is a mostly-functional module for the kmc generate command for automatically creating keyboard and model projects.
Cleanup various todo items for kmc generate. Outstanding TODO item is icon generation for .kmn.
Note: these are more e2e than unit tests. It may be difficult to convert them into solid unit tests due to the way that kmc-generate works based on templates.
5ccabea
to
a45abe4
Compare
Test ResultsI tested this issue with the attached "Keyman 18.0.118-alpha-test-11014" build on Windows 10 and 11. I'm sharing my observation here. kmc generate keyman-keyboard kmnkeyboard Verified that the keyboard folder was created with the specified name
|
developer/src/kmc-generate/src/template/kmn-keyboard/source/keyboard.kvks
Show resolved
Hide resolved
developer/src/kmc-generate/src/template/kmn-keyboard/source/keyboard.keyman-touch-layout
Show resolved
Hide resolved
developer/src/kmc-generate/src/template/kmn-keyboard/source/keyboard.kmn
Show resolved
Hide resolved
developer/src/kmc-generate/src/template/wordlist-lexical-model/source/wordlist.tsv
Show resolved
Hide resolved
|
||
<keys> | ||
<import base="cldr" path="45/keys-Zyyy-punctuation.xml"/> | ||
<import base="cldr" path="45/keys-Zyyy-currency.xml"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the standard import for all LDML keyboards? (vs generator referencing files in a 45/
path)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question @srl295
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pinging @srl295 on this query
Is this the standard import for all LDML keyboards? (vs generator referencing files in a 45/ path)
<keys> <import base="cldr" path="45/keys-Zyyy-punctuation.xml"/> <import base="cldr" path="45/keys-Zyyy-currency.xml"/>
developer/src/kmc-generate/test/fixtures/lexical-model/sample.en.sample/README.md
Show resolved
Hide resolved
developer/src/kmc-generate/test/fixtures/lexical-model/sample.en.sample/source/readme.htm
Show resolved
Hide resolved
whew - I've made 1 pass through all the files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Changes in this pull request will be available for download in Keyman version 18.0.138-alpha |
Fixes: #10712
Fixes: #10509
kmc-generate is a tool that will replace most aspects of kmconvert (Windows-only). The remaining functionality in kmconvert is importing keyboards from Windows DLLs, which currently requires a running Windows environment (anticipate replacement of this last piece of functionality with something in
epic/kmc-convert
(#12191))..kmc-generate follows the same patterns as other kmc modules. All functions are accessible from the kmc command-line tool, and also scriptable with the standalone npm module.
Usage:
Options vary from generator-to-generator. At this point, the generation tooling is largely template-based, which does limit a little what this tool can do. Renaming keyboards and other functionality will emerge in a future
kmc
module.Note: TODO list moved to #12641.
User Testing
The purpose of the test here is to verify that the generate command creates a template project for a keyboard or lexical model with appropriate basic metadata.
For each command, run
kmc generate <command> --help
, to list options for generating the project. Include as many of the options as possible in your next command to generate a template project with them, and give it a sensible name e.g.generated_project
.TEST_KEYMAN_KEYBOARD: For the
keyman-keyboard
command, follow the instructions above to generate a basic Keyman keyboard. Then usekmc build generated_project
to verify that the keyboard builds. Install the resulting .kmp and verify that it installs without error. View the source of the files, and verify that the contents of the generated files look correct and match the parameters you provided.TEST_LDML_KEYBOARD: For the
ldml-keyboard
command, follow the instructions above to generate a basic LDML .xml keyboard (e.g. using idgenerated_ldml_keyboard
). Then usekmc build generated_ldml_keyboard
to verify that the keyboard builds. Install the resulting .kmp and verify that it installs without error. View the source of the files, and verify that the contents of the generated files look correct and match the parameters you provided.TEST_LEXICAL_MODEL: For the
lexical-model
command, follow the instructions above to generate a basic lexical model (e.g. using idgenerated.en.model
). Then usekmc build generated.en.model
to verify that the lexical model builds. Install the resulting .kmp on an Android phone and verify that it installs without error. View the source of the files, and verify that the contents of the generated files look correct and match the parameters you provided.