From 49c75dfd4e9ae01911277970aabc38203c0ccd4f Mon Sep 17 00:00:00 2001 From: RMCrean Date: Fri, 28 Mar 2025 08:37:02 +0100 Subject: [PATCH 1/4] docs: show default remote in dvc remote list Updats the documentation/usage of `dvc remote list` command to reference that the default remote is indicated in the output. --- content/docs/command-reference/pull.md | 4 +++- content/docs/command-reference/push.md | 4 +++- content/docs/command-reference/remote/default.md | 11 +++++++++++ content/docs/command-reference/remote/index.md | 7 +++++-- content/docs/command-reference/remote/list.md | 9 ++++++--- 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/content/docs/command-reference/pull.md b/content/docs/command-reference/pull.md index e81dc6fb48..d136cb5531 100644 --- a/content/docs/command-reference/pull.md +++ b/content/docs/command-reference/pull.md @@ -237,9 +237,11 @@ context for the example, let's define a default SSH remote: ```cli $ dvc remote add -d r1 ssh://user@example.com/path/to/dvc/remote/storage $ dvc remote list -r1 ssh://user@example.com/path/to/dvc/remote/storage +* r1 ssh://user@example.com/path/to/dvc/remote/storage ``` +(The prefixed `*` indicates `r1` is the default remote) + DVC supports [several storage types]. diff --git a/content/docs/command-reference/push.md b/content/docs/command-reference/push.md index 95360cef8d..5bb9cbe1c2 100644 --- a/content/docs/command-reference/push.md +++ b/content/docs/command-reference/push.md @@ -127,9 +127,11 @@ use `dvc remote list` to check them: ```cli $ dvc remote list -r1 ssh://user@example.com/path/to/dvc/cache/directory +* r1 ssh://user@example.com/path/to/dvc/cache/directory ``` +(The prefixed `*` indicates r1 is the default remote.) + Push entire data cache from the current workspace to diff --git a/content/docs/command-reference/remote/default.md b/content/docs/command-reference/remote/default.md index eff31fa717..d7a05acce1 100644 --- a/content/docs/command-reference/remote/default.md +++ b/content/docs/command-reference/remote/default.md @@ -41,6 +41,9 @@ is omitted. You can also use `dvc config`, `dvc remote add`, or `dvc remote modify` commands to set/unset/change the default remote. +If a default remote is set that remote will be prefixed by a `*` in the output +of the `dvc remote list` command. + Remotes are read from the system, global, project, and local config files (in that order). @@ -85,6 +88,14 @@ $ dvc remote default myremote ``` +See the default remote (prefixed with a `*`) by listing all remotes: + +```cli +$ dvc remote list +* myremote /path/to/remote + otherremote /path/to/other/remote +``` + Change default remote value: ```cli diff --git a/content/docs/command-reference/remote/index.md b/content/docs/command-reference/remote/index.md index 72b1b6845a..ef3e9c34da 100644 --- a/content/docs/command-reference/remote/index.md +++ b/content/docs/command-reference/remote/index.md @@ -82,10 +82,13 @@ The project's config file should now look like this: ```cli $ dvc remote list -myremote /path/to/remote -newremote s3://mybucket/path +* myremote /path/to/remote + newremote s3://mybucket/path ``` +The remote prefixed with a `*` indicates it is the default remote, see +[`dvc remote default`](/doc/command-reference/remote/default) + ## Example: Customize an additional S3 remote > 💡 Before adding an S3 remote, be sure to diff --git a/content/docs/command-reference/remote/list.md b/content/docs/command-reference/remote/list.md index 5d23781f1c..2297ce14b1 100644 --- a/content/docs/command-reference/remote/list.md +++ b/content/docs/command-reference/remote/list.md @@ -13,7 +13,8 @@ usage: dvc remote list [-h] [--global | --system | --project | --local] Reads [DVC configuration] and prints the list of available remotes, including their names and URLs/paths. Remotes are read from the system, global, project, and local -config files (in that order). +config files (in that order). The default remote (if set) will be prefixed with a +`*`. [dvc configuration]: /doc/user-guide/project-structure/configuration#remote @@ -51,10 +52,12 @@ And now the list of remotes should look like: ```cli $ dvc remote list -myremote /path/to/remote +* myremote /path/to/remote + otherremote /path/to/other/remote ``` -The list will also include any previously added remotes. +The list will also include any previously added remotes, and the default remote +is indicated by a prefixed `*`. [local remote]: /doc/user-guide/data-management/remote-storage#file-systems-local-remotes From b5f656861ff4edb4b98d36dcd02ad9c3f9c540cf Mon Sep 17 00:00:00 2001 From: RMCrean Date: Mon, 7 Apr 2025 21:29:01 +0200 Subject: [PATCH 2/4] docs: default remote is shown in dvc remote list Updats the documentation/usage of `dvc remote list` command to reference that the default remote is now shown in the output. --- content/docs/command-reference/pull.md | 8 +++++--- content/docs/command-reference/push.md | 7 +++---- content/docs/command-reference/remote/default.md | 9 ++++----- content/docs/command-reference/remote/index.md | 7 ++----- content/docs/command-reference/remote/list.md | 9 ++++----- 5 files changed, 18 insertions(+), 22 deletions(-) diff --git a/content/docs/command-reference/pull.md b/content/docs/command-reference/pull.md index d136cb5531..97b1b066b3 100644 --- a/content/docs/command-reference/pull.md +++ b/content/docs/command-reference/pull.md @@ -235,12 +235,14 @@ use `dvc remote list` to check them. To remember how it's done, and set a context for the example, let's define a default SSH remote: ```cli -$ dvc remote add -d r1 ssh://user@example.com/path/to/dvc/remote/storage +$ dvc remote add -d r1 \ + ssh://user@example.com/project/data/cache $ dvc remote list -* r1 ssh://user@example.com/path/to/dvc/remote/storage +r1 ssh://user@example.com/project/data/cache (default) +r2 ssh://user@example.com/other/storage ``` -(The prefixed `*` indicates `r1` is the default remote) +Note that the default remote (if set) is also indicated when you run `dvc remote list`. diff --git a/content/docs/command-reference/push.md b/content/docs/command-reference/push.md index 5bb9cbe1c2..3837d655aa 100644 --- a/content/docs/command-reference/push.md +++ b/content/docs/command-reference/push.md @@ -117,7 +117,7 @@ also `dvc remote add --default`). Let's see an SSH remote example: ```cli $ dvc remote add --default r1 \ - ssh://user@example.com/path/to/dvc/cache/directory + ssh://user@example.com/project/data/cache ``` @@ -127,11 +127,10 @@ use `dvc remote list` to check them: ```cli $ dvc remote list -* r1 ssh://user@example.com/path/to/dvc/cache/directory +r1 ssh://user@example.com/project/data/cache (default) +r2 ssh://user@example.com/other/storage ``` -(The prefixed `*` indicates r1 is the default remote.) - Push entire data cache from the current workspace to diff --git a/content/docs/command-reference/remote/default.md b/content/docs/command-reference/remote/default.md index d7a05acce1..365aee7b98 100644 --- a/content/docs/command-reference/remote/default.md +++ b/content/docs/command-reference/remote/default.md @@ -41,8 +41,7 @@ is omitted. You can also use `dvc config`, `dvc remote add`, or `dvc remote modify` commands to set/unset/change the default remote. -If a default remote is set that remote will be prefixed by a `*` in the output -of the `dvc remote list` command. +If a default remote is set, the output of the `dvc remote list` command will specify it, see [the examples below](#examples). Remotes are read from the system, global, project, and local config files (in that order). @@ -88,12 +87,12 @@ $ dvc remote default myremote ``` -See the default remote (prefixed with a `*`) by listing all remotes: +See the default remote (if set) by listing all remotes: ```cli $ dvc remote list -* myremote /path/to/remote - otherremote /path/to/other/remote +myremote /path/to/remote (default) +otherremote /path/to/other/remote ``` Change default remote value: diff --git a/content/docs/command-reference/remote/index.md b/content/docs/command-reference/remote/index.md index ef3e9c34da..33cc99a33a 100644 --- a/content/docs/command-reference/remote/index.md +++ b/content/docs/command-reference/remote/index.md @@ -82,13 +82,10 @@ The project's config file should now look like this: ```cli $ dvc remote list -* myremote /path/to/remote - newremote s3://mybucket/path +myremote /path/to/remote (default) +newremote s3://mybucket/path ``` -The remote prefixed with a `*` indicates it is the default remote, see -[`dvc remote default`](/doc/command-reference/remote/default) - ## Example: Customize an additional S3 remote > 💡 Before adding an S3 remote, be sure to diff --git a/content/docs/command-reference/remote/list.md b/content/docs/command-reference/remote/list.md index 2297ce14b1..0236401d30 100644 --- a/content/docs/command-reference/remote/list.md +++ b/content/docs/command-reference/remote/list.md @@ -13,8 +13,7 @@ usage: dvc remote list [-h] [--global | --system | --project | --local] Reads [DVC configuration] and prints the list of available remotes, including their names and URLs/paths. Remotes are read from the system, global, project, and local -config files (in that order). The default remote (if set) will be prefixed with a -`*`. +config files (in that order). The default remote (if set) will be specified in the output (see [the examples below](#examples)). [dvc configuration]: /doc/user-guide/project-structure/configuration#remote @@ -52,12 +51,12 @@ And now the list of remotes should look like: ```cli $ dvc remote list -* myremote /path/to/remote - otherremote /path/to/other/remote +myremote /path/to/remote (default) +otherremote /path/to/other/remote ``` The list will also include any previously added remotes, and the default remote -is indicated by a prefixed `*`. +(if set). [local remote]: /doc/user-guide/data-management/remote-storage#file-systems-local-remotes From 87a3beae08a1f5401f9da3c1bc00cf840e86710e Mon Sep 17 00:00:00 2001 From: Ivan Shcheklein Date: Mon, 7 Apr 2025 16:58:22 -0700 Subject: [PATCH 3/4] lint --- content/docs/command-reference/remote/list.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/docs/command-reference/remote/list.md b/content/docs/command-reference/remote/list.md index 0236401d30..0fdea7d5e7 100644 --- a/content/docs/command-reference/remote/list.md +++ b/content/docs/command-reference/remote/list.md @@ -13,7 +13,8 @@ usage: dvc remote list [-h] [--global | --system | --project | --local] Reads [DVC configuration] and prints the list of available remotes, including their names and URLs/paths. Remotes are read from the system, global, project, and local -config files (in that order). The default remote (if set) will be specified in the output (see [the examples below](#examples)). +config files (in that order). The default remote (if set) will be specified in the +output (see [the examples below](#examples)). [dvc configuration]: /doc/user-guide/project-structure/configuration#remote From e2945cad92b24a71058acd3e1e19aa476406b74b Mon Sep 17 00:00:00 2001 From: RMCrean Date: Tue, 8 Apr 2025 16:12:05 +0200 Subject: [PATCH 4/4] Lint PR modified files Run "yarn format-check-all --write" to fix linting issues in the files I modified --- content/docs/command-reference/pull.md | 3 ++- content/docs/command-reference/remote/default.md | 3 ++- content/docs/command-reference/remote/list.md | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/content/docs/command-reference/pull.md b/content/docs/command-reference/pull.md index 97b1b066b3..39b7c391b0 100644 --- a/content/docs/command-reference/pull.md +++ b/content/docs/command-reference/pull.md @@ -242,7 +242,8 @@ r1 ssh://user@example.com/project/data/cache (default) r2 ssh://user@example.com/other/storage ``` -Note that the default remote (if set) is also indicated when you run `dvc remote list`. +Note that the default remote (if set) is also indicated when you run +`dvc remote list`. diff --git a/content/docs/command-reference/remote/default.md b/content/docs/command-reference/remote/default.md index 365aee7b98..d77d2dbb6b 100644 --- a/content/docs/command-reference/remote/default.md +++ b/content/docs/command-reference/remote/default.md @@ -41,7 +41,8 @@ is omitted. You can also use `dvc config`, `dvc remote add`, or `dvc remote modify` commands to set/unset/change the default remote. -If a default remote is set, the output of the `dvc remote list` command will specify it, see [the examples below](#examples). +If a default remote is set, the output of the `dvc remote list` command will +specify it, see [the examples below](#examples). Remotes are read from the system, global, project, and local config files (in that order). diff --git a/content/docs/command-reference/remote/list.md b/content/docs/command-reference/remote/list.md index 0fdea7d5e7..6ce4006aa8 100644 --- a/content/docs/command-reference/remote/list.md +++ b/content/docs/command-reference/remote/list.md @@ -14,7 +14,7 @@ usage: dvc remote list [-h] [--global | --system | --project | --local] Reads [DVC configuration] and prints the list of available remotes, including their names and URLs/paths. Remotes are read from the system, global, project, and local config files (in that order). The default remote (if set) will be specified in the -output (see [the examples below](#examples)). +output (see [the examples below](#examples)). [dvc configuration]: /doc/user-guide/project-structure/configuration#remote @@ -57,7 +57,7 @@ otherremote /path/to/other/remote ``` The list will also include any previously added remotes, and the default remote -(if set). +(if set). [local remote]: /doc/user-guide/data-management/remote-storage#file-systems-local-remotes