Example #1
0
 def run_cmd(self):
     try:
         Project.init('.', no_scm=self.args.no_scm)
     except InitError as e:
         Logger.error('Failed to initiate dvc', e)
         return 1
     return 0
Example #2
0
    def run_cmd(self):
        from dvc.project import Project, InitError

        try:
            Project.init('.', no_scm=self.args.no_scm, force=self.args.force)
        except InitError as e:
            Logger.error('Failed to initiate dvc', e)
            return 1
        return 0
Example #3
0
    def run_cmd(self):
        from dvc.project import Project, InitError

        try:
            self.project = Project.init('.',
                                        no_scm=self.args.no_scm,
                                        force=self.args.force)
            self.config = self.project.config
        except InitError:
            logger.error('failed to initiate dvc')
            return 1
        return 0
Example #4
0
    def setUp(self):
        super(TestGCMultipleProjects, self).setUp()
        self.additional_path = TestDir.mkdtemp()
        self.additional_git = Repo.init(self.additional_path)
        self.additional_dvc = Project.init(self.additional_path)

        cache_path = os.path.join(self._root_dir, '.dvc', 'cache')
        config_path = os.path.join(self.additional_path, '.dvc',
                                   'config.local')
        cfg = configobj.ConfigObj()
        cfg.filename = config_path
        cfg['cache'] = {'dir': cache_path}
        cfg.write()

        self.additional_dvc = Project(self.additional_path)
Example #5
0
    def setUp(self):
        super(TestGCMultipleProjects, self).setUp()
        self.additional_path = TestDir.mkdtemp()
        self.additional_git = Repo.init(self.additional_path)
        self.additional_dvc = Project.init(self.additional_path)

        cache_path = os.path.join(self._root_dir, ".dvc", "cache")
        config_path = os.path.join(self.additional_path, ".dvc",
                                   "config.local")
        cfg = configobj.ConfigObj()
        cfg.filename = config_path
        cfg["cache"] = {"dir": cache_path}
        cfg.write()

        self.additional_dvc = Project(self.additional_path)
Example #6
0
 def setUp(self):
     super(TestDvc, self).setUp()
     self.dvc = Project.init(self._root_dir)
     self.dvc.logger.be_verbose()
Example #7
0
    def test_api(self):
        Project.init(no_scm=True)

        self._test_init()
Example #8
0
 def test_api(self):
     with self.assertRaises(InitError):
         Project.init()
Example #9
0
    def test_api(self):
        Project.init()

        self._test_init()
Example #10
0
File: init.py Project: ybayle/dvc
 def run_cmd(self):
     Project.init('.')
     return 0