MCPcopy
hub / github.com/zenml-io/zenml / info

Function info

src/zenml/cli/base.py:593–677  ·  view source on GitHub ↗

Show information about the current user setup. Args: packages: List of packages to show information about. all: Flag to show information about all installed packages. file: Flag to output to a file. stack: Flag to output information about active stack and compone

(
    packages: Tuple[str],
    all: bool = False,
    file: str = "",
    stack: bool = False,
)

Source from the content-addressed store, hash-verified

591 type=bool,
592)
593def info(
594 packages: Tuple[str],
595 all: bool = False,
596 file: str = "",
597 stack: bool = False,
598) -> None:
599 """Show information about the current user setup.
600
601 Args:
602 packages: List of packages to show information about.
603 all: Flag to show information about all installed packages.
604 file: Flag to output to a file.
605 stack: Flag to output information about active stack and components
606 """
607 gc = GlobalConfiguration()
608 environment = Environment()
609 client = Client()
610 store_info = client.zen_store.get_store_info()
611
612 store_cfg = gc.store_configuration
613
614 try:
615 active_project = client.active_project
616 except RuntimeError:
617 active_project = None
618
619 user_info = {
620 "zenml_local_version": zenml_version,
621 "zenml_server_version": store_info.version,
622 "zenml_server_database": str(store_info.database_type),
623 "zenml_server_deployment_type": str(store_info.deployment_type),
624 "zenml_config_dir": gc.config_directory,
625 "zenml_local_store_dir": gc.local_stores_path,
626 "zenml_server_url": store_cfg.url,
627 "zenml_active_repository_root": str(client.root),
628 "python_version": environment.python_version(),
629 "environment": get_environment(),
630 "system_info": environment.get_system_info(),
631 "active_project": active_project.name if active_project else None,
632 "active_stack": client.active_stack_model.name,
633 "active_user": client.active_user.name,
634 "telemetry_status": "enabled" if gc.analytics_opt_in else "disabled",
635 "analytics_client_id": str(gc.user_id),
636 "analytics_user_id": str(client.active_user.id),
637 "analytics_server_id": str(client.zen_store.get_store_info().id),
638 "integrations": integration_registry.get_installed_integrations(),
639 "packages": {},
640 "query_packages": {},
641 }
642
643 if all:
644 user_info["packages"] = get_package_information()
645 if packages:
646 if user_info.get("packages"):
647 if isinstance(user_info["packages"], dict):
648 user_info["query_packages"] = {
649 p: v
650 for p, v in user_info["packages"].items()

Callers

nothing calls this directly

Calls 12

python_versionMethod · 0.95
get_system_infoMethod · 0.95
GlobalConfigurationClass · 0.90
EnvironmentClass · 0.90
ClientClass · 0.90
get_environmentFunction · 0.90
get_package_informationFunction · 0.90
write_yamlFunction · 0.90
declareFunction · 0.90
get_store_infoMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected