-
Notifications
You must be signed in to change notification settings - Fork 409
Write import, get, and get-url refs; std. existing refs; other doc format/lang. updates
#464
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
Merged
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
5575a43
import-url: finish changing old references to `import`, now `import-url`
jorgeorpinel c8b3739
term: review and increment usage of "protocol"
jorgeorpinel a25620d
cmd ref: full name for subcommands
jorgeorpinel 618584a
term: S3 buckets have "keys" (not paths)
jorgeorpinel 48f9121
get-url: adds first cmd ref doc
jorgeorpinel 2be096a
remote: small update to remote small duplicity
jorgeorpinel 661705d
term: std way to use "current" and "present" (working directory)
jorgeorpinel f887c50
term: fix links to "stage"
jorgeorpinel 900b8fc
term: review usage of "setting", favoring "config option" or
jorgeorpinel 1583de8
term: revert usage of "key" vs "path" for S3 remote URLS
jorgeorpinel fa4ed4f
cmd ref: update import-url/get-rul and related commands with
jorgeorpinel 92c62b5
term: revert "present" for "current" (working directory)
jorgeorpinel d865ff8
status: update `-a` option desc.
jorgeorpinel 2b0ef40
revert a couple recent errors
jorgeorpinel 37eae0f
term: review "data artifact" related terms and add glossary <abbr> tag
jorgeorpinel 2ff746b
add: revert shortenned command list in desc.
jorgeorpinel 6e467dd
term: review usage of "check" and "checkout"
jorgeorpinel e635432
download: reduce summary notes in import-url and get-url
jorgeorpinel 836fa17
guides: add `get-url` to comment spec in DVC-file format doc
jorgeorpinel 44e9c95
get-url: remove S3 write ops and permisions from ref.
jorgeorpinel 10a52f3
term: revive "import stage"
jorgeorpinel 23ca5db
guide: remove unnecessary sentence from share-data
jorgeorpinel 880736d
status: rewrap usage code block
jorgeorpinel 3fb8da1
cases: mention directories and `dvc run` in data-and-model-files-vers…
jorgeorpinel b61b26d
cmd ref: First version of `import` and `get`, with updated `-url` cou…
jorgeorpinel b94c799
Simplify notes about single-use commands.
jorgeorpinel 88dddaf
cmd ref: Add "Git server e.g. Github" note to `import` and `get` summ…
jorgeorpinel ae0ed5c
cmd ref: updated `url` arg desc in `import` and `get`
jorgeorpinel 65980d9
cmd ref: add note abot http and ssh protocols to `get` and `import`
jorgeorpinel aa4067b
init: clarify "local" (repo) term
jorgeorpinel 6780754
remote: fix grammar in `--local` option of `modify` and `remove`
jorgeorpinel 7f33a3a
term: review use of "config(uration) file" and link to /doc/commands-…
jorgeorpinel d5b38f4
remote: std `--local` opt desc
jorgeorpinel ce2dc0c
cmd ref: remove outdated comment from `get` and `import`
jorgeorpinel dab6a36
cmd ref: make note about single-use commands into regular paragraphs
jorgeorpinel 4f9308f
cmd ref: udpate `url` arg desc in `get` and `import` (again)
jorgeorpinel 92a5238
version: remove unnecessary note
jorgeorpinel fd7f428
s3: update info on boto3 methods and permissions required...
jorgeorpinel 13bde23
init: update with details about using or nto a Git repo for the DVC p…
jorgeorpinel c38cc8e
cmd ref: improve desc of `import` and `get` commands, et al
jorgeorpinel 377410c
cmd ref: fix command to install DVC with pip inc all remotes
jorgeorpinel 6d0d0e0
install: add [oss] to list of optional deps when installing via pip
jorgeorpinel 2b1008a
cmd ref: be more specific about what import and get are for...
jorgeorpinel d53434d
cmd ref: clarify that get and get-url download files anywhere...
jorgeorpinel 1bdd04f
import: add note that the original release is now import-url in cmd ref
jorgeorpinel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,158 @@ | ||
| # get-url | ||
|
|
||
| Download or copy file or directory from any supported URL (for example `s3://`, | ||
| `ssh://`, and other protocols) or local directory to the local file system. | ||
|
|
||
| > Unlike `dvc import-url`, this command does not track the downloaded data | ||
| > file(s) (does not create a DVC-file). | ||
|
|
||
| ## Synopsis | ||
|
|
||
| ```usage | ||
| usage: dvc get-url [-h] [-q | -v] url [out] | ||
|
|
||
| positional arguments: | ||
| url (See supported URLs in the description.) | ||
| out Destination path to put data to. | ||
| ``` | ||
|
|
||
| ## Description | ||
|
|
||
| In some cases it's convenient to get a data file or directory from a remote | ||
| location into the current working directory, regardless of whether it's a DVC | ||
| project. The `dvc get-url` command helps the user do just that. | ||
|
|
||
| The `url` argument should provide the location of the data to be downloaded, | ||
| while `out` can be used to specify the (path and) file name desired for the | ||
| downloaded data file or directory. | ||
|
|
||
| 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. | ||
|
|
||
| > See `dvc get` to download data or model files or directories from other DVC | ||
| > repositories (e.g. Github URLs). | ||
|
|
||
| DVC supports several types of (local or) remote locations (protocols): | ||
|
|
||
| | Type | Discussion | URL format | | ||
| | ------- | ------------------------------------------------------- | ------------------------------------------ | | ||
| | `local` | Local path | `/path/to/local/file` | | ||
| | `s3` | Amazon S3 | `s3://mybucket/data.csv` | | ||
| | `gs` | Google Storage | `gs://mybucket/data.csv` | | ||
| | `ssh` | SSH server | `ssh://user@example.com:/path/to/data.csv` | | ||
| | `hdfs` | HDFS | `hdfs://user@example.com/path/to/data.csv` | | ||
| | `http` | HTTP to file with _strong ETag_ (see explanation below) | `https://example.com/path/to/data.csv` | | ||
|
|
||
| > Depending on the remote locations type you plan to download data from you | ||
| > might need to specify one of the optional dependencies: `[s3]`, `[ssh]`, | ||
| > `[gs]`, `[azure]`, and `[oss]` (or `[all]` to include them all) when | ||
| > [installing DVC](/doc/get-started/install) with `pip`. | ||
|
|
||
| Another way to understand the `dvc get-url` command is as a tool for downloading | ||
| data files. | ||
|
|
||
| On GNU/Linux systems for example, instead of `dvc get-url` with HTTP(S) it's | ||
| possible to instead use: | ||
|
|
||
| ```dvc | ||
| $ wget https://example.com/path/to/data.csv | ||
| ``` | ||
|
|
||
| ## Options | ||
|
|
||
| - `-h`, `--help` - prints the usage/help message, and exit. | ||
|
|
||
| - `-q`, `--quiet` - do not write anything to standard output. Exit with 0 if no | ||
| problems arise, otherwise 1. | ||
|
|
||
| - `-v`, `--verbose` - displays detailed tracing information. | ||
|
|
||
| ## Examples | ||
|
|
||
| <details> | ||
|
|
||
| ### Click and expand for a local example | ||
|
|
||
| ```dvc | ||
| $ dvc get-url /local/path/to/data | ||
| ``` | ||
|
|
||
| The above command will copy the `/local/path/to/data` file or directory into | ||
| `./dir`. | ||
|
|
||
| </details> | ||
|
|
||
| <details> | ||
|
|
||
| ### Click for AWS S3 example | ||
|
|
||
| This command will copy an S3 object into the current working directory with the | ||
| same file name: | ||
|
|
||
| ```dvc | ||
| $ dvc get-url s3://bucket/path | ||
| ``` | ||
|
|
||
| By default DVC expects your AWS CLI is already | ||
| [configured](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html). | ||
| DVC will be using default AWS credentials file to access S3. To override some of | ||
| these settings, you could the options described in `dvc remote modify`. | ||
|
|
||
| > We use the `boto3` library to and communicate with AWS S3. The following API | ||
| > methods may be performed: | ||
| > | ||
| > - `head_object` | ||
| > - `download_file` | ||
| > | ||
| > So make sure you have the `s3:GetObject` permission enabled. | ||
|
|
||
| </details> | ||
|
|
||
| <details> | ||
|
|
||
| ### Click for Google Cloud Storage example | ||
|
|
||
| ```dvc | ||
| $ dvc get-url gs://bucket/path file | ||
| ``` | ||
|
|
||
| The above command downloads the `/path` file (or directory) into `./file`. | ||
|
|
||
| </details> | ||
|
|
||
| <details> | ||
|
|
||
| ### Click for SSH example | ||
|
|
||
| ```dvc | ||
| $ dvc get-url ssh://user@example.com/path/to/data | ||
| ``` | ||
|
|
||
| Using default SSH credentials, the above command gets the `data` file (or | ||
| directory). | ||
|
|
||
| </details> | ||
|
|
||
| <details> | ||
|
|
||
| ### Click for HDFS example | ||
|
|
||
| ```dvc | ||
| $ dvc get-url hdfs://user@example.com/path/to/data | ||
| ``` | ||
|
|
||
| </details> | ||
|
|
||
| <details> | ||
|
|
||
| ### Click for HTTP example | ||
|
|
||
| > Both HTTP and HTTPS protocols are supported. | ||
|
|
||
| ```dvc | ||
| $ dvc get-url https://example.com/path/to/data | ||
| ``` | ||
|
|
||
| </details> | ||
|
|
||
| <details> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # get | ||
|
|
||
| Download or copy file or directory from another DVC repository (on a git server | ||
| such as Github) into the local file system. | ||
|
|
||
| > Unlike `dvc import`, this command does not track the downloaded data file(s) | ||
| > (does not create a DVC-file). | ||
|
|
||
| ## Synopsis | ||
|
|
||
| ```usage | ||
| usage: dvc get [-h] [-q | -v] [-o [OUT]] [--rev [REV]] url path | ||
|
|
||
| positional arguments: | ||
| url URL of Git repository with DVC project to download from. | ||
| path Path to data within DVC repository. | ||
| ``` | ||
|
|
||
| ## Description | ||
|
|
||
| DVC provides an easy way to reuse datasets, intermediate results, ML models, or | ||
| other files and directories tracked in another DVC repository into the current | ||
| working directory, regardless of whether it's a DVC project. The `dvc get` | ||
| command downloads such a <abbr>data artifact</abbr>. | ||
|
|
||
| The `url` argument specifies the external DVC project's Git repository URL (both | ||
| HTTP and SSH protocols supported, e.g. `[user@]server:project.git`), while | ||
| `path` is used to specify the path to the data to be downloaded within the repo. | ||
|
|
||
| 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. | ||
|
|
||
| > See `dvc get-url` to download data from other supported URLs. | ||
|
|
||
| After running this command successfully, the data found in the `url` `path` is | ||
| created in the current working directory with its original file name. | ||
|
|
||
| ## Options | ||
|
|
||
| - `-h`, `--help` - prints the usage/help message, and exit. | ||
|
|
||
| - `-q`, `--quiet` - do not write anything to standard output. Exit with 0 if no | ||
| problems arise, otherwise 1. | ||
|
|
||
| - `-v`, `--verbose` - displays detailed tracing information. | ||
|
|
||
| <!-- ## Example --> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.