-
Notifications
You must be signed in to change notification settings - Fork 36
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
completions - generate_completions script works in py3 #5315
Conversation
Jenkins results:
|
thanks Dario. I am not able to review this. I never knew that |
And for sure I do not understand the code inside those scripts ! |
I added a commit with and improved comment that i hope is clear enough. So, at the moment I think we can use it instead of manually editing the file, which means run this script "only" when we add a crab client command or change an option in an existing command. In the future we can integrate this as part of the crab client build process, so that the completions are generated for every new deployment. I do not think the effort is worth at the moment. |
Jenkins results:
|
I addressed the some comments from pylint (the ones that i could quickly get rid of without a proper and useless refactoring). If everything goes well, I will merge this PR |
Jenkins results:
|
jenkins looks good to me, i will merge |
fixes #5314
status
tested on my laptop, but i have a small question before merging
solution
This PR serves multiple purposes:
-o nosort
incomplete -F _UseCrab -o filenames -o nosort crab
etc/crab-bashpcimpletion.sh
directly, generate it programmatically fromscripts/generate-completions.py
generate-completions.py
work with python3importlib
instead ofimp
generate-completions.py
generate the completion in our desired ordering, see the use of theweights
variable.open questions:
weights
the exact sorting that we have now yet.etc/crab-bash-completion.sh
line 26. the order here is what bash shows when you presscrab <tab><tab>
(the order of line 32 will be the same as line 26)comment
I decided to revamp the
generate_completion.py
script because I did not want to think about adding manually all the new commands introduced withcrab recover
:)