def validate(version: str) -> None:
    """
    Raises exception if version doesn't have valid semver format which is:
    <major>.<minor>.<patch> or one of version parts is not positive integer
    """
    error_message = (
        "Invalid version. It should be in format: <major>.<minor>.<patch> where"
        " each version part is positive integer"
    )
    parts = version.split(".")
    if len(parts) != 3:
        raise ValueError(error_message)
    for part in parts:
        try:
            val = int(part)
            assert 0 <= val <= MAX_VERSION_NUMBER
        except (ValueError, AssertionError):
            raise ValueError(error_message) from None

    Raises exception if version doesn't have valid semver format which is:
    <major>.<minor>.<patch> or one of version parts is not positive integer
    
src/datachain/semver.py