-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various wrapper scripts improvement (#548)
* Defines the constructor arguments just once * Factored out the shell method as it is almost the same between both container technologies * The DockerContainer doesn't need to know about its subclass any more * Stop forbidding templates from being named podman.sh Only use WrapperScript - no more subclasses. * WrapperScript objects don't have the wrapper_template attribute anymore * Merged the three generation methods of WrapperScript into one * Rewrote the template search - Don't restrict user-defined global templates to be named singularity.sh or docker.sh as in shpc's default template directory - Properly defined the search path based on all available template directories - Minor bugfix: do not search the templates in the current working directory * Allow using a custom template for aliases * Turned get_shell_path to a property Co-authored-by: Matthieu Muffato <[email protected]> * Allow defining the alternative template script in a long form option rather than hijacking the singularity_scripts section * Ensure that the wrapper is always defined * Extracted a function that checks the wrapper exists and returns where to find it * Updated the docs to reflect the current wait templates are rendered * Not used anywhere, so no need to make it a class variable * Reinstated wrapper_template as a (mandatory) constructor argument * Further refactoring to split the function that establishes the search path, from the one that finds the template file * Added a test for the two new methods of WrapperScript * Fixed the comment * Pass the config as a kwarg so that we don't need to pass None for the container * Applied black
- Loading branch information
Showing
9 changed files
with
245 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.