diff --git a/mpsd-software.py b/mpsd-software.py index bfeb5a5bf6476b23c357461cbf2f6af8cdf3277b..07ecabed4a3f3396f4f00730a7782adb18599400 100755 --- a/mpsd-software.py +++ b/mpsd-software.py @@ -26,13 +26,41 @@ else: rich_available = True -about_tool = """ +about_intro = f""" Build toolchains using Spack.\n -This function builds toolchains for MPSD-HPC at the appropriate directory, \n -for given system architecture and MPSD software stack version.\n -The toolchains -are built using the bash script spack_setup.sh, and the results are logged. """ +This function builds toolchains for MPSD-HPC at the appropriate directory, +for given system architecture and MPSD software stack version. The toolchains +are built using the bash script spack_setup.sh, and the results are logged. + +Command line usage: + + $> {sys.argv[0]} + +""" + + +about_epilog = f""" + + +Examples: + +1. Query what package sets and toolchains are available in relase dev-23a + + $> {sys.argv[0]} available dev-23a + +2. Install foss2022a-serial toolchain + + $> {sys.argv[0]} install dev-23a foss2022a-serial + +3. Check what package sets and toolchains are installed from release dev-23a + + $> {sys.argv[0]} status dev-23a + +Documentation: https://gitlab.gwdg.de/mpsd-cs/mpsd-software/-/blob/main/README.rst + +""" + call_date_iso = ( datetime.datetime.now().replace(microsecond=0).isoformat().replace(":", "-") @@ -1032,7 +1060,8 @@ def environment_status(mpsd_release: str, root_dir: Union[str, Path]) -> dict: def main(): """Execute main entry point.""" - parser = argparse.ArgumentParser(description=about_tool) + parser = argparse.ArgumentParser(description=about_intro, epilog=about_epilog, + formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument( "--log", "-l",