def validate_positive_int(ctx, param, value):
    """Check that a command line argument is a positive integer."""
    if value < 1:
        raise ValueError("%s parameter cannot be < 1", param)
    if int(value) != value:
        raise ValueError("%s parameter must be an int, not a float", param)
    return value