Implement interactive prompts for payu clone settings.#703
Implement interactive prompts for payu clone settings.#703Qian-HuiChen merged 12 commits intopayu-org:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #703 +/- ##
==========================================
+ Coverage 63.30% 63.67% +0.36%
==========================================
Files 67 67
Lines 5426 5561 +135
==========================================
+ Hits 3435 3541 +106
- Misses 1991 2020 +29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This is looking really great @Qian-HuiChen. I'm finding it intuitive and like that the interactive mode automatically activates when you don't supply any arguments. The autocomplete is a great feature too. I just had a couple comments from my testing so far:
Not sure how much of an issue this is, as possibly I'd gotten into a habit of using an odd order, but thought it's worth being aware of. |
|
Thanks @blimlim!
Note for breaking change (SORRY!): will no longer work after I updated @aidanheerdegen what do you think of this problem? Do you have any idea that could handle this more elegant? |
Great. I think this is a good idea, and helps to inform users how to use the direct clone command. |
My suggestion would be to use mutually exclusive groups and not allow the Though this doesn't allow a user to pre-fill some of the fields, it is conceptually simpler: I don't think a lot of utility is lost, as the user likely has the url to clone in their paste buffer in any case, and the argument completion is so handy that it would likely be easier than looking up a branch name and adding it to the command line directly. |
… flags are allowed between repo/local_dir.
|
@aidanheerdegen Thank you for your comments and suggestions! After some thinking on the design and the goal, I adopted a new method:
One advantage of this approach is that it can reusable for other payu command as well 😃 |
2831498 to
d4c9012
Compare
aidanheerdegen
left a comment
There was a problem hiding this comment.
This is a really nice addition, and thanks for getting and incorporating all the feedback.
|
It might be worth taking a look at the codecov report to see if there are any tests that could be easily added |
Apologies I was a bit slow to get to this, but with the latest changes it's working well! |
|
@aidanheerdegen sounds good. I added a few tests on clone_cmd. |

To reduce complexity and make payu easier for beginner users (see #655), this PR introduces an interactive mode in
payu clone.Users can simply run
to start the guided prompt process.
Alternatively, users can provide known arguments (such as the repository, local directory, source branch, or commit) and enable the interactive prompts with:
In this case, the wizard will only prompt for any missing information.