Skip to content

Commit

Permalink
import/import-url/update: add --no-download flag
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrifiro authored and bretello committed Aug 25, 2022
1 parent 2305be0 commit 904c474
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
12 changes: 8 additions & 4 deletions content/docs/command-reference/import-url.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ etc.), and download it to the local project, or make a copy in

```usage
usage: dvc import-url [-h] [-q | -v] [-j <number>] [--file <filename>]
[--no-exec] [--to-remote] [-r <name>]
[--no-exec | --no-download] [--to-remote] [-r <name>]
[--desc <text>]
url [out]
Expand Down Expand Up @@ -136,9 +136,13 @@ produces a regular stage in `dvc.yaml`.

- `--no-exec` - create the import `.dvc` file but don't download `url` (assumes
that the data source is valid). This is useful if you need to define the
project imports quickly, and download everything later (use `dvc update` to
finish the operation(s)); or if the target data already exist locally and you
want to "DVCfy" this state of the project (see also `dvc commit`).
project imports quickly, and import the data later (use `dvc update` to finish
the operation(s)).

- `--no-download` - create the import `.dvc` with data checksums but without
downloading the associated data. This is useful if you need track changes in
remote data but do not (yet) need to download data to the local workspace.
Data can be later downloaded using `dvc pull`.

- `--to-remote` - import a target, but neither move it into the workspace, nor
cache it. [Transfer it](#example-transfer-to-remote-storage) directly to
Expand Down
12 changes: 8 additions & 4 deletions content/docs/command-reference/import.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Download a file or directory tracked by another DVC or Git repository into the
```usage
usage: dvc import [-h] [-q | -v] [-j <number>]
[-o <path>] [--file <filename>]
[--rev <commit>] [--no-exec] [--desc <text>]
[--rev <commit>] [--no-exec | --no-download] [--desc <text>]
url path
positional arguments:
Expand Down Expand Up @@ -105,9 +105,13 @@ To actually [version the data](/doc/start/data-and-model-versioning), `git add`
- `--no-exec` - create the import `.dvc` file but don't download `url` (assumes
that the data source is valid). This is useful if you need to define the
project imports quickly, and download everything later (use `dvc update` to
finish the operation(s)); or if the target data already exist locally and you
want to "DVCfy" this state of the project (see also `dvc commit`).
project imports quickly, and import the data later (use `dvc update` to finish
the operation(s)).

- `--no-download` - create the import `.dvc` with data checksums but without
downloading the associated data. This is useful if you need track changes in
remote data but do not (yet) need to download data to the local workspace.
Data can be later downloaded using `dvc pull`.

- `-j <number>`, `--jobs <number>` - parallelism level for DVC to download data
from the remote. The default value is `4 * cpu_count()`. Using more jobs may
Expand Down
7 changes: 6 additions & 1 deletion content/docs/command-reference/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import `.dvc` files.
## Synopsis

```usage
usage: dvc update [-h] [-q | -v] [--rev <commit>] [-R] [--to-remote]
usage: dvc update [-h] [-q | -v] [--rev <commit>] [-R] [--no-download] [--to-remote]
[-r <name>] [-j <number>] targets [targets ...]
positional arguments:
Expand Down Expand Up @@ -50,6 +50,11 @@ $ dvc update --rev master
directory and its subdirectories for import `.dvc` files to inspect. If there
are no directories among the targets, this option has no effect.

- `--no-download` - Update hash values in the `.dvc` file (`md5`, `etag`, or
`checksum` fields) without actually downloading the latest data. See
`dvc import-url --no-download`/`dvc import --no-download` for more context.
Cannot be combined with `--to-remote`.

- `--to-remote` - update a `.dvc` file created with `dvc import-url` without
downloading the latest data.
[Transfer it](/doc/command-reference/import-url#example-transfer-to-remote-storage)
Expand Down

0 comments on commit 904c474

Please sign in to comment.