diff --git a/mpsd-software-environment.py b/mpsd-software-environment.py index 76690377c802b1cf0fd05a4fb704228f8c9b396b..a2651bc488db7a9801ffdfa39b31719ded50132e 100755 --- a/mpsd-software-environment.py +++ b/mpsd-software-environment.py @@ -827,12 +827,27 @@ def start_new_environment(release, from_release, target_dir): raise NotImplementedError(msg) -def environment_status(mpsd_release, script_dir): - """Show status of a release.""" - msg = f"Showing status of release {mpsd_release} in {script_dir}" +def environment_status(mpsd_release: str, root_dir: Union[str, Path]) -> dict: + """Show status of release in installation. + + Parameters + ---------- + mpsd_release : str + A string representing the MPSD release version. + root_dir : pathlib.Path + A Path object representing the path to the directory where + the release and toolchains will be installed. + + Returns + ------- + toolchain_map : dict + A dictionary containing available microarchitectures as keys and + a list of available toolchains as values for each microarchitecture. + """ + msg = f"Showing status of release {mpsd_release} in {root_dir}" logging.info(msg) plog = logging.getLogger("print") - release_base_dir = script_dir / mpsd_release + release_base_dir = root_dir / mpsd_release microarch = get_native_microarchitecture() toolchain_dir = release_base_dir / microarch spack_dir = toolchain_dir / "spack"