diff --git a/dvc/config.py b/dvc/config.py index b883ef259b..90094b3a45 100644 --- a/dvc/config.py +++ b/dvc/config.py @@ -161,9 +161,7 @@ class Config(object): # pylint: disable=too-many-instance-attributes SECTION_CORE_CHECKSUM_JOBS: All(Coerce(int), Range(1)), } - # backward compatibility - SECTION_AWS = "aws" - SECTION_AWS_STORAGEPATH = "storagepath" + # aws specific options SECTION_AWS_CREDENTIALPATH = "credentialpath" SECTION_AWS_ENDPOINT_URL = "endpointurl" SECTION_AWS_LIST_OBJECTS = "listobjects" @@ -172,34 +170,14 @@ class Config(object): # pylint: disable=too-many-instance-attributes SECTION_AWS_USE_SSL = "use_ssl" SECTION_AWS_SSE = "sse" SECTION_AWS_ACL = "acl" - SECTION_AWS_SCHEMA = { - Required(SECTION_AWS_STORAGEPATH): str, - SECTION_AWS_REGION: str, - SECTION_AWS_PROFILE: str, - SECTION_AWS_CREDENTIALPATH: str, - SECTION_AWS_ENDPOINT_URL: str, - Optional(SECTION_AWS_LIST_OBJECTS, default=False): Bool, - Optional(SECTION_AWS_USE_SSL, default=True): Bool, - SECTION_AWS_SSE: str, - SECTION_AWS_ACL: str, - } - # backward compatibility - SECTION_GCP = "gcp" - SECTION_GCP_STORAGEPATH = SECTION_AWS_STORAGEPATH + # gcp specific options SECTION_GCP_CREDENTIALPATH = SECTION_AWS_CREDENTIALPATH SECTION_GCP_PROJECTNAME = "projectname" - SECTION_GCP_SCHEMA = { - Required(SECTION_GCP_STORAGEPATH): str, - SECTION_GCP_PROJECTNAME: str, - } - - # backward compatibility - SECTION_LOCAL = "local" - SECTION_LOCAL_STORAGEPATH = SECTION_AWS_STORAGEPATH - SECTION_LOCAL_SCHEMA = {Required(SECTION_LOCAL_STORAGEPATH): str} + # azure specific option SECTION_AZURE_CONNECTION_STRING = "connection_string" + # Alibabacloud oss options SECTION_OSS_ACCESS_KEY_ID = "oss_key_id" SECTION_OSS_ACCESS_KEY_SECRET = "oss_key_secret" diff --git a/dvc/remote/gs.py b/dvc/remote/gs.py index c2fb4efc1c..f17e71dcde 100644 --- a/dvc/remote/gs.py +++ b/dvc/remote/gs.py @@ -60,8 +60,7 @@ class RemoteGS(RemoteBASE): def __init__(self, repo, config): super(RemoteGS, self).__init__(repo, config) - storagepath = "gs://" + config.get(Config.SECTION_GCP_STORAGEPATH, "/") - url = config.get(Config.SECTION_REMOTE_URL, storagepath) + url = config.get(Config.SECTION_REMOTE_URL, "gs:///") self.path_info = self.path_cls(url) self.projectname = config.get(Config.SECTION_GCP_PROJECTNAME, None) diff --git a/dvc/remote/local.py b/dvc/remote/local.py index bd20e91b55..0293080a82 100644 --- a/dvc/remote/local.py +++ b/dvc/remote/local.py @@ -60,9 +60,7 @@ def __init__(self, repo, config): # cache files are set to be read-only for everyone self._file_mode = stat.S_IREAD | stat.S_IRGRP | stat.S_IROTH - # A clunky way to detect cache dir - storagepath = config.get(Config.SECTION_LOCAL_STORAGEPATH, None) - cache_dir = config.get(Config.SECTION_REMOTE_URL, storagepath) + cache_dir = config.get(Config.SECTION_REMOTE_URL) if cache_dir is not None and not os.path.isabs(cache_dir): cwd = config[Config.PRIVATE_CWD] diff --git a/dvc/remote/s3.py b/dvc/remote/s3.py index a457694254..952db8fa4f 100644 --- a/dvc/remote/s3.py +++ b/dvc/remote/s3.py @@ -26,11 +26,7 @@ class RemoteS3(RemoteBASE): def __init__(self, repo, config): super(RemoteS3, self).__init__(repo, config) - storagepath = "s3://{}".format( - config.get(Config.SECTION_AWS_STORAGEPATH, "").lstrip("/") - ) - - url = config.get(Config.SECTION_REMOTE_URL, storagepath) + url = config.get(Config.SECTION_REMOTE_URL, "s3://") self.path_info = self.path_cls(url) self.region = config.get(Config.SECTION_AWS_REGION)