Reference

Errors

CheckError

A goalie check failed.

CheckTypeError

A value has the wrong type.

CheckValueError

A value has the right type but an unacceptable value.

Collection and string checks

are_set_equal

Check whether x and y contain the same elements, ignoring order.

has_duplicates

Check whether the input has duplicate elements.

is_hex_color

Check whether the input is a hexadecimal color code.

is_matching_regex

Check whether the string matches a regex pattern.

is_subset

Check whether x is a subset of y.

Filesystem and URL checks

has_access

Check filesystem access rights.

is_aws_s3_uri

Check whether the input contains an AWS S3 URI.

is_compressed_file

Check whether the input is a compressed file.

is_existing_aws_s3_uri

Check whether an AWS S3 URI exists (object is accessible).

is_existing_url

Check whether the URL exists (is accessible).

is_git_repo

Check whether the input is a git repository.

is_temp_file

Check whether the input is a file inside the system temp directory.

is_url

Check whether the input contains a URL.

System checks

has_cpu

Check whether the machine has at least n CPU cores.

has_github_pat

Check whether a GitHub PAT is set in the environment.

has_internet

Check whether an internet connection is available.

has_ram

Check whether the machine has at least n GB of RAM.

is_conda_enabled

Check whether a conda environment is active.

is_docker

Check whether the session is running inside Docker.

is_installed

Check whether a Python package is installed (importable).

is_linux

Check whether the OS is Linux.

is_macos

Check whether the OS is macOS.

is_package_version

Check whether an installed package satisfies a version constraint.

is_system_command

Check whether a system command is available on PATH.

is_unix

Check whether the OS is Unix-based (Linux or macOS).

is_vscode

Check whether the session is running inside VS Code.

is_windows

Check whether the OS is Windows.