Mixins¶
- checklet mixin class mtrchk.org.momotor.check.zip.mixin.CheckZipMixin¶
A mixin for checklets to match a list of files with a set of
rulesinside a zip file. The files are also extracted from the zip file for further processing in other steps.- match option¶
Match rules for the files to check.
Can contain reference placeholders and task id placeholders, and these will be expanded before the match rules are parsed.
- Type:
Any
- Required:
False
- Multiple:
True
- All:
False
- Location:
config, step, recipe
- Default:
No default
Provided by:
BaseCheckFilesMixin
- match-default option¶
Default match rules when no
matchoptions are provided.Can contain reference placeholders and task id placeholders, and these will be expanded before the match rules are parsed.
Can only be provided in the recipe or steps, not in the config.
- Type:
Any
- Required:
False
- Multiple:
True
- All:
False
- Location:
recipe, step
- Default:
No default
Provided by:
BaseCheckFilesMixin
- accepted-file-class option¶
Default file class for files matching pass rules if no class is given in the
matchoption.If empty and the match option also do not supply a class, no file will be added to the result.
- Type:
Any
- Required:
False
- Multiple:
False
- Location:
config, step, recipe
- Default:
accepted
Provided by:
BaseCheckFilesMixin
- rejected-file-class option¶
Default file class for files matching fail rules if no class is given in the
matchoption.If empty and the match option also do not supply a class, no file will be added to the result.
- Type:
Any
- Required:
False
- Multiple:
False
- Location:
config, step, recipe
- Default:
rejected
Provided by:
BaseCheckFilesMixin
- remaining-file-class option¶
File class for files not matching any rules. Empty to not export these files.
- Type:
Any
- Required:
False
- Multiple:
False
- Location:
config, step, recipe
- Default:
Empty string
Provided by:
BaseCheckFilesMixin
- report-title option¶
Title for the generated report.
- Type:
Any
- Required:
False
- Multiple:
False
- Location:
config, step, recipe
- Default:
Checking expected files:
Provided by:
BaseCheckFilesMixin
- report-files option¶
Add a list of all files in the input ref to the report.
- Type:
boolean
- Required:
False
- Multiple:
False
- Location:
config, step, recipe
- Default:
True
Provided by:
BaseCheckFilesMixin
- fail-reason option¶
Default reason message for the failure if no message is given in the
matchoption.- Type:
Any
- Required:
False
- Multiple:
False
- Location:
config, step, recipe
- Default:
File check failed
Provided by:
BaseCheckFilesMixin
- check_file_rules(input_files)¶
Check correctness of files in input_files according to the
matchoptions, or thematch-defaultif the former are not provided.- Parameters:
input_files (
FilterableTuple[ZipFileInfo]) – list of files to check- Return type:
- Returns:
a checklet result object with the outcome and report of the check