Environment (rever.environ)

Custom environment handling tools for rever.

rever.environ.context()

A context manager for entering and leaving the rever environment safely.

rever.environ.csv_to_list(x)

Converts a comma separated string to a list of strings.

rever.environ.default_dag(env)

Creates a default activity DAG.

rever.environ.detype_logger(x)

Returns the filename of the logger.

rever.environ.is_date(x)

Checks if x is a datetime.date object.

rever.environ.is_dict_str_str_or_none(x)

Checks if x is a mutable mapping from strings to strings or None

rever.environ.is_logger(x)

Validates if something is a valid logger

rever.environ.list_to_csv(x)

Converts a list of str to a comma-separated string.

rever.environ.rever_config_dir(env)

Ensures and returns the $REVER_CONFIG_DIR

rever.environ.rever_detype_env()

Returns a detyped version of the environment containing only the rever environment variables.

rever.environ.rever_envvar_names()

Returns the rever environment variable names as a set of str.

rever.environ.setup()
rever.environ.str_to_date(s)

Converts a string in YYYY-MM-DD format to a date.

rever.environ.teardown(orig_thread_subprocs=True)
rever.environ.to_logger(x)

If x is a string, this will be set as $LOGGER.filename and then returns $LOGGER. Otherwise, returns x if x is a Logger already.

rever.environ.today(env)

Provides today’s date