Skip to content

Implement Interactive mode to make this more user-friendly #11

@shreyb

Description

@shreyb
Collaborator

The idea is to have an interactive mode people can use to navigate the APIs a bit more easily.

For example, if we wanted to check role for a user, this would ask you what kind of task you'd want to perform (like information about a user), and then would prompt you for the needed arguments.

This will be addressed when we have usage of this tool and see if it's necessary (are there enough pain points to justify the effort needed to develop this?)

Activity

added
futureIssues that may be worked on in the future
on Nov 20, 2023
LTrestka

LTrestka commented on Jan 14, 2024

@LTrestka
Collaborator

I think this could be done fairly simply using a decision tree, the new --filter flag, and building a filter term:

(PSUEDO behavior and output)

  1. Getting data (1), or updating (2)? 1 (behind the scenes, we add a filter: "get"..... or "set" for 2)

  2. Regarding (choose 1)?
    User (1)
    Group (2)
    Compute Resource(3)
    Experiment(4): 2 (filters: get, resource)

  3. etc...

I could (quickly) add a feature to the filter flag to filter by multiple terms, which can filter either by "contains either term" or "contains all terms"

In which case, the end result can run a workload (interactive_response, or something):
relevant_endpoints: ferry_cli --filter=get,resource -le (return subparser array before printing)

print("These might be the endpoints you are looking for")
for ep in relevant_endpoints:
print(ep.description)
ferry_cli -ep {endpoint name}

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    futureIssues that may be worked on in the future

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @shreyb@LTrestka

        Issue actions

          Implement Interactive mode to make this more user-friendly · Issue #11 · fermitools/Ferry-CLI