Code Documentation: Utils

mastml.utils Module

The utils module contains a collection of miscellaneous methods and error handling used throughout MAST-ML

Functions

activate_logging(savepath, paths[, …]) Method to create MAST-ML logger file
ceil Return the ceiling of x as an Integral.
floor Return the floor of x as an Integral.
join(a, *p) Join two or more pathname components, inserting ‘/’ as needed.
log(x, [base=math.e]) Return the logarithm of x to the given base.
log_header(paths, log) Method to create header for MAST-ML logger
nice_range(lower, upper) Method to create a range of values, including the specified start and end points, with nicely spaced intervals
verbosalize_logger(log, verbosity)

Classes

BetweenFilter(min_level, max_level) Class to aid in handling logger display levels
ConfError Class representing error in input configuration file
FileNotFoundError Class representing error raised when a needed file cannot be found
FiletypeError Class representing error raised when an improper file extension is used
InvalidConfParameters Class representing error raised when you have invalid input configuration file parameters
InvalidConfSection Class representing error raised when an invalid section name is present in the input configuration file
InvalidConfSubSection Class representing error raised when an invalid subsection name is present in the input configuration file
InvalidModel Class representing error when model does not exist
InvalidValue Class representing error raised when an invalid value has been used
MastError Base class for MAST-ML specific errors that should be shown to the user
MissingColumnError Class representing error raised when your csv doesn’t have the specified column
defaultdict defaultdict(default_factory[, …]) –> dict with default factory

Class Inheritance Diagram

Inheritance diagram of mastml.utils.BetweenFilter, mastml.utils.ConfError, mastml.utils.FileNotFoundError, mastml.utils.FiletypeError, mastml.utils.InvalidConfParameters, mastml.utils.InvalidConfSection, mastml.utils.InvalidConfSubSection, mastml.utils.InvalidModel, mastml.utils.InvalidValue, mastml.utils.MastError, mastml.utils.MissingColumnError