lookout.core.manager

Module Contents

class lookout.core.manager.AnalyzerManager(analyzers:Iterable[Type[Analyzer]], model_repository:ModelRepository, data_service:DataService)

Bases:lookout.core.event_listener.EventHandlers

Manages several Analyzer-s: runs them and trains the models.

Relies on a ModelRepository to retrieve and update the models. Also requires the address of the data (UAST, contents) gRPC service, typically running in the same Lookout server.

version

Return the version string that depends on all the managed analyzers.

process_review_event(self, request:ReviewEvent)

Callback for review events invoked by EventListener.

process_push_event(self, request:PushEvent)

Callback for push events invoked by EventListener.

warmup(self, urls:Sequence[str])

Warm up the model cache (which supposedly exists in the injected ModelRepository). We get the models corresponding to the managed analyzers and the specified list of repositories.

Parameters:urls – The list of Git repositories for which to fetch the models.