-
Notifications
You must be signed in to change notification settings - Fork 125
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
[WIP] Adding a way how to edit values in a new template #193
Conversation
Thanks for providing the patch, @mruprich. During the review I've realized two main issues: Using the approach with extra args causes that the available options are not displayed in the help message when called And second, I realized that we have agreed on the options which are relevant only for the So I was thinking about a different approach: What about providing a single option for each step which would allow to override the template default with user content provided as yaml data. It could look like this:
This would also give a nice flexibility in providing only some parameters as needed.
What do you think? |
That was actually something that I was thinking about as well... The inability to edit other phases. What you are suggesting looks good, I will change the PR. Thanks :) |
Great, thanks! Note that |
/packit build |
Our good friend
The traceback happened in the code which will be changed, so you don't have to investigate this. |
@psss I re-did the PR, now multiple --discover options can be added. In base.py in the edit_template function I am trying to make sure that the values are OK, if you can think of a better way, let me know. Also if you want the edit_template in a different place in the code, I can move it around. I was thinking if it makes sense to edit this further in the future - maybe add options to edit any of those phases in the template? But AFAICT the discover is the most versatile and interesting at this point. If you think that this would be a good idea, we can discuss it and I'll be happy to get this done but probably in a different issue/PR. |
/packit build |
Thanks for improving the patch. I'm afraid we cannot check for the valid keys as this will be different in individual plugins. Once we have completely migrated all steps to dynamic plugins we can improve this by introducing a commom way how to verify options. I didn't want to force push to your master so here's a new pull request: #219 Could you please have a look and let me know if works for you? |
Covered by #219. |
I know you already merged this but thx @psss, this is really good. |
Thank you for outlining the implementation, Michal! |
Adding a way how to solve #140. I am marking this as WIP, since I am not a Python pro and I am sure that there will be comments and ideas during the review.
I implemented validate_args function to check the values that the user wants to add to the template, because I think that such a complicated use case is a little bit too much for click itself.