From d146a874ea0c8d98e14eeed3d0623a769821cefb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniele=20Trifir=C3=B2?= Date: Thu, 25 Aug 2022 19:08:00 +0200 Subject: [PATCH] import/import-url/update: add --no-download flag related: iterative/dvc#7918 --- content/docs/command-reference/import-url.md | 12 ++++++++---- content/docs/command-reference/import.md | 12 ++++++++---- content/docs/command-reference/update.md | 7 ++++++- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/content/docs/command-reference/import-url.md b/content/docs/command-reference/import-url.md index 0134d03db8a..ceeb623ac67 100644 --- a/content/docs/command-reference/import-url.md +++ b/content/docs/command-reference/import-url.md @@ -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 ] [--file ] - [--no-exec] [--to-remote] [-r ] + [--no-exec | --no-download] [--to-remote] [-r ] [--desc ] url [out] @@ -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 diff --git a/content/docs/command-reference/import.md b/content/docs/command-reference/import.md index dd8a1cbce9b..971caaf10a7 100644 --- a/content/docs/command-reference/import.md +++ b/content/docs/command-reference/import.md @@ -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 ] [-o ] [--file ] - [--rev ] [--no-exec] [--desc ] + [--rev ] [--no-exec | --no-download] [--desc ] url path positional arguments: @@ -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 `, `--jobs ` - parallelism level for DVC to download data from the remote. The default value is `4 * cpu_count()`. Using more jobs may diff --git a/content/docs/command-reference/update.md b/content/docs/command-reference/update.md index 06f01ae65ca..e7ce976871d 100644 --- a/content/docs/command-reference/update.md +++ b/content/docs/command-reference/update.md @@ -7,7 +7,7 @@ import `.dvc` files. ## Synopsis ```usage -usage: dvc update [-h] [-q | -v] [--rev ] [-R] [--to-remote] +usage: dvc update [-h] [-q | -v] [--rev ] [-R] [--no-download] [--to-remote] [-r ] [-j ] targets [targets ...] positional arguments: @@ -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)