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,
)
| 591 | type=bool, |
| 592 | ) |
| 593 | def 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() |
nothing calls this directly
no test coverage detected