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

hpcutil option tree too deep #5

Open
marcelzwiers opened this issue Oct 31, 2019 · 11 comments
Open

hpcutil option tree too deep #5

marcelzwiers opened this issue Oct 31, 2019 · 11 comments

Comments

@marcelzwiers
Copy link

marcelzwiers commented Oct 31, 2019

The hpcutil command accepts only three options, i.e. cluster, version and webhook. Obviously version is 'flat' and webhook is kind of flat too (the next level in the hierarchy are basically input argument to webhook), but all the hierarchy of cluster seems to me to be too deep (for instance, there is hpcutil cluster nodes vnc). Moreover, hpc already implies it is about the cluster, so it is kind of redundant and confusing. I think the tools under cluster would be a lot more discoverable and easier to reach if the cluster option would be cut out and all the sub-options be placed directly in the root, next to version and webhook

@marcelzwiers
Copy link
Author

Is there an easy possibility to show the tree, i.e. all the possible tools?

@hurngchunlee
Copy link
Member

The hpcutil command accepts only three options, i.e. cluster, version and webhook. Obviously version is 'flat' and webhook is kind of flat too (the next level in the hierarchy are basically input argument to webhook), but all the hierarchy of cluster seems to me to be too deep (for instance, there is hpcutil cluster nodes vnc). Moreover, hpc already implies it is about the cluster, so it is kind of redundant and confusing. I think the tools under cluster would be a lot more discoverable and easier to reach if the cluster option would be cut out and all the sub-options be placed directly in the root, next to version and webhook

The idea of having a nodes command under culster is to separate tools for getting node-specific information from getting cluster-wise information. This simplify structuring common options and behaviors of tools in the same command category.

I don't think having a separate cluster a bad idea, as it is about retrieving information about the cluster; while webhook is more about managing webhook instances.

btw, why this is an issue? There is a tab-completion to help you navigate through available commands.

I am ok to structure it further, but we better do it with a structure agreed by, for example, the scientific programming group.

@hurngchunlee
Copy link
Member

Is there an easy possibility to show the tree, i.e. all the possible tools?

What is your usecase in mind? Wouldn't tab-completion and -h option work as well?

@marcelzwiers
Copy link
Author

Very easy, make options findable / discoverable. For instance, the other day I wanted to look up the vnc session of a user (who came for help) and if you don't know the tree structure by heart, it is a pain to have to go through all the options to finally find hpcutil cluster nodes vnc. Nobody who didn't write the software or works with it regularly would suspect there is a vnc utilty hidden deep in that hpcutil tree. The hierarchy is maybe technically correct, but currently not user friendly. I would like to have an overview of all the hpc tools, something along like you get with module avail

@hurngchunlee
Copy link
Member

hurngchunlee commented Oct 31, 2019

There are many ways to make it findable/discoverable. The current way is to use tab-completion and -h option which I understand it's not something you used to do on Linux console (but it is quite a common approach for command-line applications). The only missing part here is to also create a man manual (which I believe it is also not something you will read).

It could also be a written documentation showing whole list of options. The issue of this approach is that it is very difficult to keep both implementation and documentation in sync.

Generating a tree of commands requires handcraft work and it is also just like writing a documentation (but instead of a doc, it is written in the code).

Again, I want to discuss the right way to improve it in a wider perspective rather that I start making new implementation which is later disagreed by someone-else. It is a waste of time and effort.

@marcelzwiers
Copy link
Author

I do use -h and tab completion all the time, it is just not intuitive for a regular user what is to be found under cluster > nodes

@hurngchunlee
Copy link
Member

So what is your proposal? Do you want to restructure the command hierarchy or make a document to list all possible commands?

I can easily do the second with a Linux man page (then you can do man hpcutil to get all about this tool); but for restructuring the command, I would rather discuss it for a generally agreed structure.

@hurngchunlee
Copy link
Member

@marcelzwiers I have implemented the hpcutil avail command to list all available sub-commands. It is already available on all cluster nodes. It may not be perfect considering the line wrapping and tabular representation.

@marcelzwiers
Copy link
Author

marcelzwiers commented Nov 4, 2019 via email

@hurngchunlee
Copy link
Member

hurngchunlee commented Nov 4, 2019 via email

@marcelzwiers
Copy link
Author

marcelzwiers commented Nov 4, 2019 via email

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

No branches or pull requests

2 participants