Skip to content

Commit

Permalink
Merge pull request #912 from fabiosantoscode/feature/get-non-dvc
Browse files Browse the repository at this point in the history
DOC: reflect the fact that get allows for non-DVC repositories
  • Loading branch information
jorgeorpinel authored Jan 15, 2020
2 parents ae4d9d7 + 2b35b5b commit 49eb5ec
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 42 deletions.
36 changes: 18 additions & 18 deletions public/static/docs/command-reference/get.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# get

Download a file or directory from any <abbr>DVC project</abbr> or Git repository
(e.g. hosted on GitHub) into the current working directory.
into the current working directory.

> Unlike `dvc import`, this command does not track the downloaded files (does
> not create a DVC-file).
Expand All @@ -12,37 +12,37 @@ Download a file or directory from any <abbr>DVC project</abbr> or Git repository
usage: dvc get [-h] [-q | -v] [-o [OUT]] [--rev [REV]] url path
positional arguments:
url URL of Git repository with DVC project to download from.
path Path to a file or directory within a DVC repository.
url Location of DVC project or Git repository to download from
path Path to a file or directory within the project or repository
```

## Description

Provides an easy way to download files or directories tracked in any <abbr>DVC
repository</abbr>, both by Git (e.g. source code) or DVC (e.g. datasets, ML
models). The file or directory in path is copied to the current working
directory. (For remote URLs, it works like downloading with wget, but supporting
DVC <abbr>data artifacts</abbr>.)
project</abbr> (e.g. datasets, ML models), or Git repository (e.g. source code,
small images or data files). The file or directory in path is copied to the
current working directory. (For remote URLs, it works like downloading with
wget, but supporting DVC <abbr>data artifacts</abbr> and files tracked by Git.)

Note that this command doesn't require an existing DVC project to run in. It's a
single-purpose command that can be used out of the box after installing DVC.

The `url` argument specifies the address of the Git repository containing the
external <abbr>project</abbr>. Both HTTP and SSH protocols are supported for
online repositories (e.g. `[user@]server:project.git`). `url` can also be a
The `url` argument specifies the address of the <abbr>DVC project</abbr> or Git
repository containing the data source. Both HTTP and SSH protocols are supported
for online repositories (e.g. `[user@]server:project.git`). `url` can also be a
local file system path to an "offline" repository (in this case and if it
doesn't have a default remote set up, instead of downloading, DVC will try to
copy the target data from the external source project or its
<abbr>cache</abbr>).

The `path` argument of this command is used to specify the location, within the
source repository at `url`, of the target(s) to be downloaded. It can point to
any file or directory in the source project, including <abbr>outputs</abbr>
tracked by DVC as well as files tracked by Git. Note that for the former, data
should be specified in one of the [DVC-files](/doc/user-guide/dvc-file-format)
of the source repository. (In this case, a default
[DVC remote](/doc/command-reference/remote) needs to be configured in the
project, containing the actual data.)
source project or repository at `url`, of the target(s) to be downloaded. It can
point to any file or directory in the source project, including <abbr>outputs
</abbr> tracked by DVC as well as files tracked by Git. Note that for the
former, data should be specified in one of the
[DVC-files](/doc/user-guide/dvc-file-format) of the source repository. (In this
case, a default [DVC remote](/doc/command-reference/remote) needs to be
configured in the project, containing the actual data.)

> See `dvc get-url` to download data from other supported URLs.
Expand All @@ -60,7 +60,7 @@ name.

- `--rev` - specific
[Git revision](https://git-scm.com/book/en/v2/Git-Internals-Git-References)
(such as a branch name, a tag, or a commit hash) of the DVC repository to
(such as a branch name, a tag, or a commit hash) of the Git repository to
download the file or directory from. The tip of the default branch is used by
default when this option is not specified.

Expand Down
43 changes: 22 additions & 21 deletions public/static/docs/command-reference/import.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# import

Download a file or directory from any <abbr>DVC repository</abbr> (e.g. hosted
on GitHub) into the <abbr>workspace</abbr>. This also creates a
Download a file or directory from any <abbr>DVC project</abbr> or Git repository
into the <abbr>workspace</abbr>. This also creates a
[DVC-file](/doc/user-guide/dvc-file-format) with information about the data
source, which can later be used to [update](/doc/command-reference/update) the
import.
Expand All @@ -15,36 +15,37 @@ import.
usage: dvc import [-h] [-q | -v] [-o [OUT]] [--rev [REV]] url path
positional arguments:
url URL of Git repository with DVC project to download from.
path Path to data within DVC repository.
url Location of DVC project or Git repository to download from
path Path to a file or directory within the project or repository
```

## Description

DVC provides an easy way to reuse datasets, intermediate results, ML models, or
other files and directories tracked in another <abbr>DVC repository</abbr> into
the workspace. The `dvc import` command downloads such a <abbr>data
artifact</abbr> in a way that it is tracked with DVC, so it can be updated when
the data source changes. (See `dvc update`.)
Provides an easy way to reuse files or directories tracked in any <abbr>DVC
project</abbr> (e.g. datasets, intermediate results, ML models) or Git
repository (e.g. other files and directories), into the workspace. The
`dvc import` command downloads such a <abbr>data artifact</abbr> in a way that
it is tracked with DVC, so it can be updated when the data source changes. (See
`dvc update`.)

The `url` argument specifies the address of the Git repository containing the
source <abbr>project</abbr>. Both HTTP and SSH protocols are supported for
online repositories (e.g. `[user@]server:project.git`). `url` can also be a
The `url` argument specifies the address of the <abbr>DVC project</abbr> or Git
repository containing the data source. Both HTTP and SSH protocols are supported
for online repositories (e.g. `[user@]server:project.git`). `url` can also be a
local file system path to an "offline" repository (in this case and if it
doesn't have a default remote set up, instead of downloading, DVC will try to
copy the target data from the external source project or its
<abbr>cache</abbr>).

The `path` argument of this command is used to specify the location, within the
source repository at `url`, of the target(s) to be downloaded. It can point to
any file or directory in the source project, including <abbr>outputs</abbr>
tracked by DVC as well as files tracked by Git. Note that for the former, data
should be specified in one of the [DVC-files](/doc/user-guide/dvc-file-format)
of the source repository. (In this case, a default
[DVC remote](/doc/command-reference/remote) needs to be configured in the
project, containing the actual data.)
source project or repository at `url`, of the target(s) to be downloaded. It can
point to any file or directory in the source project, including <abbr>outputs
</abbr> tracked by DVC as well as files tracked by Git. Note that for the
former, data should be specified in one of the
[DVC-files](/doc/user-guide/dvc-file-format) of the source repository. (In this
case, a default [DVC remote](/doc/command-reference/remote) needs to be
configured in the project, containing the actual data.)

> See `dvc import-url` to download and tack data from other supported URLs.
> See `dvc import-url` to download and track data from other supported URLs.
After running this command successfully, the imported data is placed in the
current working directory with its original file name e.g. `data.txt`. An
Expand Down Expand Up @@ -76,7 +77,7 @@ data artifact from the source project.

- `--rev` - specific
[Git revision](https://git-scm.com/book/en/v2/Git-Internals-Git-References)
(such as a branch name, a tag, or a commit hash) of the DVC repository to
(such as a branch name, a tag, or a commit hash) of the Git repository to
import the data from. The tip of the repository's default branch is used by
default when this option is not specified. Note that this adds a `rev` field
in the import stage that fixes it to this revision. This can impact the
Expand Down
2 changes: 1 addition & 1 deletion public/static/docs/tutorials/pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ $ git commit -m "Download and add code to new Git repo"
> `dvc get` can use any <abbr>DVC project</abbr> hosted on a Git repository to
> find the appropriate [remote storage](/doc/command-reference/remote) and
> download <abbr>data artifacts</abbr> from it. (It works like `wget`, but for
> DVC repositories.) In this case we use
> DVC or Git repositories.) In this case we use
> [dataset-registry](https://github.com/iterative/dataset-registry)) as the
> source project. (Refer to [Data Registries](/doc/use-cases/data-registries)
> for more info about this setup.)
Expand Down
4 changes: 2 additions & 2 deletions public/static/docs/user-guide/external-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ determine whether the source has changed and we need to download the file again.
## Example: Using import
`dvc import` can download a <abbr>data artifact</abbr> from any <abbr>DVC
repository</abbr>. It also creates an external dependency in its <abbr>import
stage</abbr> (DVC-file).
project</abbr> or Git repository. It also creates an external dependency in its
<abbr>import stage</abbr> (DVC-file).

```dvc
$ dvc import [email protected]:iterative/example-get-started model.pkl
Expand Down

0 comments on commit 49eb5ec

Please sign in to comment.