class_docstr: Container to access dbt project metadata such as dbt_project.yml and profiles.yml.
class_docstr_tok: ["Container","to","access","dbt","project","metadata","such","as","dbt_project.yml","and","profiles.yml","."]
docstr: Loads all dbt artifacts for the project associated with the given project path.
docstr_tok: ["Loads","all","dbt","artifacts","for","the","project","associated","with","the","given","project","path","."]
code: def load_from_project_path(
      cls: Type[Self], project_path: Path
  ) -> Self:
      """Loads all dbt artifacts for the project associated with the given project path."""
      logger.info(
          f"Loading dbt project metadata for project located at {project_path}"
      )
      dbtRunner().invoke(["-q", "debug"], project_dir=str(project_path))
      profile = load_profile(str(project_path), {})
      project = load_project(
          str(project_path), version_check=False, profile=profile
      )
      project_path = project_path
      logger.info(
          f"Loaded project {project.project_name} with profile details:\n{pformat_big_objects(profile)}"
      )
      return cls(
          profile=profile, project=project, project_path=project_path
      )
  
imports: from __future__ import annotations
  import dataclasses
  import logging
  from pathlib import Path
  from typing import List, Type
  from dbt.adapters.base.impl import BaseAdapter
  from dbt.adapters.factory import get_adapter_by_type
  from dbt.cli.main import dbtRunner
  from dbt.config.profile import Profile
  from dbt.config.project import Project
  from dbt.config.runtime import load_profile, load_project
  from dbt_semantic_interfaces.pretty_print import pformat_big_objects
  from dbt_semantic_interfaces.protocols.semantic_manifest import SemanticManifest
  from typing_extensions import Self
  from metricflow.errors.errors import ModelCreationException
  from metricflow.model.dbt_manifest_parser import parse_manifest_from_dbt_generated_manifest
label_desc: Use image node_id 1 for calling the dbtProjectMetadata obj's underlying member method code with example usage: obj.load_from_project_path(cls, project_path) and returns: cls