-
Notifications
You must be signed in to change notification settings - Fork 11
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
New CLI functionalities: tree, report, job info #180
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #180 +/- ##
============================================
+ Coverage 47.99% 72.28% +24.28%
============================================
Files 44 45 +1
Lines 5353 5671 +318
Branches 848 890 +42
============================================
+ Hits 2569 4099 +1530
+ Misses 2534 1260 -1274
- Partials 250 312 +62
|
Also fixed the coverage report. From a few tests it seemed that running with |
Hi @gpetretto, no issue from my side (especially as the number has gone up!) I'm surprised its not working given that the config was just taken from a project that does the same thing successfully, the only difference I can see is that the flag Do you want me to take a look at the rest of the PR at all? I'm still fighting with SGE in #160... |
Thanks for the tests on the coverage. For the review, I am not sure if @davidwaroquiers already started looking at this. |
Thanks a lot for this! Not sure I'll have the time to review this soon enough (most probably not before next week). I could still already test the report, which is really nice! My only comments right now maybe would be about the tree command. I like the idea because we've had many people saying "oh, the jf command line interface has many options and it's difficult to find your way in it". That definitely helps! Would it be possible to put a small description of each of the commands also on the right (could it be taken from the help of each of the commands ? maybe it's too long? or maybe it would be too much anyway ?). My other comment is actually about having as a command itself. Wouldn't it be "better" to have it as an option ? e.g. jf --tree prints the entire tree, jf job --tree prints the tree starting at jf job, etc ... What do you think ? |
For the first point, this should be already addressed. If you run Making it as an option instead of a command will be somewhat trickier to implement, but not too much. I may need to manually create a function for each of the subcommands. It should be easier to have it as an additional command for all the subcommands. e.g. |
Or directly in the help ? Is there a verbosity for help ? -h -v could give the tree for example |
Tthe |
I think the --tree would be better if it's not too much work. I would guess it would be possible (and maybe relatively easy ?) to add something in your JFRTyper class so that the --tree option is automatically added to all commands and subcommands. What do you think ? |
One additional problem I have thought about with the |
Indeed. I would probably still go with the --tree, in which documentation and options are always shown, and we don't show the hidden commands (hidden commands are for admins/developers so they should be able to find out in either the documentation or the code, what do you think ?). I would say for the depth, we can drop it. What do you think ? |
I would say that showing documentation and options for all the tree basically defeats the purpose of the command, that is to give a quick overview of the commands available. |
Following internal discussion the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good to me! Great work!
Some new functionalities for the CLI:
jf tree
command. This prints a tree with the all the commands available. Can optionally control the depth of the tree, choose the starting point, show also the options for each command and the docstring for each branch of the tree. I thought it may be useful to have a quick bird-eye view if one is searching a specific command.jf job report
,jf flow report
.jf job info
printed the content ofJobInfo
(orJobDoc
) in alphabetical order. Now the order is predetermined, keeping close entried that are related to each other (e.g. all the dates).