diff --git a/mpsd-software-environment.py b/mpsd-software-environment.py index 55008ee8ad5d6bc8be2dfb99c1105e51b6a49e88..ba01d626e7ca91c081ee3251593fedda01d42a8b 100755 --- a/mpsd-software-environment.py +++ b/mpsd-software-environment.py @@ -335,11 +335,15 @@ def install_environment( def remove_environment(release, toolchains, target_dir): - print(f"Removing release {release} with toolchains {toolchains} from {target_dir}") + msg = f"Removing release {release} with toolchains {toolchains} from {target_dir}" + print(msg) + raise NotImplementedError(msg) def start_new_environment(release, from_release, target_dir): - print(f"Starting new release {release} from {from_release} to {target_dir}") + msg = f"Starting new release {release} from {from_release} to {target_dir}" + print(msg) + raise NotImplementedError(msg) def main(): @@ -376,9 +380,20 @@ def main(): else: subp.add_argument( - "release", type=str, help="Release version to install or remove" + "release", + type=str, + help="Release version to prepare, install, reinstall or remove", ) - if cmd in ["install", "reinstall"]: + if cmd in ["install", "reinstall", "remove"]: + # "install" command needs additional documentation + tool_chain_help = ( + f"Pass a list of toolchains to command {cmd}. " + "Use '--toolchains ALL' to " + f"{cmd} all toolchains. If '--toolchain' is not " + "specified, list available toolchains for the release " + "(after environment has been prepared if not done yet)." + ) + subp.add_argument( "--toolchains", # first option defines attribute # name `args.toolchains` in `args = parser_args()` @@ -388,19 +403,14 @@ def main(): dest="toolchains", nargs="+", default="NONE", - help=( - "List of toolchains to install (use '--toolchains ALL' to " - "install all toolchains). If nothing is specified, list of" - "available toolchains for the release would be shown after" - "creating the environment." - ), + help=tool_chain_help, ) subp.add_argument( "--enable-build-cache", action="store_true", help=( - "Enable Spack build cache. Useful for reinstallation but" - "consumes time and disk space" + "Enable Spack build cache. Useful for reinstallation but " + "consumes time and disk space." ), ) # Carry out the action