def main(args=None): """ The entry point for the npp tool. """ args = _generate_args(args) os.mkdir(args.project) tmp = os.getcwd() os.chdir(args.project) init_git_repo() if args.github: template_url = 'https://github.com/{}/template-python.git'.format(args.github) add_repo_remote('template', template_url) if not git_pull_from_remote('template'): set_repo_remote('template', TEMPLATE_URL) git_pull_from_remote('template') else: add_repo_remote('template', TEMPLATE_URL) git_pull_from_remote('template') os.chdir(tmp) fixup_project(args.project) fixup_package(args.project, args.package) fixup_extras(args.project, args.package, args.github)
def main(args=None): """ The entry point for the npp tool. """ args = _generate_args(args) os.mkdir(args.project) tmp = os.getcwd() os.chdir(args.project) init_git_repo() if args.github: template_url = 'https://github.com/{}/template-python.git'.format( args.github) add_repo_remote('template', template_url) if not git_pull_from_remote('template'): set_repo_remote('template', TEMPLATE_URL) git_pull_from_remote('template') else: add_repo_remote('template', TEMPLATE_URL) git_pull_from_remote('template') os.chdir(tmp) fixup_project(args.project) fixup_package(args.project, args.package) fixup_extras(args.project, args.package, args.github)
def test__git_pull_from_remote__failure_merge(self): self.assertFalse( git_pull_from_remote('testing', 'https://testurl.com/repo.git'))
def test__git_pull_from_remote__success(self): self.assertTrue( git_pull_from_remote('testing', 'https://testurl.com/repo.git'))
def test__git_pull_from_remote__failure_merge(self): self.assertFalse(git_pull_from_remote('testing', 'https://testurl.com/repo.git'))
def test__git_pull_from_remote__success(self): self.assertTrue(git_pull_from_remote('testing', 'https://testurl.com/repo.git'))