          msg.fail(
              f"Can't clone project, parent directory doesn't exist: {dest.parent}",
              exits=1,
          )
  
  
  def get_hash(data) -> str:
      data_str = srsly.json_dumps(data, sort_keys=True).encode("utf8")
      return hashlib.md5(data_str).hexdigest()
  
  
  def get_checksum(path: Path) -> str:
      return hashlib.md5(path.read_bytes()).hexdigest()
 
</s> remove def check_clone_dest(dest: Path) -> None:
    """Check and validate that the destination path can be used to clone."""
 </s> add     name (str): Name of the directory to clone from the repo.
    dest (Path): Local destination of cloned directory.
    repo (str): URL of the repo to clone from.
    """
    try:
        subprocess.run(["git", "--version"], stdout=subprocess.DEVNULL)
    except Exception:
        msg.fail(
            f"Cloning spaCy project templates requires Git and the 'git' command. ",
            f"To clone a project without Git, copy the files from the '{name}' "
            f"directory in the {repo} to {dest} manually and then run:",
            f"{COMMAND} project init {dest}",
            exits=1,
        ) </s> remove         # url.replace("github.com", "raw.githubusercontent.com").replace("/blob/", "/").replace("/tree/", "/")
 </s> add         return converted
    return url
 </s> remove def setup_check_dvc(project_path: Path, config: Dict[str, Any]) -> None:
    if not (project_path / ".dvc").exists():
        msg.fail("Project not initialized as a DVC project", exits=1)
 </s> add def ensure_dvc() -> None:
    """Ensure that the "dvc" command is available and show an error if not."""
    try:
        subprocess.run(["dvc", "--version"], stdout=subprocess.DEVNULL)
    except Exception:
        msg.fail(
            "spaCy projects require DVC (Data Version Control) and the 'dvc' command",
            "You can install the Python package from pip (pip install dvc) or "
            "conda (conda install -c conda-forge dvc). For more details, see the "
            "documentation: https://dvc.org/doc/install",
            exits=1,
        )


def setup_check_dvc(project_dir: Path, config: Dict[str, Any]) -> None:
    """Check that the project is set up correctly with DVC and update its
    config if needed. Will raise an error if the project is not an initialized
    DVC project.

    project_dir (Path): The path to the project directory.
    config (Dict[str, Any]): The loaded project config.
    """
    if not project_dir.exists():
        msg.fail(f"Can't find project directory: {project_dir}")
    if not (project_dir / ".dvc").exists():
        msg.fail(
            "Project not initialized as a DVC project.",
            f"Make sure that the project template was cloned correctly. To "
            f"initialize the project directory manually, you can run: "
            f"{COMMAND} project init {project_dir}",
            exits=1,
        )
          msg.fail(
              f"Can't clone project, parent directory doesn't exist: {dest.parent}",
              exits=1,
          )









keep keep keep keep replace replace replace replace replace replace replace replace replace
 Tidy up, document and add custom clone logic 
spacy/cli/project.py