MycroftAI / mycroft-skills-manager

Mycroft Skills Manager
Apache License 2.0
14 stars 13 forks source link

Behavior of the -b and -u switches should have clearer, more complete documentation (or implement expanded functionality) #99

Open jrwarwick opened 2 years ago

jrwarwick commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. login to mycroft over ssh

  2. Issue msm install command (.venv) mycroft@localhost:/opt/mycroft/skills$ msm install https://github.com/jrwarwick/ping-skill.git -b new-skill-format usage: msm [-h] [-p {mycroft_mark_2,respeaker,kde,mycroft_mark_1,default,mycroft_mark_2pi,picroft}] [-u REPO_URL] [-b REPO_BRANCH] [-d SKILLS_DIR] [-c REPO_CACHE] [-l] [-r] {install,remove,search,info,list,update,default} ... msm: error: unrecognized arguments: -b new-skill-format

  3. try to get some clarification from help/documentation:

  4. (.venv) mycroft@localhost:/opt/mycroft/skills$ msm -h usage: msm [-h] [-p {mycroft_mark_2pi,kde,respeaker,default,mycroft_mark_1,mycroft_mark_2,picroft}] [-u REPO_URL] [-b REPO_BRANCH] [-d SKILLS_DIR] [-c REPO_CACHE] [-l] [-r] {install,remove,search,info,list,update,default} ...

positional arguments: {install,remove,search,info,list,update,default}

optional arguments: -h, --help show this help message and exit -p {mycroft_mark_2pi,kde,respeaker,default,mycroft_mark_1,mycroft_mark_2,picroft}, --platform {mycroft_mark_2pi,kde,respeaker,default,mycroft_mark_1,mycroft_mark_2,picroft} -u REPO_URL, --repo-url REPO_URL -b REPO_BRANCH, --repo-branch REPO_BRANCH -d SKILLS_DIR, --skills-dir SKILLS_DIR -c REPO_CACHE, --repo-cache REPO_CACHE -l, --latest Disable skill versioning -r, --raw

Expected behavior I thought -b would allow me to install directly from a branch (which would be useful in the case where the branch is what contains manifest.yml, which apparently is /not/ processed on a mere git branch change.)

The help did not disabuse me of the notion, my source is a repo and does have branches, so the help text further suggests this should work. The help should give me a clearer understanding that -u and -b are only for what official central upstream Mycroft repo. Or even better: implement the implied behavior, allowing any user to install a skill from an arbitrary branch of an arbitrary repo.

Also recommend coordinated clarifications on those switches in the online documentation: https://mycroft-ai.gitbook.io/docs/skill-development/mycroft-skills-manager

Environment (please complete the following information):

Additional context Others have been similarly confused: (https://chat.mycroft.ai/community/pl/qh9cdywwi38y3b3xqee7ytshfa)

krisgesling commented 2 years ago

As you've figured out the -u and -b flags in this instance relate to an alternative listing of Skills eg https://github.com/mycroftai/mycroft-skills, rather than the repo for a single Skill.

And fully agree - I've made a little update to the online documentation to have an example of these two flags. It doesn't seem like you can use both together, which is likely another bug that needs to be addressed.

Leaving this open as we still need to:

  1. Update the command line help text to better describe what these args are
  2. Preferably allow the use of both, eg msm -u $ALT_MARKETPLACE_URL -b some-branch install my-skill
  3. Preferably add the ability to install from a branch of a single skill eg msm -b some-branch install $my_skill_url