thoth.adviser.steps package

Submodules

thoth.adviser.steps.cve module

Penalize stacks with a CVE.

class thoth.adviser.steps.cve.CvePenalizationStep(*, graph: thoth.storages.graph.postgres.GraphDatabase, project: thoth.python.project.Project, library_usage: Optional[Dict[str, Any]] = NOTHING, parameters: Dict[str, Any] = NOTHING, name: str = None, context: Optional[thoth.adviser.context.Context] = None)[source]

Bases: thoth.adviser.step.Step

Penalization based on CVE being present in stack.

PARAMETERS_DEFAULT = {'cve_penalization': -0.2}
run(_: thoth.adviser.state.State, package_version: thoth.python.package_version.PackageVersion) → Optional[Tuple[float, List[Dict[str, str]]]][source]

Penalize stacks with a CVE.

classmethod should_include(context: PipelineBuilderContext) → Optional[Dict[str, Any]][source]

Remove CVEs only for advised stacks.

Module contents

Implementation of steps used during simulated annealing.

class thoth.adviser.steps.CvePenalizationStep(*, graph: thoth.storages.graph.postgres.GraphDatabase, project: thoth.python.project.Project, library_usage: Optional[Dict[str, Any]] = NOTHING, parameters: Dict[str, Any] = NOTHING, name: str = None, context: Optional[thoth.adviser.context.Context] = None)[source]

Bases: thoth.adviser.step.Step

Penalization based on CVE being present in stack.

PARAMETERS_DEFAULT = {'cve_penalization': -0.2}
run(_: thoth.adviser.state.State, package_version: thoth.python.package_version.PackageVersion) → Optional[Tuple[float, List[Dict[str, str]]]][source]

Penalize stacks with a CVE.

classmethod should_include(context: PipelineBuilderContext) → Optional[Dict[str, Any]][source]

Remove CVEs only for advised stacks.