Skip to content
Snippets Groups Projects
Commit 822cc4af authored by Hans Fangohr's avatar Hans Fangohr
Browse files

Merge branch 'fix-type-hintings' into 'simplify-log-file-path-generation'

fix mistakes in type hinting

See merge request !100
parents 6eb9c686 f9248b40
No related branches found
No related tags found
2 merge requests!100fix mistakes in type hinting,!96Simplify log file path generation
Pipeline #375144 passed
......@@ -142,7 +142,7 @@ def create_log_file_names(
microarch: str,
action: str,
date: str = call_date_iso,
package_set: str = None,
package_set: Union[str, None] = None,
) -> Union[str, None]:
"""Create log file names.
......@@ -194,7 +194,7 @@ def create_log_file_names(
def get_log_file_path(
mpsd_release: str, cmd: str, root_dir: Path, package_set: str = None
mpsd_release: str, cmd: str, root_dir: Path, package_set: Union[str, None] = None
) -> Union[Path, None]:
"""Get installer log file path.
......@@ -583,7 +583,9 @@ def run(*args, counter=[0], **kwargs):
return process
def record_script_execution_summary(root_dir: str, msg: str = None, **kwargs) -> None:
def record_script_execution_summary(
root_dir: Path, msg: Union[str, None] = None, **kwargs
) -> None:
"""Log the command used to build the package_set.
It also logs information about the spack-environments branch and commit hash,
......@@ -1025,7 +1027,7 @@ def start_new_environment(release, from_release, target_dir):
raise NotImplementedError(msg)
def environment_status(mpsd_release: str, root_dir: Union[str, Path]) -> dict:
def environment_status(mpsd_release: str, root_dir: Path) -> Union[dict, None]:
"""Show status of release in installation.
Parameters
......@@ -1042,6 +1044,7 @@ def environment_status(mpsd_release: str, root_dir: Union[str, Path]) -> dict:
toolchain_map : dict
A dictionary containing available microarchitectures as keys and
a list of available package_sets as values for each microarchitecture.
If the release is not installed/found, None is returned.
Note: only toolchains can be reported at the moment (i.e. package_sets
such as global and global_generic are missing, even if installed).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment