Checkers package¶
- class rebasehelper.plugins.checkers.BaseChecker[source]¶
Base class of package checkers.
- DEFAULT¶
If True, the checker is run by default.
- Type:
bool
- CATEGORY¶
Category which determines when the checker is run.
- Type:
- results_dir¶
Path where the results are stored.
- Type:
str
- CATEGORY: CheckerCategory | None = None¶
- DEFAULT: bool = False¶
- classmethod get_checker_output_dir_short()[source]¶
Return short version of checker output directory
- classmethod get_important_changes(checker_output)[source]¶
Each checker has an opportunity to highlight some of its output. This function is optional, as not all checkers provide output with critical information.
- Parameters:
checker_output (dict) – Dictionary with output from the given checker.
- Returns:
List of strings to be output to CLI as warning messages.
- Return type:
list
- classmethod prepare_results_dir()[source]¶
Creates checker’s results dir.
Removes the existing results dir if it exists to avoid collisions.
- results_dir: str | None = None¶
- class rebasehelper.plugins.checkers.CheckerCategory(value)[source]¶
An enumeration.
- RPM: int = 3¶
- SOURCE: int = 1¶
- SRPM: int = 2¶
- class rebasehelper.plugins.checkers.CheckerCollection(entrypoint: str, manager: PluginManager)[source]¶
Class representing the process of running various checkers on final packages.
- run(results_dir: str, checker_name: str, **kwargs: Any) Dict[str, Any] | None [source]¶
Runs a particular checker and returns the results.
- Parameters:
results_dir – Path to a directory in which the checker should store the results.
checker_name – Name of the checker to be run.
- Raises:
NotImplementedError – If a checker with the given name doesn’t exist.
- Returns:
Results of the checker.