Skip to content

cmd

Doctor related commands.

Commands invoked by dpteam doctor are defined here.

doctor()

Check your system for potential problems.

This could be e.g. if some required tooling is missing. The command provides advice and pointers to how to fix issues. Will exit with a non-zero status if any potential problems are found.

Source code in dapla_team_cli/doctor/cmd.py
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
def doctor() -> None:
    """Check your system for potential problems.

    This could be e.g. if some required tooling is missing.
    The command provides advice and pointers to how to fix issues.
    Will exit with a non-zero status if any potential problems are found.
    """
    if os.getenv("NB_USER") == "jovyan":
        console.print("✅ You are on Jupyter, so everything should work out of the box!", style=styles["normal"])
        return

    console.print("Checking for uninstalled dependencies...", style=styles["normal"])

    checks = [check_gcloud(), check_keycloak()]

    print("Summary:")

    for check in checks:
        print(check)

    all_good = all(checks)
    if all_good:
        print("✅ You are good to go")
    else:
        print("❌ Some dependencies are missing. Dapla Team CLI might not work correctly.")