petab.petablint
Command line tool to check for correct format
Functions
|
Run PEtab validator |
Parse command line arguments |
Classes
|
Custom log formatter |
- class petab.petablint.LintFormatter(fmt=None, datefmt=None, style='%', validate=True, *, defaults=None)[source]
Bases:
FormatterCustom log formatter
- format(record)[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.
- formats = {10: '\x1b[36m%(message)s', 20: '\x1b[32m%(message)s', 30: '\x1b[33m%(message)s', 40: '\x1b[31m%(message)s'}
- petab.petablint.SchemaValidationError
alias of
ValidationError
- petab.petablint.get_major_version(problem: str | dict | Path | Problem | Problem) int[source]
Get the major version number of the given problem.
- petab.petablint.init_colorama(autoreset=False, convert=None, strip=None, wrap=True)
- petab.petablint.validate_yaml_semantics(yaml_config: dict | str | Path, path_prefix: None | str | Path = None)[source]
Validate PEtab YAML file semantics
Check for existence of files. Assumes valid syntax.
Version number and contents of referenced files are not yet checked.
- Parameters:
yaml_config – PEtab YAML config as filename or dict.
path_prefix – Base location for relative paths. Defaults to location of YAML file if a filename was provided for
yaml_configor the current working directory.
- Raises:
AssertionError – in case of problems