<commit_before>import argparse
import logging

from .base import append_doc_link
from .base import CmdBaseNoRepo
from dvc.exceptions import DvcException


logger = logging.getLogger(__name__)


class CmdGet(CmdBaseNoRepo):
    def run(self):
        from dvc.repo import Repo

        try:
            Repo.get(
                self.args.url,
                path=self.args.path,
                out=self.args.out,
                rev=self.args.rev,
            )
            return 0
        except DvcException:
            logger.exception(
                "failed to get '{}' from '{}'".format(
                    self.args.path, self.args.url
                )
            )
            return 1


def add_parser(subparsers, parent_parser):
    GET_HELP = "Download/copy files or directories from DVC repository."
    get_parser = subparsers.add_parser(
        "get",
        parents=[parent_parser],
        description=append_doc_link(GET_HELP, "get"),
        help=GET_HELP,
        formatter_class=argparse.RawDescriptionHelpFormatter,
    )
    get_parser.add_argument(
        "url", help="URL of Git repository with DVC project to download from."
    )
    get_parser.add_argument(
        "path", help="Path to a file or directory within a DVC repository."
    )
    get_parser.add_argument(
        "-o",
        "--out",
        nargs="?",
        help="Destination path to copy/download files to.",
    )
    get_parser.add_argument(
        "--rev", nargs="?", help="DVC repository git revision."
    )
    get_parser.set_defaults(func=CmdGet)<commit_msg>doc: change get documentation so that it doesn't imply the target must be DVC enabled<commit_after>import argparse
import logging

from .base import append_doc_link
from .base import CmdBaseNoRepo
from dvc.exceptions import DvcException


logger = logging.getLogger(__name__)


class CmdGet(CmdBaseNoRepo):
    def run(self):
        from dvc.repo import Repo

        try:
            Repo.get(
                self.args.url,
                path=self.args.path,
                out=self.args.out,
                rev=self.args.rev,
            )
            return 0
        except DvcException:
            logger.exception(
                "failed to get '{}' from '{}'".format(
                    self.args.path, self.args.url
                )
            )
            return 1


def add_parser(subparsers, parent_parser):
    GET_HELP = "Download/copy files or directories from git repository."
    get_parser = subparsers.add_parser(
        "get",
        parents=[parent_parser],
        description=append_doc_link(GET_HELP, "get"),
        help=GET_HELP,
        formatter_class=argparse.RawDescriptionHelpFormatter,
    )
    get_parser.add_argument(
        "url", help="URL of Git repository to download from."
    )
    get_parser.add_argument(
        "path", help="Path to a file or directory within the repository."
    )
    get_parser.add_argument(
        "-o",
        "--out",
        nargs="?",
        help="Destination path to copy/download files to.",
    )
    get_parser.add_argument(
        "--rev", nargs="?", help="Repository git revision."
    )
    get_parser.set_defaults(func=CmdGet)
{'fraction_non_alphanumeric': 0.09696590553644041, 'fraction_numerical': 0.0012511729746637473, 'mean_word_length': 2.016981132075472, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5678469', 'n_tokens_mistral': 944, 'n_tokens_neox': 913, 'n_words': 222}