-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
epic(developer): refactor package-metadata for 17.0 🎺 #9485
Merged
Conversation
This file contains 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
Removes the following fields: * legacyId * documentationFilename * documentationFileSize * links * related[].note None of these fields are needed any longer; see #9351 for steps to remove data. Eliminates difference between keyboard_info source and distribution, renaming to keyboard_info.schema.json, and updating the required members of the json accordingly. Will have corresponding commits in keyman.com, api.keyman.com, help.keyman.com, and keyboards repositories.
Adds info.description, options.fonts, keyboard.examples metadata to .kps and kmp.json files, updates schemas, and Typescript compiler.
Adds relatedPackages support to: * .kps schema * .kps file format for Typescript * kmp.json file format for Typescript * kmc-package compiler * Package Editor
While a package supports a .ttf or .otf font for the OSK and Display fonts for use within the Keyman apps, on websites it also supports .woff and .woff2. This change makes it possible to specify a set of fonts for a package which will be provided through api.keyman.com to websites. This means that .woff and .woff2 fonts may also be included in the package and may not be used on target devices at this time, it further opens the pathway to deploying .kmp packages to web in the future. The deployment stage of keymanapp/keyboards will require a new phase to copy web fonts from packages to s.keyman.com.
…/extra-package-metadata
…per/package-keyboard-web-fonts
Adds license file to .kps, kmp.json, kmc-package, package editor, and new project templates. The intent is for LICENSE.md to be the file used, and for any keyboards on keymanapp/keyboards, it should always be a standard MIT license.
* Removes font size * Restricts font source to array * Removes example * Add examples * Loosen structure of KeyboardExample
Relates to #9351. Adds support for building a .keyboard_info file without having source .keyboard_info file: * Constructs a default source .keyboard_info in memory * Hints if license is missing * If LICENSE.md is present, verifies it matches the MIT license text * Adds project option to turn on or off metadata generation. This will default to False for version 1.0 projects, and to True for version 2.0 projects. This means that the keyboard repository will need a PR to enable metadata generation for existing projects in the repository, but this is important to avoid breaking builds for existing projects that are not in the repository. * Turns on additional c8 coverage for kmc projects
Also fixes a file reference issue in kmpJson.options, where paths were stripped too early in the process. Removes a now-irrelevant unit test for keyboard_info. TODO: markdown to html during the keyboard_info build.
…to feat/developer/keyboard-info-markdown
Moves responsibility for loading .kps into kmc-keyboard-info, away from the caller, and removes other fields with kmc-keyboard-info can calculate by itself. Have not moved project parsing into kmc-keyboard-info, because that's a bigger job, as currently that is mostly happening within kmc itself. A project for a future version I think.
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
Fixes #9478. This adds a property WelcomeFile to .kps and kmp.json, which allows us to move away from the hardcoded welcome.htm filename in the future, and makes transform from Markdown (#9477) a simpler operation, and just generally starts the cleanup of the messiness of hard-coded filenames. The package compiler will fallback to injecting welcome.htm into this property if (a) welcome.htm is present, and (b) the property does not already have a value. This doesn't buy us much because we still need to support welcome.htm for existing legacy packages, but does mean that our .kmp package metadata will be more consistent for packages compiled with 17.0+ compilers.
Fixes #9708. Matches the kmp.json format of keys string in the .keyboard_info schema and compiler, in order to reduce the number of formats we are working with. This same format may be used elsewhere in Keyman schemas in the future for sets of keys, for example, I hope we can use it in regression tests.
Fixes #9266. For historical reasons there are many non-minimal BCP 47 tags in package metadata in the repository (over 2500). Furthermore, earlier versions of kmcomp did not fail the build on package compilation warnings. This means it is better to reduce WARN_LanguageTagIsNotMinimal to HINT_LanguageTagIsNotMinimal, so that we can otherwise respect the 'treat warnings as errors' flag on the keyboard projects. We may be able to upgrade this to a warning again one day in the future.
I missed adding this as a dependency for @keymanapp/kmc-package. because node has a very lenient dependency search, it found xml2js from other @keymanapp/common-types, so never caused errors locally.
The new --for-publishing flag allows us to enforce additional requirements for keyboards and lexical models that are to be published to the keymanapp repositories. This flag will always be switched on in the repository builds. This flag overrides the 'skipMetadata' option which is a project-level option. There is a bit of a delicate balance of requirements here: 1. We want to be able to automatically verify keyboards and package licenses if they are in the repository. 2. We do not want to force license checks on privately built keyboards and models. 3. We want to provide pathways for users to check locally before submitting to the repository. 4. If possible, we want to be able to build the .keyboard_info and .model_info files locally, but this should be up to the user for local builds. For now, the only additional check that this flag provides is to verify that the license is MIT, which was an unchecked requirement for the repositories in the past. Future checks can be added for file layout, additional required metadata files. Anticipate adding this as a tool to Keyman Developer IDE -- a 'pre-publish' check -- in the future.
Part of #9266. Also cleans up filenames for hint_language_tag_is_not_minimal, and fixes a bug in transformKpsToKmpObject where a null object could be passed on to another function in case of failure.
…ge-metadata chore: merge master into package-metadata 🎺
chore: allowJs for imported schemas 🎺
…ile-property feat(developer): introduce WelcomeFile property to packages 🎺
…ard_info-example-keys-as-string refactor(developer): .keyboard_info examples should use keys as a string 🎺
…l-tags-as-hint fix(developer): non-minimal BCP 47 tags in kps should be a hint 🎺
…s-firstCharLowerCase chore(common): stop using xml2js.processors.firstCharLowerCase 🎺
…2js-dependency chore(developer): Update kmc-package xml2js dependency 🎺
…shing-flag chore(developer): add --for-publishing to kmc 🎺
mcdurdin
requested review from
rc-swag,
ermshiperete,
jahorton and
darcywong00
as code owners
October 11, 2023 00:24
mcdurdin
changed the title
epic(developer): seed epic/package-metadata branch 🎺
epic(developer): refactor package-metadata for 17.0 🎺
Oct 11, 2023
rc-swag
approved these changes
Oct 11, 2023
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.
RSLGTM
…ge-metadata chore: merge master into package-metadata
35 tasks
Changes in this pull request will be available for download in Keyman version 17.0.187-alpha |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
common/resources/
Build infrastructure
common/web/
common/
core/
Keyman Core
developer/compilers/
developer/ide/
developer/
docs
epic
A long lived branch, home for a new feature, usually will have child PRs based on it
epic-package-metadata
oem/fv/windows/
oem/fv/
oem/
web/
windows/config/
windows/
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.
Collecting all the keyboard, lexical-model, and package metadata work into one epic, because it is turning into quite a big job.
The primary TODO list for this epic is at:
This epic covers multiple repositories:
https://github.com/search?q=org%3Akeymanapp+label%3Aepic-package-metadata+is%3Aopen&type=pullrequests
@keymanapp-test-bot skip