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

Unify commands under a single entry point #699

Closed
0x2b3bfa0 opened this issue Aug 19, 2021 · 4 comments · Fixed by #703
Closed

Unify commands under a single entry point #699

0x2b3bfa0 opened this issue Aug 19, 2021 · 4 comments · Fixed by #703
Assignees
Labels
ui/ux User interface/experience

Comments

@0x2b3bfa0
Copy link
Member

0x2b3bfa0 commented Aug 19, 2021

It would be nice to provide a common cml command to unify all the different scripts that conform our public interface. Executing cml command could be more practical than the current cml-command because the former provides:

  • A more sensible default command on our container images, instead of using cml-runner as we're currently doing:

    cml/Dockerfile

    Line 104 in 899c6d2

    CMD ["cml-runner"]

  • A canonical way of specifying options that are common to all the commands, like obtaining the used CML version. Calling cml-command --version isn't as intuitive as calling cml --version for a set of tools that get released together.

  • It would be similar to many other modern command-line tools like gh or dvc where users already expect a single base command.

We can preserve backward compatibility in the same ways as Git, so cml-command and cml command become equivalent.

Additionally, it would be nice to consider more descriptive names for some of the commands and keep aliases for backwards compatibility.

@0x2b3bfa0 0x2b3bfa0 added the ui/ux User interface/experience label Aug 19, 2021
@0x2b3bfa0 0x2b3bfa0 self-assigned this Aug 19, 2021
@casperdcl
Copy link
Contributor

casperdcl commented Aug 24, 2021

btw git already supports subcommands, and gh also just added support. Should do the same for cml.

@skshetry
Copy link
Member

btw git already supports subcommands, and gh also just added support. Should do the same for cml.

I have been thinking of doing the same for dvc, but argparse hasn't made that easy. 😄

@DavidGOrtega
Copy link
Contributor

I have been thinking of doing the same for dvc, but argparse hasn't made that easy. 😄

But dvc already have subcommands @skshetry ?

I also thought on this. Will make the code dryer since we also repeat many times variables or prepare the output redirecting the console, etc...

@skshetry
Copy link
Member

@DavidGOrtega, yes it does. I was commenting on the link that @casperdcl shared about gh adding support for extension/third-party subcommands. git also supports third-party extension commands already, I am just thinking of ways to do that. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui/ux User interface/experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants