How to use the cruft.api.create function in cruft

To help you get started, we’ve selected a few cruft examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github timothycrosley / cruft / tests / test_api.py View on Github external
@auto_pytest(api.create)
def test_create_auto_invalid_repo(test_case, tmpdir):
    tmpdir.chdir()
    with pytest.raises(exceptions.InvalidCookiecutterRepository):
        test_case()
github timothycrosley / cruft / tests / test_api.py View on Github external
def test_create_examples(tmpdir):
    tmpdir.chdir()
    verify_and_test_examples(api.create)
github timothycrosley / cruft / cruft / cli.py View on Github external
else:
        print("")
        print("Good work! Project's cruft has been updated and is as clean as possible!")


def _link_output(linked: bool) -> None:
    if linked:
        print("")
        print("Project successfully linked to template!")
    else:
        print("")
        print("Project linking failed :(")


cli = hug.cli(api=hug_api)
cli(api.create)
cli.output(_update_output)(api.update)
cli.output(_check_command_output)(api.check)
cli.output(_link_output)(api.link)