enhance PythonPackage and PythonBundle to support updating module footers for click autocompletion for specified binaries#4056
Conversation
bbd5fef to
57597bc
Compare
4447313 to
5046076
Compare
…tuple of (name, version, data)
Co-authored-by: Loris Ercole <[email protected]>
|
re-build some random In particular including @boegelbot please test @ jsc-zen3 |
|
@Crivella: Request for testing this PR well received on jsczen3l1.int.jsc-zen3.fz-juelich.de PR test command '
Test results coming soon (I hope)... Details- notification for comment with ID 3885281714 processed Message to humans: this is just bookkeeping information for me, |
|
Test report by @Crivella Overview of tested easyconfigs (in order)
Build succeeded for 11 out of 11 (total: 1 hour 16 mins 21 secs) (11 easyconfigs in total) NOTEthe custom module footer for FULL module show result
|
|
Test report by @boegelbot Overview of tested easyconfigs (in order)
Build succeeded for 11 out of 11 (total: 3 hours 41 mins 35 secs) (11 easyconfigs in total) |
…fig parameter in PythonPackage easyblock
…ge, that's already done by default
…honBundle.make_module_footer
|
Test report by @boegel Overview of tested easyconfigs (in order)
Build succeeded for 2 out of 2 (total: 6 mins 6 secs) (2 easyconfigs in total) |
PythonPackage and PythonBundle to support updating module footers for click autocompletion for specified binaries
Currently, writing the module footers to automatically enable/disable
clickautocompletion on module load/unload is fairly cumbersome and can add significant chunks of repeated code to many easyconfigs.See for example:
This PR adds a new configuration
click_autocomplete_binsoption toPythonPackage, to allow passing a list of strings (click script/binaries names) to specify which scripts should have autocompletion enabled.The module footer required for autocompletion will be added both in the case of isolated
PythonPackages or whenPythonPackageis used throughPythonBundleNOTE
I am not running
BINARY_NAME --helpas a sanity check automatically as, even if it is the default forclickthe normal name can be altered (see https://click.palletsprojects.com/en/stable/documentation/#help-parameter-customization)The
_UPPERCASECOMMAND_COMPLETE=bash_source COMMANDinstead should always produce a_UNDERSCORED_LOWERCASE_BINNAME_completionfunction for the bash completion (since we manually unset this when unloading the module).This will also catch eventual changes in the behavior of click in the future