thoth.adviser.sieves package

Submodules

thoth.adviser.sieves.index_enabled module

A sieve for filtering out disabled Python package indexes.

class thoth.adviser.sieves.index_enabled.PackageIndexSieve(*, configuration: Dict[str, Any] = NOTHING, name: str = None, cached_records: Dict[str, Optional[bool]] = NOTHING)[source]

Bases: thoth.adviser.sieve.Sieve

Filter out disabled Python package indexes.

run(package_versions: Generator[[thoth.python.package_version.PackageVersion, None], None]) → Generator[[thoth.python.package_version.PackageVersion, None], None][source]

Filter out package versions based on disabled Python package index.

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

Remove indexes which are not enabled in pipeline configuration.

thoth.adviser.sieves.locked module

A step to filter out packages that are pinned to a specific version.

class thoth.adviser.sieves.locked.CutLockedSieve(*, configuration: Dict[str, Any] = NOTHING, name: str = None)[source]

Bases: thoth.adviser.sieve.Sieve

Cut-off packages that are locked to a specific version.

If a project pins down a package to a specific release, respect that. Otherwise resolver does not need to find any resolved stack, especially considering only N latest versions and the pinned version is >=N+1 version.

run(package_versions: Generator[[thoth.python.package_version.PackageVersion, None], None]) → Generator[[thoth.python.package_version.PackageVersion, None], None][source]

Cut-off locked versions to a specific version.

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

Include cut-locked pipeline sieve for adviser or Dependency Monkey, always.

thoth.adviser.sieves.prereleases module

A sieve to filter out pre-releases in direct dependencies.

class thoth.adviser.sieves.prereleases.CutPreReleasesSieve(*, configuration: Dict[str, Any] = NOTHING, name: str = None)[source]

Bases: thoth.adviser.sieve.Sieve

Cut-off pre-releases if project does not explicitly allows them.

run(package_versions: Generator[[thoth.python.package_version.PackageVersion, None], None]) → Generator[[thoth.python.package_version.PackageVersion, None], None][source]

Cut-off pre-releases if project does not explicitly allows them.

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

Include cut-prereleases pipeline sieve for adviser or Dependency Monkey if pre-releases are not allowed.

thoth.adviser.sieves.solved module

A sieve for filtering out build time/installation errors of Python packages.

class thoth.adviser.sieves.solved.SolvedSieve(*, configuration: Dict[str, Any] = NOTHING, name: str = None)[source]

Bases: thoth.adviser.sieve.Sieve

Filter out build time/installation errors of Python packages.

CONFIGURATION_DEFAULT = {'without_error': True}
run(package_versions: Generator[[thoth.python.package_version.PackageVersion, None], None]) → Generator[[thoth.python.package_version.PackageVersion, None], None][source]

Filter out packages based on build time/installation issues..

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

Include solved pipeline sieve for adviser or Dependency Monkey on pipeline creation.

thoth.adviser.sieves.version_constraint module

A sieve for filtering packages based on constraints.

This sieve will filter out packages in specific versions if they occur in the resolved stack.

class thoth.adviser.sieves.version_constraint.VersionConstraintSieve(specifier: Optional[packaging.specifiers.Specifier] = None, *, configuration: Dict[str, Any] = NOTHING, name: str = None)[source]

Bases: thoth.adviser.sieve.Sieve

Filter out packages based on version constraints if they occur in the stack.

CONFIGURATION_DEFAULT = {'package_name': None, 'version_specifier': None}
pre_run() → None[source]

Parse and initialize specifier used.

run(package_versions: Generator[[thoth.python.package_version.PackageVersion, None], None]) → Generator[[thoth.python.package_version.PackageVersion, None], None][source]

Filter out packages based on build time/installation issues..

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

Include this sieve only if user explicitly asks for it.

Module contents

Implementation of sieves used in adviser pipeline.

class thoth.adviser.sieves.CutLockedSieve(*, configuration: Dict[str, Any] = NOTHING, name: str = None)[source]

Bases: thoth.adviser.sieve.Sieve

Cut-off packages that are locked to a specific version.

If a project pins down a package to a specific release, respect that. Otherwise resolver does not need to find any resolved stack, especially considering only N latest versions and the pinned version is >=N+1 version.

run(package_versions: Generator[[thoth.python.package_version.PackageVersion, None], None]) → Generator[[thoth.python.package_version.PackageVersion, None], None][source]

Cut-off locked versions to a specific version.

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

Include cut-locked pipeline sieve for adviser or Dependency Monkey, always.

class thoth.adviser.sieves.CutPreReleasesSieve(*, configuration: Dict[str, Any] = NOTHING, name: str = None)[source]

Bases: thoth.adviser.sieve.Sieve

Cut-off pre-releases if project does not explicitly allows them.

run(package_versions: Generator[[thoth.python.package_version.PackageVersion, None], None]) → Generator[[thoth.python.package_version.PackageVersion, None], None][source]

Cut-off pre-releases if project does not explicitly allows them.

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

Include cut-prereleases pipeline sieve for adviser or Dependency Monkey if pre-releases are not allowed.

class thoth.adviser.sieves.PackageIndexSieve(*, configuration: Dict[str, Any] = NOTHING, name: str = None, cached_records: Dict[str, Optional[bool]] = NOTHING)[source]

Bases: thoth.adviser.sieve.Sieve

Filter out disabled Python package indexes.

run(package_versions: Generator[[thoth.python.package_version.PackageVersion, None], None]) → Generator[[thoth.python.package_version.PackageVersion, None], None][source]

Filter out package versions based on disabled Python package index.

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

Remove indexes which are not enabled in pipeline configuration.

class thoth.adviser.sieves.SolvedSieve(*, configuration: Dict[str, Any] = NOTHING, name: str = None)[source]

Bases: thoth.adviser.sieve.Sieve

Filter out build time/installation errors of Python packages.

CONFIGURATION_DEFAULT = {'without_error': True}
run(package_versions: Generator[[thoth.python.package_version.PackageVersion, None], None]) → Generator[[thoth.python.package_version.PackageVersion, None], None][source]

Filter out packages based on build time/installation issues..

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

Include solved pipeline sieve for adviser or Dependency Monkey on pipeline creation.

class thoth.adviser.sieves.VersionConstraintSieve(specifier: Optional[packaging.specifiers.Specifier] = None, *, configuration: Dict[str, Any] = NOTHING, name: str = None)[source]

Bases: thoth.adviser.sieve.Sieve

Filter out packages based on version constraints if they occur in the stack.

CONFIGURATION_DEFAULT = {'package_name': None, 'version_specifier': None}
pre_run() → None[source]

Parse and initialize specifier used.

run(package_versions: Generator[[thoth.python.package_version.PackageVersion, None], None]) → Generator[[thoth.python.package_version.PackageVersion, None], None][source]

Filter out packages based on build time/installation issues..

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

Include this sieve only if user explicitly asks for it.