Run Control Validators (regolith.validators)

Validators and converters for regolith input.

regolith.validators.always_false(x)[source]

Returns False

regolith.validators.always_true(x)[source]

Returns True

regolith.validators.ensure_database(db)[source]
regolith.validators.ensure_databases(dbs)[source]

Ensures each dataset in a list of databases

regolith.validators.ensure_email(email)[source]

Ensures the email top-level key is well formed.

regolith.validators.ensure_store(store)[source]
regolith.validators.ensure_stores(stores)[source]

Ensures each store in a list of stores

regolith.validators.ensure_string(x)[source]

Returns a string if x is not a string, and x if it already is.

regolith.validators.is_bool(x)[source]

Tests if something is a boolean

regolith.validators.is_int(x)[source]

Tests if something is an integer

regolith.validators.is_string(x)[source]

Tests if something is a string

regolith.validators.noop(x)[source]

Does nothing, just returns the input.

regolith.validators.to_bool(x)[source]

“Converts to a boolean in a semantically meaningful way.