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
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
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
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)
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)
def setUp(self): super(TestDvc, self).setUp() self.dvc = Project.init(self._root_dir) self.dvc.logger.be_verbose()
def test_api(self): Project.init(no_scm=True) self._test_init()
def test_api(self): with self.assertRaises(InitError): Project.init()
def test_api(self): Project.init() self._test_init()
def run_cmd(self): Project.init('.') return 0