RFC: move cmdline parsing to cli.py and settings RFC

This will make the structure of dvc more linear
making it easier to read. Plus, these changes
are needed in preparation for libdvc, as they
move all cmdline parsing to one common place.

This patch also refactors our settings system
also make it more linear and remove abstraction
levels that are not needed and only cause confusion.
There is a lot more to be done in preparation for
dvc lib and RFC overall, but this a first step
in that long journey.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2017-07-31 01:39:32 +03:00
parent 57ec8075a4
commit ee34fdfa31
28 changed files with 522 additions and 442 deletions
-10
View File
@@ -3,7 +3,6 @@ from multiprocessing.pool import ThreadPool
from dvc.command.base import CmdBase, DvcLock
from dvc.exceptions import DvcException
from dvc.runtime import Runtime
from dvc.system import System
from dvc.data_cloud import DataCloud
from dvc.utils import map_progress
@@ -18,12 +17,6 @@ class CmdDataSync(CmdBase):
def __init__(self, settings):
super(CmdDataSync, self).__init__(settings)
def define_args(self, parser):
parser.add_argument('targets',
metavar='',
help='File or directory to sync.',
nargs='*')
def run(self):
with DvcLock(self.is_locker, self.git):
cloud = DataCloud(self.settings)
@@ -44,6 +37,3 @@ class CmdDataSync(CmdBase):
map_progress(cloud.sync, targets, self.parsed_args.jobs)
pass
if __name__ == '__main__':
Runtime.run(CmdDataSync)