thoth.adviser package

Subpackages

Submodules

thoth.adviser.cli module

Thoth-adviser CLI.

thoth.adviser.configuration module

Configuration used for computing recommendations.

thoth.adviser.enums module

Enum types used in thoth-adviser code.

class thoth.adviser.enums.DecisionType[source]

Bases: thoth.adviser.enums._ExtendedEnum

Type of decision used in Dependency Monkey for generating stacks.

ALL = 1
RANDOM = 2
class thoth.adviser.enums.Ecosystem[source]

Bases: thoth.adviser.enums._ExtendedEnum

Ecosystem known to recommendation engine.

PYTHON = 1
class thoth.adviser.enums.PythonRecommendationOutput[source]

Bases: thoth.adviser.enums._ExtendedEnum

Recommendation generation respecting constraints on package-version level observations.

PIPENV = 1
REQUIREMENTS = 2
class thoth.adviser.enums.RecommendationType[source]

Bases: thoth.adviser.enums._ExtendedEnum

Recommendation generation respecting constraints on package-version level observations.

LATEST = 3
STABLE = 1
TESTING = 2

thoth.adviser.exceptions module

Exceptions used within thoth-adviser package.

exception thoth.adviser.exceptions.InternalError[source]

Bases: thoth.adviser.exceptions.ThothAdviserException

An exception raised on bugs in the code base.

exception thoth.adviser.exceptions.NotFound[source]

Bases: thoth.adviser.exceptions.ThothAdviserException

An exception raised if the given resource was not found.

exception thoth.adviser.exceptions.PipfileParseError[source]

Bases: thoth.adviser.exceptions.ThothAdviserException

An exception raised on invalid Pipfile or Pipfile.lock.

exception thoth.adviser.exceptions.ThothAdviserException[source]

Bases: Exception

A base exception for this package.

exception thoth.adviser.exceptions.UnsupportedConfiguration[source]

Bases: thoth.adviser.exceptions.ThothAdviserException

An exception raised on unsupported configuration by recommendation engine.

exception thoth.adviser.exceptions.VersionIdentifierError[source]

Bases: thoth.adviser.exceptions.ThothAdviserException

An exception raised if the given version identifier is not a semver identifier.

thoth.adviser.isis module

Adapter for communicating with Isis API (API exposing project2vec).

Isis is, as of now, a simple API service. We did not generate swagger client, instead, use this adapter for transparent communication.

class thoth.adviser.isis.Isis(isis_api_url: str = None)[source]

Bases: object

An adapter for communicating with Isis API from within adviser.

get_python_package_performance_impact_all(package_tuples: Iterable[Tuple[str, str, str]]) → dict[source]

Get performance impact for a list of packages.

This accepts directly uses package tuples even the Isis API uses projects (package names). This is due to result gathering - optimization as we do not need to map back project names to package tuples.

get_python_project_performance_import[source]

Get performance import for a Python project.

This function uses cache to reduce number of calls to Isis API.

Module contents

Adviser on PyPI ecosystem.