Warning

This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

Source code for galaxy.util.specs

import functools
import operator

from galaxy import util


# Utility methods for specifing maps.
[docs]def to_str_or_none(value): if value is None: return None else: return str(value)
[docs]def to_bool_or_none(value): return util.string_as_bool_or_none(value)
[docs]def to_bool(value): return util.asbool(value)
[docs]def to_float_or_none(value): if value is None: return None else: return float(value)
# Utility methods for specifing valid...
[docs]def is_in(*args): return functools.partial(operator.contains, args)