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

CLI: save "current" project and codeset as persistent state #118

Open
stefannica opened this issue Jun 1, 2021 · 2 comments
Open

CLI: save "current" project and codeset as persistent state #118

stefannica opened this issue Jun 1, 2021 · 2 comments
Assignees
Labels
area/cli CLI features and behavior enhancement New feature or request good first issue Good for newcomers

Comments

@stefannica
Copy link
Member

The CLI allows reading global options like URL, HTTP timeout and verbosity from a .fuseml/config.yaml configuration file. The same configuration file can be leveraged to store information that could be considered part of the CLI's state, such as:

  • information about projects being used: project name, username, password
  • information about codesets being used: codeset name, project name, location
  • current project
  • current codeset

Storing this information as persistent state allows the CLI to auto-fill some command parameters based on the "current" context, which makes it easier for CLI users to run repetitive commands, such as pushing codeset updates. The following context managing commands need to be implemented:

  • fuseml project list - lists all available projects (currently only represented as gitea orgs)
  • fuseml project set <project-name> - sets the "current" project
  • fuseml codeset set <codeset-name> - sets the "current" codeset in the "current project"

Other commands related to codesets and projects should be modified so that they use the "current" project and "current" codeset if they are not explicitly supplied as arguments, as well as change the output to indicate if a displayed codeset is active or not.

@stefannica stefannica added area/cli CLI features and behavior enhancement New feature or request good first issue Good for newcomers labels Jun 1, 2021
@stefannica stefannica added this to Backlog in FuseML Project Board via automation Jun 1, 2021
@jsuchome
Copy link
Member

jsuchome commented Jun 8, 2021

What is interesting in this list of commands is that except for one (fuseml project list), they are all client only.

Just wondering if it makes sense to design an API..

@jsuchome
Copy link
Member

jsuchome commented Jun 8, 2021

And this

information about projects being used: project name, username, password

although it does not look like initially, is also client side only. Well at least partially. We can list orgs and associated users using our git client API, however not the passwords, these we'd need to store locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli CLI features and behavior enhancement New feature or request good first issue Good for newcomers
Projects
Development

No branches or pull requests

2 participants