chromag package
Submodules
chromag.cli module
chromag.cli.cat module
Create and handle cat sub-command.
- chromag.cli.cat.add_cat_subcommand(subparsers)[source]
Add cat subcommand to the argparse subparsers.
chromag.cli.eod module
chromag.cli.helper module
chromag.cli.log module
chromag.cli.ls module
chromag.config module
chromag.datetime module
Utilities for handling dates/times.
- chromag.datetime.dateobs2datetime(date_obs: str) datetime[source]
Convert DATE-OBS format string representing date/time to a Python datetime object.
chromag.eod module
chromag.eod.inventory module
chromag.eod.l1_process module
chromag.eod.l2_process module
chromag.epochs module
chromag.file module
chromag.lines module
chromag.logging module
Module containing helper functions for logging.
- class chromag.logging.WrappedFormatter(fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)[source]
Bases:
FormatterCustom formatter, overrides funcName with value of funcName_override if it exists.
- format(record: LogRecord)[source]
Format the specified record as text.
The record’s attribute dictionary is used as the operand to a string formatting operation which yields the returned string. Before formatting the dictionary, a couple of preparatory steps are carried out. The message attribute of the record is computed using LogRecord.getMessage(). If the formatting string uses the time (as determined by a call to usesTime(), formatTime() is called to format the event time. If there is exception information, it is formatted using formatException() and appended to the message.
- chromag.logging.get_level(level_name: str)[source]
Convert a string name to a logging level constant value.
- level_namestr
case insensitive level name: CRITICAL, ERROR, WARN, WARNING, INFO, DEBUG
- chromag.logging.rotate_logs(basename: str, max_version: int | None = None)[source]
Rotate logs to allow a new log to be written as basename. If max_version is given, delete logs with given basename and versions beyond the max_version.
Note: no rotating or pruning done if basename doesn’t already exist.
- basenamestr
log base filename, i.e., without a “.x”
- max_versionint
largest allowable version, set to 0 not keep any versions
chromag.pipeline module
Class for representing a pipeline run, decorator for pipeline steps, etc.
chromag.plot module
Handle plotting.
chromag.plot.housekeeping module
chromag.string_helpers module
String helper routines.
chromag.validate module
Module contents
Top-level package for ChroMag parser.