nvflare.utils.cli_utils module

append_if_not_in_list(arr: List, item) List[source]
check_dir(dir_path: str)[source]
check_startup_dir(startup_kit_dir)[source]
create_hidden_nvflare_dir()[source]
create_job_template_config(nvflare_config: ConfigTree, job_templates_dir: str | None = None) ConfigTree[source]
Parameters:
  • job_templates_dir – specified job template directory

  • nvflare_config (ConfigTree) – The existing nvflare configuration.

Returns:

The merged configuration tree.

Return type:

ConfigTree

create_poc_workspace_config(nvflare_config: ConfigTree, poc_workspace_dir: str | None = None) ConfigTree[source]
Parameters:
  • poc_workspace_dir – specified poc_workspace_dir

  • nvflare_config (ConfigTree) – The existing nvflare configuration.

Returns:

The merged configuration tree.

Return type:

ConfigTree

create_startup_kit_config(nvflare_config: ConfigTree, startup_kit_dir: str | None = None) ConfigTree[source]
Parameters:
  • startup_kit_dir – specified startup kit location

  • nvflare_config (ConfigTree) – The existing nvflare configuration.

Returns:

The merged configuration tree.

Return type:

ConfigTree

find_in_list(arr: List, item) bool[source]
find_job_templates_location(job_templates_dir: str | None = None)[source]
find_startup_kit_location() str[source]
get_curr_dir()[source]
get_hidden_config()[source]
get_hidden_nvflare_config_path(hidden_nvflare_dir: str) str[source]

Get the path for the hidden nvflare configuration file. :param hidden_nvflare_dir: ~/.nvflare directory

Returns:

The path to the hidden nvflare configuration file.

Return type:

str

get_hidden_nvflare_dir() Path[source]
get_home_dir() Path[source]
get_startup_kit_dir(startup_kit_dir: str | None = None) str[source]
hocon_to_string(target_fmt: ConfigFormat, dst_config: ConfigTree)[source]
is_dir_empty(path: str)[source]
load_config(config_file_path) ConfigTree | None[source]
load_hidden_config() ConfigTree[source]
save_config(dst_config, dst_path, keep_origin_format: bool = True)[source]
save_configs(app_configs: Dict[str, Tuple], keep_origin_format: bool = True)[source]