code: def from_args(cls, args):
          
          # build the project and read in packages.yml
          project = Project.from_args(args)
  
          # build the profile
          profile = Profile.from_args(
              args=args,
              project_profile_name=project.profile_name
          )
  
          return cls.from_parts(
              project=project,
              profile=profile,
              args=args
          )
docs: Given arguments, read in dbt_project.yml from the current directory,
          read in packages.yml if it exists, and use them to find the profile to
          load.
  
          :param args argparse.Namespace: The arguments as parsed from the cli.
          :raises DbtProjectError: If the project is invalid or missing.
          :raises DbtProfileError: If the profile is invalid or missing.
          :raises ValidationException: If the cli variables are invalid.