class_docstr: Container with access to the dbt artifacts required to power the MetricFlow CLI.
  
  In order to avoid double-loading this should generally be built from the dbtProjectMetadata struct.
  This does not inherit because it is a slightly different struct. In most cases this is the object
  we want to reference.
class_docstr_tok: ["Container","with","access","to","the","dbt","artifacts","required","to","power","the","MetricFlow","CLI",".","In","order","to","avoid","double-loading","this","should","generally","be","built","from","the","dbtProjectMetadata","struct",".","This","does","not","inherit","because","it","is","a","slightly","different","struct",".","In","most","cases","this","is","the","object","we","want","to","reference","."]
docstr: In the dbt project root, retrieve the manifest path and parse the SemanticManifest.
docstr_tok: ["In","the","dbt","project","root",",","retrieve","the","manifest","path","and","parse","the","SemanticManifest","."]
code: def build_semantic_manifest_from_dbt_project_root(
      project_root: Path,
  ) -> SemanticManifest:
      """In the dbt project root, retrieve the manifest path and parse the SemanticManifest."""
      DEFAULT_TARGET_PATH = "target/semantic_manifest.json"
      full_path_to_manifest = Path(
          project_root, DEFAULT_TARGET_PATH
      ).resolve()
      if not full_path_to_manifest.exists():
          raise ModelCreationException(
              f"Unable to find {full_path_to_manifest}\n"
              "Please ensure that you are running `mf` in the root directory of a dbt project "
              "and that the semantic_manifest JSON exists. If this is your first time running "
              "`mf`, run `dbt parse` to generate the semantic_manifest JSON."
          )
      try:
          with open(full_path_to_manifest, "r") as file:
              raw_contents = file.read()
              return parse_manifest_from_dbt_generated_manifest(
                  manifest_json_string=raw_contents
              )
      except Exception as e:
          raise ModelCreationException from e
  
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 2 for calling the dbtArtifacts obj's underlying member method code with example usage: obj.build_semantic_manifest_from_dbt_project_root(project_root) and returns: parse_manifest_from_dbt_generated_manifest