Factory#

class neophile.factory.Factory(config, http_client)#

Bases: object

Factory to create neophile components.

Parameters:
  • config (Config) – neophile configuration.

  • http_client (AsyncClient) – HTTP client to use for requests.

Methods Summary

create_all_analyzers(*[, use_venv])

Create all analyzers.

create_all_scanners()

Create all scanners.

create_pre_commit_analyzer()

Create a new pre-commit hook analyzer.

create_processor()

Create a new repository processor.

create_pull_requester()

Create a new pull requester.

create_python_analyzer(*[, use_venv])

Create a new Python frozen dependency analyzer.

Methods Documentation

create_all_analyzers(*, use_venv=False)#

Create all analyzers.

Parameters:

use_venv (bool, default: False) – Whether to use a virtualenv to isolate analysis.

Returns:

List of all available analyzers.

Return type:

list of BaseAnalyzer

Notes

The Python analyzer requires a clean Git tree in order to determine if any changes were necessary, and therefore must run first if the analyzers are run in update mode (which means they will make changes to the working tree).

create_all_scanners()#

Create all scanners.

Returns:

List of all available scanners.

Return type:

list of BaseScanner

create_pre_commit_analyzer()#

Create a new pre-commit hook analyzer.

Returns:

New analyzer.

Return type:

PreCommitAnalyzer

create_processor()#

Create a new repository processor.

Parameters:

use_venv – Whether to use a virtualenv to isolate analysis.

Returns:

New processor.

Return type:

Processor

create_pull_requester()#

Create a new pull requester.

Returns:

New pull requester.

Return type:

PullRequester

create_python_analyzer(*, use_venv=False)#

Create a new Python frozen dependency analyzer.

Parameters:

use_venv (bool, default: False) – Whether to use a virtualenv to isolate analysis.

Returns:

New analyzer.

Return type:

PythonAnalyzer