def calculate_metrics(self) -> None:
        """
        Calculate relative health score compared to llama-index-core.
        """
        if os.path.exists("./core_package_metrics.json"):
            if self.verbose:
                print(
                    "Loading cached existing core package metrics from ./core_package_metrics.json"
                )
            with open("./core_package_metrics.json") as f:
                core_package_metrics = json.load(f)
        else:
            if self.verbose:
                print("No cached existing core package metrics found, calculating...")
            core_package_metrics = {
                "downloads": IntegrationActivityAnalyzer(
                    repo_path="./llama-index-core", package_name="llama-index-core"
                ).get_download_trends(),
                "commits": IntegrationActivityAnalyzer(
                    repo_path="./llama-index-core", package_name="llama-index-core"
                ).get_commit_activity(),
            }
            with open("./core_package_metrics.json", "w") as f:
                json.dump(core_package_metrics, f)

        current_metrics = {
            "downloads": self.get_download_trends(),
            "commits": self.get_commit_activity(),
        }

        # if the package is too new to have any data, set new project flag
        if current_metrics["downloads"] is None or current_metrics["commits"] is None:
            self._is_new_project = True

        # Calculate ratios relative to core package (current/core)
        self.metrics["download_ratio"] = (
            current_metrics["downloads"]["avg_monthly_downloads"]
            / core_package_metrics["downloads"]["avg_monthly_downloads"]
        )

        self.metrics["download_stability_ratio"] = (
            current_metrics["downloads"]["stability"]
            / core_package_metrics["downloads"]["stability"]
        )

        self.metrics["download_growth_ratio"] = (
            current_metrics["downloads"]["growth_rate"]
            / core_package_metrics["downloads"]["growth_rate"]
        )

        self.metrics["commit_ratio"] = (
            current_metrics["commits"]["total_commits"]
            / core_package_metrics["commits"]["total_commits"]
        )

        self.metrics["commit_consistency_ratio"] = (
            current_metrics["commits"]["commit_consistency"]
            / core_package_metrics["commits"]["commit_consistency"]
        )

        self.metrics["commit_frequency_ratio"] = (
            current_metrics["commits"]["commit_frequency"]
            / core_package_metrics["commits"]["commit_frequency"]
        )

        # Weight the different factors
        # Max score is 1.0
        self.metrics["test_score"] = self.check_test_coverage()

        Calculate relative health score compared to llama-index-core.
        
scripts/integration_health_check.py