Bump version (to prepare a new release).

def bump_version(ctx, new_version, version_part=None, dry_run=False):
    """Bump version (to prepare a new release)."""
    version_part = version_part or "minor"
    if dry_run:
        ctx = DryRunContext(ctx)
    ctx.run("bumpversion --new-version={} {}".format(new_version,
                                                      version_part))