From ad1204a9861ce4eb4729c951b3f3ea3ca4da4bb5 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Tue, 10 Sep 2019 00:17:27 +0300 Subject: [PATCH] docs: run: add --always-changed flag As per https://github.com/iterative/dvc/pull/2479 --- static/docs/commands-reference/run.md | 5 +++++ static/docs/commands-reference/status.md | 5 +++-- static/docs/user-guide/dvc-file-format.md | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/static/docs/commands-reference/run.md b/static/docs/commands-reference/run.md index 4ef369323f..b00255933d 100644 --- a/static/docs/commands-reference/run.md +++ b/static/docs/commands-reference/run.md @@ -10,6 +10,7 @@ usage: dvc run [-h] [-q | -v] [-d DEPS] [-o OUTS] [-O OUTS_NO_CACHE] [-m METRICS] [-M METRICS_NO_CACHE] [-f FILE] [-c CWD] [-w WDIR] [--no-exec] [-y] [--overwrite-dvcfile] [--ignore-build-cache] [--remove-outs] [--no-commit] + [--always-changed] command positional arguments: @@ -143,6 +144,10 @@ pipeline. > The `dvc status` command will mention that the file is `not in cache`. +- `--always-changed` - always consider this DVC-file as changed. As a result + `dvc status` will report it as `always changed` and `dvc repro` will always + run it. + - `-h`, `--help` - prints the usage/help message, and exit. - `-q`, `--quiet` - do not write anything to standard output. Exit with 0 if no diff --git a/static/docs/commands-reference/status.md b/static/docs/commands-reference/status.md index 2e62d309bd..fab8a46ff2 100644 --- a/static/docs/commands-reference/status.md +++ b/static/docs/commands-reference/status.md @@ -64,8 +64,9 @@ outputs described in it. (e.g. someone manually edited the file). - _always changed_ means that this is a special DVC-file with no dependencies - (orphans), which is considered always changed and is always executed by - `dvc repro`. + (orphans) or it has `always_changed: true` option set (see + [`--always-changed` flag for `dvc run`](/doc/commands-reference/run)), which + is considered always changed and is always executed by `dvc repro`. - _changed deps_ or _changed outs_ means that there are changes in dependencies or outputs defined by the DVC-file. Depending on the use case, diff --git a/static/docs/user-guide/dvc-file-format.md b/static/docs/user-guide/dvc-file-format.md index ba60116aec..82875663c4 100644 --- a/static/docs/user-guide/dvc-file-format.md +++ b/static/docs/user-guide/dvc-file-format.md @@ -13,6 +13,7 @@ the highlighting for your editor. Here is a sample DVC-file: ```yaml +always_changed: true locked: true cmd: python cmd.py input.data output.data metrics.json deps: @@ -51,6 +52,8 @@ On the top level, `.dvc` file consists of these fields: - `md5`: md5 checksum for this DVC-file - `locked`: Whether or not this stage is locked from reproduction - `wdir`: Directory to run command in (default `.`) +- `always_changed`: Whether or not this stage should always be considered as + changed by commands such as `dvc status` and `dvc repro` (default `false`) A dependency entry consists of a pair of fields: