Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: regular updates (mid Jan) #915

Merged
merged 25 commits into from
Jan 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1c288ca
web: simplify query and hash removal from path for docs engine
jorgeorpinel Jan 9, 2020
16a26c9
cmd ref: improve `path` description in get and import
jorgeorpinel Jan 9, 2020
9dcc560
Merge branch 'master' into jorgeorpinel
jorgeorpinel Jan 12, 2020
26d9928
docs: remove all H4s
jorgeorpinel Jan 12, 2020
3450ff6
doc: capitalize all examples
jorgeorpinel Jan 12, 2020
00f4751
remote: improve index examples
jorgeorpinel Jan 12, 2020
8b1c720
Add note about --default in remote index example
jorgeorpinel Jan 12, 2020
371400b
remote: reinstated bold "headers" inside expandable sections of add
jorgeorpinel Jan 12, 2020
6309a56
user-guide: remove unnecessary note from core contrib guide
jorgeorpinel Jan 13, 2020
c88d436
cmd ref: review language around term "effect" (conditional applicabil…
jorgeorpinel Jan 13, 2020
44fe426
server: remove man.dvc.org redirect path replace exceptions
jorgeorpinel Jan 14, 2020
5c07821
user-guide: recommend Cmder for Windows terminal alt.
jorgeorpinel Jan 14, 2020
22a4044
server: no need to replace - for / in man. redirect
jorgeorpinel Jan 14, 2020
29f3b68
server: switch to HTTP 303 for most redirects
jorgeorpinel Jan 14, 2020
6f51b09
server: revert to HTTP 301 redirects for previously existing content …
jorgeorpinel Jan 14, 2020
9b81765
Merge branch 'master' into jorgeorpinel and
jorgeorpinel Jan 15, 2020
44e7fca
cmd ref: improve import (and get) desc intro
jorgeorpinel Jan 16, 2020
96232e0
get: improve notes about analogy vs. wget, and other related text
jorgeorpinel Jan 16, 2020
4950d25
remote: include -d option in crtain examples throughout website
jorgeorpinel Jan 16, 2020
6ac834e
es6: remove comments between import groups throughout
jorgeorpinel Jan 16, 2020
7ea2edb
es6: manual import sort of 3 basic files
jorgeorpinel Jan 16, 2020
3b21ffd
docs: copy edits
jorgeorpinel Jan 16, 2020
c64d590
Revert "es6: manual import sort of 3 basic files" and
jorgeorpinel Jan 18, 2020
cc37679
server: make \/(docs|documentation) redirect 301
jorgeorpinel Jan 18, 2020
86972d4
cmd ref: fix example title in get
jorgeorpinel Jan 18, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pages/doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export default function Documentation({ item, headings, markdown, errorCode }) {
}

Documentation.getInitialProps = async ({ asPath, req }) => {
const item = getItemByPath(asPath.split('#')[0].split('?')[0])
const item = getItemByPath(asPath.split(/[?#]/)[0])

if (!item) {
return {
Expand Down
12 changes: 6 additions & 6 deletions public/static/docs/command-reference/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ reproducible.

## Options

- `-R`, `--recursive` - `targets` is expected to contain at least one directory
path for this option to have effect. Determines the files to add by searching
each target directory and its subdirectories for data files. For each file
found, a new DVC-file is created using the process described in this command's
- `-R`, `--recursive` - `targets` is expected to contain one or more directories
for this option to have effect. Determines the files to add by searching each
target directory and its subdirectories for data files. For each file found, a
new DVC-file is created using the process described in this command's
description.

- `--no-commit` - do not save outputs to cache. A DVC-file is created, and an
Expand Down Expand Up @@ -197,8 +197,8 @@ Saving information to 'pics.dvc'.

There are no [DVC-files](/doc/user-guide/dvc-file-format) generated within this
directory structure, but the images are all added to the <abbr>cache</abbr>. DVC
prints a message to that effect, mentioning that `md5` values are computed for
each directory. A single `pics.dvc` DVC-file is generated for the top-level
prints a message about this, mentioning that `md5` values are computed for each
directory. A single `pics.dvc` DVC-file is generated for the top-level
directory, and it contains:

```yaml
Expand Down
20 changes: 10 additions & 10 deletions public/static/docs/command-reference/checkout.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ be pulled from remote storage using `dvc pull`.

## Options

- `-d`, `--with-deps` - determine files to update by tracking dependencies to
the target DVC-files (stages). This option only has effect when one or more
`targets` are specified. By traversing all stage dependencies, DVC searches
backward from the target stages in the corresponding pipelines. This means DVC
will not checkout files referenced in later stages than the `targets`.

- `-R`, `--recursive` - `targets` is expected to contain at least one directory
path for this option to have effect. Determines the files to checkout by
searching each target directory and its subdirectories for DVC-files to
inspect.
- `-d`, `--with-deps` - one or more `targets` should be specified for this
option to have effect. Determines files to update by tracking dependencies to
the target DVC-files (stages). By traversing all stage dependencies, DVC
searches backward from the target stages in the corresponding pipelines. This
means DVC will not checkout files referenced in later stages than the
`targets`.

- `-R`, `--recursive` - `targets` is expected to contain one or more directories
for this option to have effect. Determines the files to checkout by searching
each target directory and its subdirectories for DVC-files to inspect.

- `-f`, `--force` - does not prompt when removing workspace files. Changing the
current set of DVC-files with `git checkout` can result in the need for DVC to
Expand Down
19 changes: 9 additions & 10 deletions public/static/docs/command-reference/commit.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,15 @@ reproducibility in those cases.

## Options

- `-d`, `--with-deps` - determine files to commit by tracking dependencies to
the target DVC-files (stages). This option only has effect when one or more
`targets` are specified. By traversing all stage dependencies, DVC searches
backward from the target stages in the corresponding pipelines. This means DVC
will not commit files referenced in later stages than the `targets`.

- `-R`, `--recursive` - `targets` is expected to contain at least one directory
path for this option to have effect. Determines the files to commit by
searching each target directory and its subdirectories for DVC-files to
inspect.
- `-d`, `--with-deps` - one or more `targets` should be specified for this
option to have effect. Determines files to commit by tracking dependencies to
the target DVC-files (stages). By traversing all stage dependencies, DVC
searches backward from the target stages in the corresponding pipelines. This
means DVC will not commit files referenced in later stages than the `targets`.

- `-R`, `--recursive` - `targets` is expected to contain one or more directories
for this option to have effect. Determines the files to commit by searching
each target directory and its subdirectories for DVC-files to inspect.

- `-f`, `--force` - commit data even if checksums for dependencies or outputs
did not change.
Expand Down
11 changes: 6 additions & 5 deletions public/static/docs/command-reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ for more details.) This section contains the following options:
> directory into paths relative to the config file location.

- `cache.protected` - make files under DVC control read-only. Possible values
are `true` or `false` (default). Run `dvc checkout` for the change to go into
effect.
are `true` or `false` (default). Run `dvc checkout` after changing the value
of this option for the change to go into effect.

Due to the way DVC handles linking between the data files in the cache and
their counterparts in the <abbr>workspace</abbr>, it's easy to accidentally
Expand Down Expand Up @@ -200,18 +200,19 @@ learn more about the state file (database) that is used for optimization.
$ dvc config core.loglevel debug
```

## Example: Add an S3 remote
## Example: Add an S3 remote, and set it as default

> 💡 Before adding an S3 remote, be sure to
> [Create a Bucket](https://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html).

This also sets the remote as the <abbr>project</abbr> default:

```dvc
$ dvc remote add myremote s3://bucket/path
$ dvc config core.remote myremote
```

> Note that this is equivalent to using `dvc remote add` with the
> `-d`/`--default` option.

## Example: Default remotes

Use remote `myremote` by default:
Expand Down
19 changes: 9 additions & 10 deletions public/static/docs/command-reference/fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,15 @@ specified in DVC-files currently in the project are considered by `dvc fetch`
`dvc config core.remote`). The argument `REMOTE` is a remote name defined
using the `dvc remote` command.

- `-d`, `--with-deps` - determine files to download by tracking dependencies to
the target DVC-files (stages). This option only has effect when one or more
`targets` are specified. By traversing all stage dependencies, DVC searches
backward from the target stages in the corresponding pipelines. This means DVC
will not fetch files referenced in later stages than the `targets`.

- `-R`, `--recursive` - `targets` is expected to contain at least one directory
path for this option to have effect. Determines the files to fetch by
searching each target directory and its subdirectories for DVC-files to
inspect.
- `-d`, `--with-deps` - one or more `targets` should be specified for this
option to have effect. Determines files to download by tracking dependencies
to the target DVC-files (stages). By traversing all stage dependencies, DVC
searches backward from the target stages in the corresponding pipelines. This
means DVC will not fetch files referenced in later stages than the `targets`.

- `-R`, `--recursive` - `targets` is expected to contain one or more directories
for this option to have effect. Determines the files to fetch by searching
each target directory and its subdirectories for DVC-files to inspect.

- `-j JOBS`, `--jobs JOBS` - number of threads to run simultaneously to handle
the downloading of files from the remote. Using more jobs may improve the
Expand Down
31 changes: 16 additions & 15 deletions public/static/docs/command-reference/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ positional arguments:
## Description

Provides an easy way to download files or directories tracked in any <abbr>DVC
project</abbr> (e.g. datasets, ML models), or Git repository (e.g. source code,
small images or data files). The file or directory in path is copied to the
current working directory. (For remote URLs, it works like downloading with
wget, but supporting DVC <abbr>data artifacts</abbr> and files tracked by Git.)
project</abbr> (e.g. datasets, intermediate results, ML models), or Git
repository (e.g. source code, small image/other files). `dvc get` copies the
target file or directory (`url`/`path`) to the current working directory. (For
<abbr>DVC repositories</abbr>, it's analogous to `wget`.)

Note that this command doesn't require an existing DVC project to run in. It's a
single-purpose command that can be used out of the box after installing DVC.
Expand All @@ -35,11 +35,11 @@ doesn't have a default remote set up, instead of downloading, DVC will try to
copy the target data from the external source project or its
<abbr>cache</abbr>).

The `path` argument of this command is used to specify the location, within the
source project or repository at `url`, of the target(s) to be downloaded. It can
point to any file or directory in the source project, including <abbr>outputs
</abbr> tracked by DVC as well as files tracked by Git. Note that for the
former, data should be specified in one of the
The `path` argument of this command is used to specify the location of the
target(s) to be downloaded within the source project or repository at `url`. It
can point to any file or directory in the source project, including
<abbr>outputs </abbr> tracked by DVC as well as files tracked by Git. Note that
for the former, data should be specified in one of the
[DVC-files](/doc/user-guide/dvc-file-format) of the source repository. (In this
case, a default [DVC remote](/doc/command-reference/remote) needs to be
configured in the project, containing the actual data.)
Expand All @@ -58,11 +58,12 @@ name.
an existing directory is specified, then the output will be placed inside of
it.

- `--rev` - specific
- `--rev` - `url` is expected to represent a Git repository for this option to
have an effect. Specific
[Git revision](https://git-scm.com/book/en/v2/Git-Internals-Git-References)
(such as a branch name, a tag, or a commit hash) of the Git repository to
download the file or directory from. The tip of the default branch is used by
default when this option is not specified.
(such as a branch name, a tag, or a commit hash) of the repository to download
the file or directory from. The tip of the default branch is used by default
when this option is not specified.

- `-h`, `--help` - prints the usage/help message, and exit.

Expand Down Expand Up @@ -107,9 +108,9 @@ The same example applies to raw or intermediate <abbr>data artifacts</abbr> as
well, of course, for cases where we want to download those files or directories
and perform some analysis on them.

## Examples: Get a Git-tracked model file
## Examples: Get a misc. Git-tracked file

We can also use `dvc get` to retrieve any file or directory that exists in a git
We can also use `dvc get` to retrieve any file or directory that exists in a Git
repository.

```dvc
Expand Down
35 changes: 19 additions & 16 deletions public/static/docs/command-reference/import.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ positional arguments:

Provides an easy way to reuse files or directories tracked in any <abbr>DVC
project</abbr> (e.g. datasets, intermediate results, ML models) or Git
repository (e.g. other files and directories), into the workspace. The
`dvc import` command downloads such a <abbr>data artifact</abbr> in a way that
it is tracked with DVC, so it can be updated when the data source changes. (See
`dvc update`.)
repository (e.g. source code, small image/other files). `dvc import` downloads
the target file or directory (`url`/`path`) in a way so that it's tracked with
DVC, becoming a local <abbr>data artifact</abbr>. This also permits updating the
import later, if it has changed in its data source. (See `dvc update`.)

The `url` argument specifies the address of the <abbr>DVC project</abbr> or Git
repository containing the data source. Both HTTP and SSH protocols are supported
Expand All @@ -36,11 +36,11 @@ doesn't have a default remote set up, instead of downloading, DVC will try to
copy the target data from the external source project or its
<abbr>cache</abbr>).

The `path` argument of this command is used to specify the location, within the
source project or repository at `url`, of the target(s) to be downloaded. It can
point to any file or directory in the source project, including <abbr>outputs
</abbr> tracked by DVC as well as files tracked by Git. Note that for the
former, data should be specified in one of the
The `path` argument of this command is used to specify the location of the
target(s) to be downloaded within the source project or repository at `url`. It
can point to any file or directory in the source project, including
<abbr>outputs </abbr> tracked by DVC as well as files tracked by Git. Note that
for the former, data should be specified in one of the
[DVC-files](/doc/user-guide/dvc-file-format) of the source repository. (In this
case, a default [DVC remote](/doc/command-reference/remote) needs to be
configured in the project, containing the actual data.)
Expand Down Expand Up @@ -75,13 +75,16 @@ data artifact from the source project.
an existing directory is specified, then the output will be placed inside of
it.

- `--rev` - specific
- `--rev` - `url` is expected to represent a Git repository for this option to
have an effect. Specific
[Git revision](https://git-scm.com/book/en/v2/Git-Internals-Git-References)
(such as a branch name, a tag, or a commit hash) of the Git repository to
import the data from. The tip of the repository's default branch is used by
default when this option is not specified. Note that this adds a `rev` field
in the import stage that fixes it to this revision. This can impact the
behavior of `dvc update`. (See **re-importing** example below.)
(such as a branch name, a tag, or a commit hash) of the repository to download
the file or directory from. The tip of the default branch is used by default
when this option is not specified.

> Note that this adds a `rev` field in the import stage that fixes it to this
> revision. This can impact the behavior of `dvc update`. (See
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
> **re-importing** example below.)
- `-h`, `--help` - prints the usage/help message, and exit.

Expand Down Expand Up @@ -130,7 +133,7 @@ Several of the values above are pulled from the original stage file
subfields under `repo` are used to save the origin and version of the
dependency.

## Example: fixed revisions & re-importing
## Example: Fixed revisions & re-importing

To import a specific revision of a <abbr>data artifact</abbr>, we may use the
`--rev` option:
Expand Down
7 changes: 4 additions & 3 deletions public/static/docs/command-reference/metrics/show.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ extension.)
Similar to `-a` above. Note that both options can be combined, for example
using the `-aT` flag.

- `-R`, `--recursive` - `path` is expected to be a directory for this option to
have effect. Determines the metric files to show by searching each target
directory and its subdirectories for DVC-files to inspect.
- `-R`, `--recursive` - `targets` is expected to contain one or more directories
for this option to have effect. Determines the metric files to show by
searching each target directory and its subdirectories for DVC-files to
inspect.

- `-h`, `--help` - prints the usage/help message, and exit.

Expand Down
29 changes: 14 additions & 15 deletions public/static/docs/command-reference/pull.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ reflinks or hardlinks to put it in the workspace without copying. See
to save different experiments or project checkpoints. Note that both options
can be combined, for example using the `-aT` flag.

- `-d`, `--with-deps` - determines files to download by tracking dependencies to
the target DVC-files (stages). This option only has effect when one or more
`targets` are specified. By traversing all stage dependencies, DVC searches
backward from the target stages in the corresponding pipelines. This means DVC
will not pull files referenced in later stages than the `targets`.
- `-d`, `--with-deps` - one or more `targets` should be specified for this
option to have effect. Determines files to download by tracking dependencies
to the target DVC-files (stages). By traversing all stage dependencies, DVC
searches backward from the target stages in the corresponding pipelines. This
means DVC will not pull files referenced in later stages than the `targets`.

- `-R`, `--recursive` - `targets` is expected to contain at least one directory
path for this option to have effect. Determines the files to pull by searching
each target directory and its subdirectories for DVC-files to inspect.
- `-R`, `--recursive` - `targets` is expected to contain one or more directories
for this option to have effect. Determines the files to pull by searching each
target directory and its subdirectories for DVC-files to inspect.

- `-f`, `--force` - does not prompt when removing workspace files, which occurs
when these file no longer match the current DVC-file references. This option
Expand All @@ -103,19 +103,18 @@ reflinks or hardlinks to put it in the workspace without copying. See
## Examples

For using the `dvc pull` command, a remote storage must be defined. (See
`dvc remote`.) For an existing <abbr>project</abbr>, remotes are usually already
set up and you can use `dvc remote list` to check them. Just to remind how it is
done and set a context for the example, let's define an SSH remote with the
`dvc remote add` command:
`dvc remote add`.) For an existing <abbr>project</abbr>, remotes are usually
already set up and you can 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:

```dvc
$ dvc remote add r1 ssh://_username_@_host_/path/to/dvc/remote/storage
$ dvc remote add -d r1 ssh://_username_@_host_/path/to/dvc/remote/storage
$ dvc remote list
r1 ssh://_username_@_host_/path/to/dvc/remote/storage
```

> DVC supports several remote types. For details, see the
> [`remote add`](/doc/command-reference/remote/add) documentation.
> DVC supports several
> [remote types](/doc/command-reference/remote/add#supported-storage-types).
Having some images and other files in remote storage, we can pull all changed
files from the current Git branch:
Expand Down
Loading