diff --git a/README.md b/README.md index 65569ab5c..7f406c012 100644 --- a/README.md +++ b/README.md @@ -13,15 +13,30 @@ By submitting a pull request for this project, you agree to license your contrib # Setup / Configuration `dvc` supports both aws and google cloud; you will need accounts either from [aws](https://aws.amazon.com/) or [gcloud](https://cloud.google.com/). -To see your available buckets, run either `TODO` or `gsutil ls`. +Edit `dvc.conf`, and fill in `StoragePath` under `[Data]` with your preferred bucket and path. For example, +``` +[Data] +StoragePath = gc://dvc-demo/dvcdata +``` +## Amazon AWS Setup +NB: To see your available buckets, run `aws s3 ls` + +Configuration: +* edit `dvc.conf`, and set `Cloud = amazon` +* under `[AWS]`, fill in `AccessKeyId` and `SecretAccessKey` + +Test `dvc` is correctly configured by running `dvc test-aws` (TODO) ## Google Cloud Setup -To setup your google cloud credentials: -TODO +NB: To see your available buckets, run `gsutil ls`. + +Configuration: +* edit `dvc.conf`, and set `Cloud = google` +* under `[GC]`, set `ProjectName` to your preferred (or just your default) project name. + +Test `dvc` is correctly configured by running `dvc test-gcloud`. -To test they are set up correctly, -TODO # Usage ``` diff --git a/dvc.conf b/dvc.conf index ec634402a..94ee81888 100644 --- a/dvc.conf +++ b/dvc.conf @@ -34,7 +34,6 @@ SecurityGroup = dvc-group [GC] ProjectName = - StoragePath = diff --git a/dvc/command/base.py b/dvc/command/base.py index 07b67bf0d..c2c96695d 100644 --- a/dvc/command/base.py +++ b/dvc/command/base.py @@ -35,7 +35,6 @@ class CmdBase(object): return self._settings.config def cache_file_key(self, file): - print 'storage_prefix %s' % self.config.storage_prefix return '{}/{}'.format(self.config.storage_prefix, file).strip('/') @property diff --git a/dvc/command/data_sync.py b/dvc/command/data_sync.py index b622ff7f1..6739a54e5 100644 --- a/dvc/command/data_sync.py +++ b/dvc/command/data_sync.py @@ -85,7 +85,6 @@ class CmdDataSync(CmdBase): bucket = _get_bucket_aws() key_name = self.cache_file_key(item.cache.dvc) - print 'aws: key name: %s' % key_name key = bucket.get_key(key_name) if not key: raise DataSyncError('File "{}" does not exist in the cloud'.format(key_name)) @@ -98,7 +97,6 @@ class CmdDataSync(CmdBase): """ sync_to_cloud, aws version """ aws_key = self.cache_file_key(data_item.cache.dvc) - print 'aws_key is %s' % aws_key bucket = self._get_bucket_aws() key = bucket.get_key(aws_key) if key: @@ -131,7 +129,6 @@ class CmdDataSync(CmdBase): bucket = self._get_bucket_gc() key = self.cache_file_key(item.cache.dvc) - print 'key: %s' % key blob = bucket.get_blob(key) if not blob: @@ -147,8 +144,6 @@ class CmdDataSync(CmdBase): bucket = self._get_bucket_gc() blob_name = self.cache_file_key(data_item.cache.dvc) - print 'blob_name: %s' % blob_name - return blob = bucket.blob(blob_name) if blob.exists(): diff --git a/dvc/command/init.py b/dvc/command/init.py index 4b5c542a5..ae14452ae 100644 --- a/dvc/command/init.py +++ b/dvc/command/init.py @@ -18,7 +18,7 @@ class CmdInit(CmdBase): DataDir = {} CacheDir = {} StateDir = {} -Cloud = amazon +Cloud = # Log levels: Debug, Info, Warning and Error LogLevel = Info @@ -49,6 +49,9 @@ SecurityGroup = dvc-group [GC] ProjectName = + +[Data] +StoragePath = ''' def __init__(self, settings):