thoth.adviser.strides package

Submodules

thoth.adviser.strides.random_decision module

Filter out states randomly.

class thoth.adviser.strides.random_decision.RandomDecisionStride(*, 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.stride.Stride

Filter out states randomly.

run(state: thoth.adviser.state.State) → None[source]

Flip a coin and decide - tails are not acceptable.

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

Remove CVEs only for advised stacks.

thoth.adviser.strides.score_filter module

Filter out stacks which have same score.

class thoth.adviser.strides.score_filter.ScoreFilteringStride(*, 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, previous_stack_score: Optional[float] = None)[source]

Bases: thoth.adviser.stride.Stride

Filtering of stacks which encountered runtime errors.

run(state: thoth.adviser.state.State) → None[source]

Filter out packages which have runtime errors.

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

Remove CVEs only for advised stacks.

Module contents

Implementation of strides used to filter out resolved stacks.

class thoth.adviser.strides.RandomDecisionStride(*, 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.stride.Stride

Filter out states randomly.

run(state: thoth.adviser.state.State) → None[source]

Flip a coin and decide - tails are not acceptable.

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

Remove CVEs only for advised stacks.

class thoth.adviser.strides.ScoreFilteringStride(*, 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, previous_stack_score: Optional[float] = None)[source]

Bases: thoth.adviser.stride.Stride

Filtering of stacks which encountered runtime errors.

run(state: thoth.adviser.state.State) → None[source]

Filter out packages which have runtime errors.

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

Remove CVEs only for advised stacks.