nvflare.tool.package_checker.package_checker module

class CheckStatus(value)[source]

Bases: Enum

An enumeration.

FAIL = 4
FAIL_WITH_CLEANUP = 3
PASS = 1
PASS_WITH_CLEANUP = 2
class PackageChecker[source]

Bases: ABC

add_report(check_name, problem_text: str, fix_text: str)[source]
check() CheckStatus[source]

Checks if the package is runnable on the current system.

Returns:

checks passed, no dry-run cleanup needed. CheckStatus.PASS_WITH_CLEANUP: checks passed, dry-run process needs cleanup. CheckStatus.FAIL_WITH_CLEANUP: checks failed, dry-run process needs cleanup. CheckStatus.FAIL: checks failed, no dry-run cleanup needed.

Return type:

CheckStatus.PASS

check_dry_run() CheckStatus[source]

Runs dry run command.

Returns:

dry run started successfully and needs cleanup. CheckStatus.FAIL_WITH_CLEANUP: dry run started but failed and needs cleanup. CheckStatus.FAIL: dry run could not be started.

Return type:

CheckStatus.PASS_WITH_CLEANUP

abstract get_dry_run_command() str[source]

Returns dry run command.

get_dry_run_inputs()[source]
init(package_path: str)[source]
abstract init_rules(package_path: str)[source]
print_report()[source]
abstract should_be_checked() bool[source]

Check if this package should be checked by this checker.

stop_dry_run(force: bool = True)[source]