Пример #1
0
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)
Пример #2
0
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)
Пример #3
0
 def test__git_pull_from_remote__failure_merge(self):
     self.assertFalse(
         git_pull_from_remote('testing', 'https://testurl.com/repo.git'))
Пример #4
0
 def test__git_pull_from_remote__success(self):
     self.assertTrue(
         git_pull_from_remote('testing', 'https://testurl.com/repo.git'))
Пример #5
0
 def test__git_pull_from_remote__failure_merge(self):
     self.assertFalse(git_pull_from_remote('testing', 'https://testurl.com/repo.git'))
Пример #6
0
 def test__git_pull_from_remote__success(self):
     self.assertTrue(git_pull_from_remote('testing', 'https://testurl.com/repo.git'))