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

docs: regular update (early August) #522

Merged
merged 16 commits into from
Aug 10, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
50212bd
import-url: try and update example; review term "Get Started" through…
jorgeorpinel Jul 30, 2019
c0cb7ed
update: change references to import stages being unlockable
jorgeorpinel Aug 4, 2019
be18aad
cmd ref: standardize example headers and expandables up to `dvc import`
jorgeorpinel Aug 4, 2019
a388712
cmd ref: standardize example headers and expandables up to `dvc update`
jorgeorpinel Aug 7, 2019
6946023
cmd ref: standardize example headers and expandables (finished)
jorgeorpinel Aug 7, 2019
e641349
term: update "workspace" glossary entry title and desc
jorgeorpinel Aug 8, 2019
f1dc617
cmd ref: updated shared example intro in checkout, commit, and fetch
jorgeorpinel Aug 8, 2019
2536b99
lint: Make YAML blocks valid
jorgeorpinel Aug 8, 2019
686561b
term: update "workspace" glossary entry and
jorgeorpinel Aug 9, 2019
fc28eb0
get-started: updates for more and better use of term "workspace"
jorgeorpinel Aug 9, 2019
8781a71
glossary: use new format with ES6 template literals
jorgeorpinel Aug 10, 2019
328b2ec
get-started: make noted text about git commit in add-files into a reg…
jorgeorpinel Aug 10, 2019
b949520
pipeline: small improvement in cmd ref short desc.
jorgeorpinel Aug 10, 2019
796e799
Merge remote-tracking branch 'upstream/master'
jorgeorpinel Aug 10, 2019
ee1cf35
tutorial: change `<<<<<<<` etc Git conflict markers to HTML symbols
jorgeorpinel Aug 10, 2019
6d1f6c1
term: Review "cache directory" usage and add <abbr> tags for glossary…
jorgeorpinel Aug 10, 2019
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
8 changes: 4 additions & 4 deletions src/Documentation/glossary.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ export default {
'relevant DVC concepts and terminologies which are frequently used.',
contents: [
{
name: 'Workspace directory',
name: 'DVC Workspace',
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
match: ['workspace'],
desc:
'The **workspace** contains all of your DVC **project** files and ' +
"directories. It's typically also a Git **repository**. See also " +
'[`dvc init`](/doc/commands-reference/init).'
},
{
name: 'DVC cache',
name: 'DVC Cache',
match: ['DVC cache', 'cache', 'cache directory'],
desc:
'The DVC cache is a hidden storage (by default located in the ' +
Expand All @@ -23,7 +23,7 @@ export default {
'#structure-of-cache-directory).'
},
{
name: 'Data artifact',
name: 'Data Artifact',
match: ['data artifact', 'data artifacts'],
desc:
'Any **data** file or directory, as well as intermediate or final ' +
Expand All @@ -32,7 +32,7 @@ export default {
'(/doc/use-cases/data-and-model-files-versioning) for more details.'
},
{
name: 'Import stage',
name: 'Import Stage',
match: ['import stage', 'import stages'],
desc:
'Stage (DVC-file) created with the `dvc import` or `dvc import-url` ' +
Expand Down
4 changes: 2 additions & 2 deletions static/docs/commands-reference/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ models). This way you bring data provenance and make your project reproducible.
location, by including a path in the provided value (e.g.
`-f stages/stage.dvc`).

## Examples: Single file
## Example: Single file

Take a file under DVC control:

Expand Down Expand Up @@ -158,7 +158,7 @@ $ file .dvc/cache/d8/acabbfd4ee51c95da5d7628c7ef74b
.dvc/cache/d8/acabbfd4ee51c95da5d7628c7ef74b: ASCII text
```

## Examples: Directory
## Example: Directory

What if you have not one dog picture, but hundreds of pictures of dogs and cats?
Your goal might be to build an algorithm to identify dogs and cats in pictures,
Expand Down
2 changes: 1 addition & 1 deletion static/docs/commands-reference/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ config option, for more information on file links on different platforms.)

- `-v`, `--verbose` - displays detailed tracing information.

## Example
## Examples

The main use of this command is to apply the `-v` and `-q` options to
`dvc cache dir` which doesn't have them:
Expand Down
4 changes: 2 additions & 2 deletions static/docs/commands-reference/cache_dir.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ file location**. They are required in the latter form for the config file.

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

## Examples: Using relative path
## Example: Using relative path

```dvc
$ dvc cache dir ../dir
Expand All @@ -54,7 +54,7 @@ $ cat .dvc/config
`../dir` has been resolved relative to the `.dvc/` dir, resulting in
`../../dir`.

## Examples: Using absolute path
## Example: Using absolute path

```dvc
$ dvc cache dir /path/to/dir
Expand Down
27 changes: 5 additions & 22 deletions static/docs/commands-reference/checkout.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,36 +103,20 @@ be pulled from a remote cache using `dvc pull`.

## Examples

To explore `dvc checkout` let's consider a simple workspace with several
[stages](/doc/commands-reference/run), and a few Git tags. Then with
`git checkout` and `dvc checkout` we can see what happens as we shift from tag
to tag.
Let's employ a simple workspace with some stages and a few Git tags, such as our
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
[get started example repo](https://github.com/iterative/example-get-started).
Then we can see what happens with `git checkout` and `dvc checkout` as we switch
from tag to tag.

<details>

### Click and expand to setup the project

This step is optional, and you can run it only if you want to run this examples
in your environment. First, you need to download the project:
Start by cloning our sample repo if you don't already have it:

```dvc
$ git clone https://github.com/iterative/example-get-started
```

Second, let's install the requirements. But before we do that, we **strongly**
recommend creating a virtual environment with
[virtualenv](https://virtualenv.pypa.io/en/stable/) or a similar tool:

```dvc
$ cd example-get-started
$ virtualenv -p python3 .env
$ source .env/bin/activate
```

Now, we can install requirements for the project:

```dvc
$ pip install -r requirements.txt
```

</details>
Expand All @@ -157,7 +141,6 @@ solving the problem:

```dvc
$ git tag

baseline <- first simple version of the model
bigram <- use bigrams to improve the model
```
Expand Down
25 changes: 10 additions & 15 deletions static/docs/commands-reference/commit.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,37 +90,32 @@ into play. It handles that last step of adding the file to the DVC cache.

## Examples

To explore `dvc commit` let's consider a simple pipeline with several stages:
the example workspace used in the [Get Started](/doc/get-started) section.
Let's employ a simple workspace with several stages, such as the DVC project
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved
created in our [Get Started](/doc/get-started) section. Then we can see what
happens with `git commit` and `dvc commit` in different situations.

<details>

### Click and expand to setup the project

This step is optional, and you can run it only if you want to run this examples
in your environment. First, you need to download the project:
Start by cloning our sample repo if you don't already have it:

```dvc
$ git clone https://github.com/iterative/example-get-started
$ cd example-get-started
```

Second, let's install the requirements. But before we do that, we **strongly**
recommend creating a virtual environment with
[virtualenv](https://virtualenv.pypa.io/en/stable/) or a similar tool:
Now let's install the requirements. But before we do that, we **strongly**
recommend creating a virtual environment with a tool such as
[virtualenv](https://virtualenv.pypa.io/en/stable/):

```dvc
$ cd example-get-started
$ virtualenv -p python3 .env
$ source .env/bin/activate
```

Now, we can install requirements for the project:

```dvc
$ pip install -r requirements.txt
```

Then download the precomputed data using:
Download the precomputed data using:

```dvc
$ dvc pull --all-branches --all-tags
Expand Down Expand Up @@ -221,7 +216,7 @@ $ ls .dvc/cache/70
And we've verified that `dvc commit` has saved the changes into the cache, and
that the new instance of `model.pkl` is in the cache.

## Example: Running without DVC
## Example: Running commands without DVC

It is also possible to execute the commands that are executed by `dvc repro` by
hand. You won't have DVC helping you, but you have the freedom to run any script
Expand Down
6 changes: 3 additions & 3 deletions static/docs/commands-reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ more about the state file that is used for optimization.
so that when it needs to cleanup the database it could sort them by the
timestamp and remove the oldest ones. Default quota is set to 50(percent).

## Examples: Core config options
## Example: Core config options

Set the `dvc` log level to `debug`:

Expand All @@ -200,7 +200,7 @@ $ dvc remote add myremote s3://bucket/path
$ dvc config core.remote myremote
```

## Examples: Default remotes
## Example: Default remotes

Use remote `myremote` by default:

Expand All @@ -227,7 +227,7 @@ which is equivalent to:
$ dvc config core.remote -u
```

## Examples: Cache config options
## Example: Cache config options

Set the cache directory to an absolute path:

Expand Down
7 changes: 3 additions & 4 deletions static/docs/commands-reference/destroy.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ DVC repository destruction.

- `-v`, `--verbose` - displays detailed tracing information.

## Example
## Examples

```dvc
$ dvc init
Expand Down Expand Up @@ -64,9 +64,8 @@ $ dvc cache dir /mnt/cache
$ dvc add foo
```

`dvc cache dir` changed the location of cache storage to exernal
location. Content of DVC repository:

`dvc cache dir` changed the location of cache storage to exernal location.
Content of DVC repository:

```dvc
$ ls -a
Expand Down
30 changes: 11 additions & 19 deletions static/docs/commands-reference/diff.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@ by the Git SCM, for example when `dvc init` was used with the `--no-scm` option.

- `-v`, `--verbose` - displays detailed tracing information.

## Examples: Previous version of the same branch
## Examples

For the setup of our examples we can use the steps in our
[Get Started](/doc/get-started) guide up to the
[Add Files](/doc/get-started/add-files) section.
For these examples we can use the steps in our [Get Started](/doc/get-started)
guide, up to the [Add Files](/doc/get-started/add-files) step.

<details>

Expand All @@ -64,33 +63,26 @@ For the setup of our examples we can use the steps in our
Start by cloning our sample repo if you don't already have it. Then move into
the repo and checkout the
[version](https://github.com/iterative/example-get-started/releases/tag/3-add-file)
corresponding to the add-files section mentioned above
corresponding to the _Add Files_ step:

```dvc
$ git clone https://github.com/iterative/example-get-started
Cloning into 'example-get-started'...

$ cd example-get-started
$ git checkout 3-add-file
Note: checking out '3-add-file'...

$ dvc pull
Preparing to download data from 'https://remote.dvc.org/get-started'
...
```

Now let's create a virtual environment with
[virtualenv](https://virtualenv.pypa.io/en/stable/) and install the
requirements.
Download the precomputed data using:

```dvc
$ virtualenv -p python3 .env
$ source .env/bin/activate
$ pip install -r requirements.txt
$ dvc pull
Preparing to download data from 'https://remote.dvc.org/get-started'
...
```

</details>

## Example: Previous version of the same branch

The minimal `dvc diff` command only includes the A reference (`a_ref`) from
which the difference is to be calculated. The B reference (`b_ref`) defaults to
Git `HEAD` (the currently checked out version). To find the general differences
Expand All @@ -107,7 +99,7 @@ diff for 'data/data.xml'
added file with size 37.9 MB
```

## Examples: Specific targets across Git references
## Example: Specific targets across Git references

We can base this example in the [Experiment Metrics](/doc/get-started/metrics)
and [Compare Experiments](/doc/get-started/compare-experiments) sections of our
Expand Down
31 changes: 7 additions & 24 deletions static/docs/commands-reference/fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,36 +114,19 @@ specified in DVC-files currently in the workspace are considered by `dvc fetch`

## Examples

To explore `dvc fetch` let's consider a simple
[pipeline](/doc/get-started/pipeline) with several stages and a few Git tags.
Then we can see what happens with `fetch` as we shift from tag to tag with
`git`.
Let's employ a simple workspace with some stages and a few Git tags, such as our
[get started example repo](https://github.com/iterative/example-get-started).
Then we can see what happens with `dvc fetch` as we switch from tag to tag.

<details>

### Click and expand to setup the project

This step is optional, and you can run it only if you want to run this examples
in your environment. First, you need to download the project:
Start by cloning our sample repo if you don't already have it:

```dvc
$ git clone https://github.com/iterative/example-get-started
```

Second, let's install the requirements. But before we do that, we **strongly**
recommend creating a virtual environment with
[virtualenv](https://virtualenv.pypa.io/en/stable/) or a similar tool:

```dvc
$ cd example-get-started
$ virtualenv -p python3 .env
$ source .env/bin/activate
```

Now, we can install requirements for the project:

```dvc
$ pip install -r requirements.txt
```

</details>
Expand Down Expand Up @@ -173,7 +156,7 @@ baseline <- first simple version of the model
bigram <- use bigrams to improve the model
```

## Examples: Default behavior
## Example: Default behavior

This project comes with a predefined HTTP
[remote storage](/doc/commands-reference/remote). We can now just run
Expand Down Expand Up @@ -218,7 +201,7 @@ Checking out '{'scheme': 'local', 'path': '.../example-get-started/model.pkl'}'
Checking out '{'scheme': 'local', 'path': '.../example-get-started/data/...
```

## Examples: Specific stages
## Example: Specific stages

> Please delete the `.dvc/cache` directory first (with `rm -Rf .dvc/cache`) to
> follow this example if you tried the previous one (**Default behavior**).
Expand Down Expand Up @@ -250,7 +233,7 @@ Cache entries for the necessary directories, as well as the actual
`data/prepared/test.tsv` and `data/prepared/train.tsv` files were download,
checksums shown above.

## Examples: With dependencies
## Example: With dependencies

After following the previous example (**Specific stages**), only the files
associated with the `prepare.dvc` stage file have been fetched. Several
Expand Down
2 changes: 1 addition & 1 deletion static/docs/commands-reference/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ created in the current working directory, with its original file name.

- `-v`, `--verbose` - displays detailed tracing information.

## Example
## Examples

> Note that `dvc get` can be used form anywhere in the file system, as long as
> DVC is [installed](/doc/get-started/install).
Expand Down
Loading