From 620395ca4e5e81309a2d256a6819fb9742ee7bbb Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Sun, 31 May 2020 01:52:32 +0300 Subject: [PATCH 1/4] docs: rename `dvc lock` -> `dvc freeze` Per https://github.com/iterative/dvc/pull/3915 --- config/prismjs/dvc-commands.js | 4 +-- .../command-reference/{lock.md => freeze.md} | 34 +++++++++---------- .../docs/command-reference/pipeline/show.md | 2 +- .../{unlock.md => unfreeze.md} | 28 +++++++-------- content/docs/command-reference/update.md | 10 +++--- content/docs/sidebar.json | 8 ++--- redirects-list.json | 2 ++ 7 files changed, 45 insertions(+), 43 deletions(-) rename content/docs/command-reference/{lock.md => freeze.md} (58%) rename content/docs/command-reference/{unlock.md => unfreeze.md} (61%) diff --git a/config/prismjs/dvc-commands.js b/config/prismjs/dvc-commands.js index afa84fbb35..75aed63339 100644 --- a/config/prismjs/dvc-commands.js +++ b/config/prismjs/dvc-commands.js @@ -4,7 +4,7 @@ module.exports = [ 'version', 'update', 'unprotect', - 'unlock', + 'unfreeze', 'tag', 'status', 'run', @@ -36,7 +36,6 @@ module.exports = [ 'metrics', 'params diff', 'params', - 'lock', 'list', 'install', 'init', @@ -46,6 +45,7 @@ module.exports = [ 'get-url', 'get', 'gc', + 'freeze', 'fetch', 'diff', 'destroy', diff --git a/content/docs/command-reference/lock.md b/content/docs/command-reference/freeze.md similarity index 58% rename from content/docs/command-reference/lock.md rename to content/docs/command-reference/freeze.md index 3b26ea8815..7fb68fd06e 100644 --- a/content/docs/command-reference/lock.md +++ b/content/docs/command-reference/freeze.md @@ -1,32 +1,32 @@ -# lock +# freeze -Lock a [DVC-file](/doc/user-guide/dvc-file-format) -([stage](/doc/command-reference/run)). Use `dvc unlock` to unlock the file. +Freeze a [stage](/doc/command-reference/run). Use `dvc unfreeze` to unfreeze the +stage. ## Synopsis ```usage -usage: dvc lock [-h] [-q | -v] targets [targets ...] +usage: dvc freeze [-h] [-q | -v] targets [targets ...] positional arguments: - targets DVC-files to lock. + targets stages to freeze. ``` ## Description -`dvc lock` causes any DVC-file to be considered _not changed_ by `dvc status` -and `dvc repro`. Stage reproduction will not execute regenerate -outputs of locked stages, even if some dependencies have changed, +`dvc freeze` causes any stage to be considered _not changed_ by `dvc status` and +`dvc repro`. Stage reproduction will not execute the command or regenerate +outputs of frizen stages, even if some dependencies have changed, and even if `--force` is provided. -Locking a stage is useful to avoid syncing data from the top of its +Freezing a stage is useful to avoid syncing data from the top of its [pipeline](/doc/command-reference/pipeline), and keep iterating on the last -(unlocked) stages only. +(unfrozen) stages only. -Note that import stages are considered always locked. Use +Note that import stages are considered always frozen. Use `dvc update` to update the corresponding data artifacts from the -external data source. [Unlock](/doc/command-reference/unlock) them before using -`dvc repro` on a pipeline that needs their outputs. +external data source. [Unfreeze](/doc/command-reference/unfreeze) them before +using `dvc repro` on a pipeline that needs their outputs. ## Options @@ -68,10 +68,10 @@ foo.dvc changed: foo ``` -Now, let's lock the `bar` stage: +Now, let's freeze the `bar` stage: ```dvc -$ dvc lock bar.dvc +$ dvc freeze bar.dvc $ dvc status foo.dvc @@ -79,10 +79,10 @@ $ dvc status changed: foo ``` -Run `dvc unlock` to unlock it back: +Run `dvc unfreeze` to unfreeze it back: ```dvc -$ dvc unlock bar.dvc +$ dvc unfreeze bar.dvc $ dvc status bar.dvc diff --git a/content/docs/command-reference/pipeline/show.md b/content/docs/command-reference/pipeline/show.md index 8fa9e70fd1..791c64c9be 100644 --- a/content/docs/command-reference/pipeline/show.md +++ b/content/docs/command-reference/pipeline/show.md @@ -43,7 +43,7 @@ instead of stages. - `--tree` - list dependencies tree like recursive directory listing. -- `-l`, `--locked` - print locked stages only. See `dvc lock`. +- `-l`, `--locked` - print frozen stages only. See `dvc freeze`. - `-h`, `--help` - prints the usage/help message, and exit. diff --git a/content/docs/command-reference/unlock.md b/content/docs/command-reference/unfreeze.md similarity index 61% rename from content/docs/command-reference/unlock.md rename to content/docs/command-reference/unfreeze.md index 85988e2e1c..f169973887 100644 --- a/content/docs/command-reference/unlock.md +++ b/content/docs/command-reference/unfreeze.md @@ -1,27 +1,27 @@ -# unlock +# unfreeze -Unlock [DVC-file](/doc/user-guide/dvc-file-format) -([stage](/doc/command-reference/run)). See `dvc lock` for more information. +Unfreeze [stage](/doc/command-reference/run). See `dvc freeze` for more +information. ## Synopsis ```usage -usage: dvc unlock [-h] [-q | -v] targets [targets ...] +usage: dvc unfreeze [-h] [-q | -v] targets [targets ...] positional arguments: - targets DVC-files to unlock. + targets stages to unfreeze. ``` ## Description -There are several reasons that can produce data files to be locked in a DVC -project, `dvc lock` being the most obvious one. +There are several reasons that can produce data files to be frozen in a DVC +project, `dvc freeze` being the most obvious one. -If `dvc unlock` is used on locked stages, they will start to be checked by +If `dvc unfreeze` is used on frozen stages, they will start to be checked by `dvc status`, and updated by `dvc repro`. -Note that import stages are considered always locked. They can not -be unlocked. Use `dvc update` on them to update the file, directory, or +Note that import stages are considered always frozen. They can not +be unfrozen. Use `dvc update` on them to update the file, directory, or data artifact from its external data source. ## Options @@ -64,10 +64,10 @@ foo.dvc changed: foo ``` -Now, let's lock the `bar` stage: +Now, let's freeze the `bar` stage: ```dvc -$ dvc lock bar.dvc +$ dvc freeze bar.dvc $ dvc status foo.dvc @@ -75,10 +75,10 @@ $ dvc status changed: foo ``` -Run `dvc unlock` to unlock it back: +Run `dvc unfreeze` to unfreeze it back: ```dvc -$ dvc unlock bar.dvc +$ dvc unfreeze bar.dvc $ dvc status bar.dvc diff --git a/content/docs/command-reference/update.md b/content/docs/command-reference/update.md index d19bc7e657..4c6d359d99 100644 --- a/content/docs/command-reference/update.md +++ b/content/docs/command-reference/update.md @@ -23,7 +23,7 @@ imported file, directory, or data artifact up to date. To indicate which import stages to update, we must specify the corresponding DVC-file `targets` as command arguments. -Note that import stages are considered always locked, meaning that if you run +Note that import stages are considered always frozen, meaning that if you run `dvc repro`, they won't be updated. `dvc update` is the only command that can update them. @@ -68,10 +68,10 @@ Importing 'model.pkl (git@github.com:iterative/example-get-started)' ``` As DVC mentions, the import stage (DVC-file) `model.pkl.dvc` is created. This -[stage file](/doc/command-reference/run) is locked by default though, so to -[reproduce](/doc/command-reference/repro) it, we would need to run `dvc unlock` -on it first, then `dvc repro` (and `dvc lock` again). Let's just run -`dvc update` on it instead: +[stage file](/doc/command-reference/run) is frozen by default though, so to +[reproduce](/doc/command-reference/repro) it, we would need to run +`dvc unfreeze` on it first, then `dvc repro` (and `dvc freeze` again). Let's +just run `dvc update` on it instead: ```dvc $ dvc update model.pkl.dvc diff --git a/content/docs/sidebar.json b/content/docs/sidebar.json index 38c4cccfd8..84e246ff69 100644 --- a/content/docs/sidebar.json +++ b/content/docs/sidebar.json @@ -256,8 +256,8 @@ "slug": "list" }, { - "label": "lock", - "slug": "lock" + "label": "freeze", + "slug": "freeze" }, { "label": "metrics", @@ -391,8 +391,8 @@ "slug": "status" }, { - "label": "unlock", - "slug": "unlock" + "label": "unfreeze", + "slug": "unfreeze" }, { "label": "unprotect", diff --git a/redirects-list.json b/redirects-list.json index 9378bd4521..b16be8a49a 100644 --- a/redirects-list.json +++ b/redirects-list.json @@ -25,6 +25,8 @@ "^/doc/commands-reference(/.*)?$ /doc/command-reference$1", "^/doc/use-cases/data-and-model-files-versioning/?$ /doc/use-cases/versioning-data-and-model-files", "^/doc/command-reference/plot$ /doc/command-reference/plots", + "^/doc/command-reference/lock$ /doc/command-reference/freeze", + "^/doc/command-reference/unlock$ /doc/command-reference/unfreeze", "^/(.+)/$ /$1" ] From c1e4dc3c2f42f7292b5bbc3eb08f3d4cb9a10d52 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Wed, 3 Jun 2020 04:18:33 +0300 Subject: [PATCH 2/4] Update content/docs/command-reference/freeze.md Co-authored-by: Jorge Orpinel --- content/docs/command-reference/freeze.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/docs/command-reference/freeze.md b/content/docs/command-reference/freeze.md index 7fb68fd06e..b2ae679f4f 100644 --- a/content/docs/command-reference/freeze.md +++ b/content/docs/command-reference/freeze.md @@ -15,9 +15,9 @@ positional arguments: ## Description `dvc freeze` causes any stage to be considered _not changed_ by `dvc status` and -`dvc repro`. Stage reproduction will not execute the command or regenerate -outputs of frizen stages, even if some dependencies have changed, -and even if `--force` is provided. +`dvc repro`. Stage reproduction will not regenerate outputs +of frozen stages, even if some dependencies have changed, and even if +`--force` is provided. Freezing a stage is useful to avoid syncing data from the top of its [pipeline](/doc/command-reference/pipeline), and keep iterating on the last From fa0810809bb2e4908b42bdd3da1cc68aed097e64 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Wed, 3 Jun 2020 04:21:26 +0300 Subject: [PATCH 3/4] fix sidebar order --- content/docs/sidebar.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/docs/sidebar.json b/content/docs/sidebar.json index 84e246ff69..3cc03e4858 100644 --- a/content/docs/sidebar.json +++ b/content/docs/sidebar.json @@ -223,6 +223,10 @@ "katacoda": "https://katacoda.com/dvc/courses/examples/fetch" } }, + { + "label": "freeze", + "slug": "freeze" + }, { "label": "gc", "slug": "gc" @@ -255,10 +259,6 @@ "label": "list", "slug": "list" }, - { - "label": "freeze", - "slug": "freeze" - }, { "label": "metrics", "slug": "metrics", From 16b65e8b0812f58e60ffcc7129f6688b8f304e96 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Wed, 3 Jun 2020 01:21:46 +0000 Subject: [PATCH 4/4] Restyled by prettier --- content/docs/command-reference/freeze.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/docs/command-reference/freeze.md b/content/docs/command-reference/freeze.md index b2ae679f4f..006a8686ff 100644 --- a/content/docs/command-reference/freeze.md +++ b/content/docs/command-reference/freeze.md @@ -15,9 +15,9 @@ positional arguments: ## Description `dvc freeze` causes any stage to be considered _not changed_ by `dvc status` and -`dvc repro`. Stage reproduction will not regenerate outputs -of frozen stages, even if some dependencies have changed, and even if -`--force` is provided. +`dvc repro`. Stage reproduction will not regenerate outputs of +frozen stages, even if some dependencies have changed, and even if `--force` is +provided. Freezing a stage is useful to avoid syncing data from the top of its [pipeline](/doc/command-reference/pipeline), and keep iterating on the last