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

feat(developer): kmc-copy #12555

Merged
merged 9 commits into from
Nov 8, 2024
Merged

feat(developer): kmc-copy #12555

merged 9 commits into from
Nov 8, 2024

Conversation

mcdurdin
Copy link
Member

@mcdurdin mcdurdin commented Oct 17, 2024

Fixes: #2264.

Basic functionality for cloning and renaming a keyboard project with the kmc copy command. Many TODO-COPY items are resolved in #12586. Others to come.

Note: TODO list moved to #12641.

User Testing

  • Install Keyman Developer

  • Open a command prompt

  • TEST_COPY_KEYBOARDS: Try to copy an existing keyboard project with the kmc copy command: kmc copy <source-project.kpj> -o <destination-folder>, e.g. kmc copy keyboards/release/k/khmer_angkor -o c:\temp\my_first_cambodian_keyboard. Do this with a few different keyboards. Verify that the copy and rename worked by building the new keyboards and verify that they build. Verify that the filenames are as expected in the new keyboards.

  • TEST_COPY_MODELS: Try to copy an existing lexical model project with the kmc copy command: kmc copy <source-project.kpj> -o <destination-folder>, e.g. kmc copy lexical-models/release/sil/sil.km.cnd -o c:\temp\mydict.km.cambodian. Do this with a few different lexical models. Verify that the copy and rename worked by building the new models and verify that they build. Verify that the filenames are as expected in the new models.

@keymanapp-test-bot keymanapp-test-bot bot added the user-test-missing User tests have not yet been defined for the PR label Oct 17, 2024
@keymanapp-test-bot keymanapp-test-bot bot added this to the A18S13 milestone Oct 17, 2024
@mcdurdin mcdurdin force-pushed the feat/developer/kmc-copy branch from 2cf5db1 to e99d950 Compare October 21, 2024 06:02
@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed and removed user-test-missing User tests have not yet been defined for the PR labels Oct 22, 2024
@mcdurdin mcdurdin force-pushed the feat/developer/kmc-copy branch from 7d10290 to 6df121a Compare October 22, 2024 03:28
@darcywong00 darcywong00 modified the milestones: A18S13, A18S14 Oct 26, 2024
@mcdurdin mcdurdin marked this pull request as ready for review October 28, 2024 04:59
@dinakaranr
Copy link

Test Results

I tested this issue with the attached "18.0.127-alpha-test-12555" build on the Windows 10 and 11 OS. Here is my observation.

  • TEST_COPY_KEYBOARDS (Passed):
  1. I installed the keymandeveloper-18.0.127.exe build in the Windows 10.
  2. Navigate to the folder path that has GitHub's keyboard.
  3. Open the command prompt.
  4. Enter the below command in the window's prompt
  5. kmc copy C:Users\Bharani\Documents\GitHub\keyboards\release\gautami\gautami_thamizh_tamil\gautami_thamizh_tamil.kpj -o C:\Users\Bharani\AppData\Local\Temp\KMCTesting1

  6. kmc copy C:\Users\Bharani\Documents\GitHub\keyboards\release\gautami\gautami_thamizh_tamil -o C:\Users\Bharani\Downloads\KMCTesting3

  7. Verified that the keyboard folder or *.kpj file was copied into a new folder.
  8. Verified that the keyboard file was renamed in the new folder.
  • TEST_COPY_MODELS (Passed):
  1. I installed the keymandeveloper-18.0.127.exe build in the Windows 10.
  2. Navigate to the folder path that has GitHub's keyboard(lexical-models).
  3. Open the command prompt.
  4. Enter the below command in the window's prompt
  5. kmc copy C:\Users\Bharani\Documents\GitHub\lexical-models\release\sil\sil.cmo.bw -o D:\Dinakaran_Files\TestingKeyboard\LexicalModelKMCTesting1

  6. lexical-models
  7. kmc copy C:\Users\Bharani\Documents\GitHub\lexical-models\release\sil\sil.cmo.bw\sil.cmo.bw.kpj -o D:\Dinakaran_Files\TestingKeyboard\LexicalModelKMCTesting

  8. Verified that the keyboard folder or *.kpj file was copied into a new folder.
  9. Verified that the keyboard file was renamed in the new folder.
    It works well. Thanks.
  • I observed two things for copying files.
  • I created a folder in the Temp folder and then tried to copy a keyboard file.
  • Here, the folder "already exists, not overwriting" message appears on the command prompt.
  • I created a folder in the "Download" folder and then tried to copy a keyboard *.kmp file.
  • Here, folder "Could not find project file" message appears on the command prompt.
    Please refer to the attached screenshot

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label Oct 29, 2024
Copy link
Contributor

@darcywong00 darcywong00 left a comment

Choose a reason for hiding this comment

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

lgtm

Base automatically changed from feat/developer/kmc-generate to master November 8, 2024 04:13
@mcdurdin mcdurdin merged commit eefbdc4 into master Nov 8, 2024
21 checks passed
@mcdurdin mcdurdin deleted the feat/developer/kmc-copy branch November 8, 2024 04:14
@keyman-server
Copy link
Collaborator

Changes in this pull request will be available for download in Keyman version 18.0.138-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

feat(developer): Add a "Clone keyboard project" option to Keyman Developer
4 participants