Skip to content

Commit

Permalink
cmd: update motivation for --no-exec
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeorpinel committed Dec 13, 2020
1 parent cf34cf6 commit 11c2768
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 24 deletions.
8 changes: 4 additions & 4 deletions content/docs/command-reference/commit.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ next.

Mainly, `dvc commit` provides a way to complete DVC commands that track data
(`dvc add`, `dvc repro`, `dvc import`, etc.), when they have been used with the
`--no-commit` or `--no-exec` options. Those options cause the commands to skip
these step(s) of the tracking process:
`--no-commit` or `--no-exec` options. Those options cause the command to skip
these step(s) during the process of tracking each file or directory:

- Save the hash value of the file(s) in the `dvc.lock` or `.dvc` file.
- Store the file(s) contents in the cache.
- Save the hash value of the file/dir in the `dvc.lock` or `.dvc` file.
- Store the file contents in the cache.

> Skipping these steps is typically done to avoid caching unfinished data, for
> example when exploring different data or
Expand Down
17 changes: 8 additions & 9 deletions content/docs/command-reference/import-url.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,14 @@ source.
default file name: `<file>.dvc`, where `<file>` is the desired file name of
the imported data (`out`).

- `--no-exec` - create the import `.dvc` file without actually downloading
`url`. The data hash is not calculated when this option is used, only the
import metadata is saved to the `.dvc` file. It can be useful to skip the
download if the file/directory already exists locally, for example, along with
`dvc commit` to store it in the cache and record its hash value in the `.dvc`
file.

This is useful if, for example, you need to build a project that will use
imports first, and download them all at once later (with `dvc repro`).
- `--no-exec` - create the import `.dvc` file without actually downloading `url`
e.g. if the file/directory already exists locally for some reason. The data
hash is not calculated when this option is used, only the import metadata is
saved to the `.dvc` file. You can use `dvc commit` to finish the operation.

This is useful, for example, if you need to define a project quickly (that
will use imports at a later time/location) before downloading anything, and
import everything later (with `dvc update`).

- `--desc <text>` - user description of the data (optional). This doesn't
affect any DVC operations.
Expand Down
15 changes: 7 additions & 8 deletions content/docs/command-reference/import.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,13 @@ repo at `url`) are not supported.
> example below).
- `--no-exec` - create the import `.dvc` file without actually downloading the
file or directory. The data hash is not calculated when this option is used,
only the import metadata is saved to the `.dvc` file. It can be useful to skip
the download if the file/directory already exists locally, for example, along
with `dvc commit` to store it in the cache and record its hash value in the
`.dvc` file.

This is useful if, for example, you need to build a project that will use
imports first, and download them all at once later (with `dvc repro`).
file or directory e.g. if it already exists locally for some reason. The data
hash is not calculated when this option is used, only the import metadata is
saved to the `.dvc` file. You can use `dvc commit` to finish the operation.

This is useful, for example, if you need to define a project quickly (that
will use imports at a later time/location) before downloading anything, and
import everything later (with `dvc update`).

- `--desc <text>` - user description of the data (optional). This doesn't affect
any DVC operations.
Expand Down
7 changes: 4 additions & 3 deletions content/docs/command-reference/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,9 @@ $ dvc run -n my_stage './my_script.sh $MYENVVAR'
`dvc commit` to save any existing dep/out files to the cache and record their
hashes to the lock file.

This is useful if, for example, you need to build a pipeline quickly first,
and run it all at once later (with `dvc repro`).
This is useful, for example, if you need to define a pipeline quickly (and
perhaps share it with others) before executing anything, and run all its
stages at once later (with `dvc repro`).

- `-f`, `--force` - overwrite an existing stage in `dvc.yaml` file without
asking for confirmation.
Expand All @@ -247,7 +248,7 @@ $ dvc run -n my_stage './my_script.sh $MYENVVAR'

- `--no-commit` - do not store the outputs of this execution in the cache
(`dvc.yaml` and `dvc.lock` are still created or updated); useful to avoid
caching unnecessary data when exploring different data or stages. Use
caching unnecessary data when exploring different data or stages. You can use
`dvc commit` to finish the operation.

- `--always-changed` - always consider this stage as changed (uses the
Expand Down

0 comments on commit 11c2768

Please sign in to comment.