Factory¶
- class neophile.factory.Factory(config: Configuration, session: ClientSession)¶
Bases:
object
Factory to create neophile components.
- Parameters
config (
neophile.config.Configuration
) – neophile configuration.session (
aiohttp.ClientSession
) – The client session to use for requests.
Methods Summary
create_all_analyzers
(path, *[, use_venv])Create all analyzers.
create_all_scanners
(path)Create all scanners.
create_helm_analyzer
(path)Create a new Helm analyzer.
Create a new Helm inventory.
Create a new Helm analyzer.
Create a new pre-commit hook analyzer.
Create a new repository processor.
create_pull_requester
(path)Create a new pull requester.
create_python_analyzer
(path, *[, use_venv])Create a new Python frozen dependency analyzer.
Methods Documentation
- create_all_analyzers(path: Path, *, use_venv: bool = False) List[BaseAnalyzer] ¶
Create all analyzers.
- Parameters
path (
pathlib.Path
) – Path to the Git repository.use_venv (
bool
, optional) – Whether to use a virtualenv to isolate analysis. Default is false.
- Returns
analyzers – List of all available analyzers.
- Return type
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(path: Path) List[BaseScanner] ¶
Create all scanners.
- Parameters
path (
pathlib.Path
) – Path to the Git repository to scan.- Returns
scanners – List of all available scanners.
- Return type
- create_helm_analyzer(path: Path) HelmAnalyzer ¶
Create a new Helm analyzer.
- Parameters
path (
pathlib.Path
) – Path to the Git repository.- Returns
analyzer – New analyzer.
- Return type
- create_helm_inventory() neophile.inventory.helm.HelmInventory ¶
Create a new Helm inventory.
Uses the configuration to determine whether this should be a cached inventory and, if so, where to put the cache.
- Returns
inventory – New inventory.
- Return type
- create_kustomize_analyzer(path: Path) KustomizeAnalyzer ¶
Create a new Helm analyzer.
- Parameters
path (
pathlib.Path
) – Path to the Git repository.- Returns
analyzer – New analyzer.
- Return type
- create_pre_commit_analyzer(path: Path) PreCommitAnalyzer ¶
Create a new pre-commit hook analyzer.
- Parameters
path (
pathlib.Path
) – Path to the Git repository.- Returns
analyzer – New analyzer.
- Return type
- create_processor() neophile.processor.Processor ¶
Create a new repository processor.
- create_pull_requester(path: Path) PullRequester ¶
Create a new pull requester.
- Parameters
path (
pathlib.Path
) – Path to the Git repository.- Returns
pull_requester – New pull requester.
- Return type
- create_python_analyzer(path: Path, *, use_venv: bool = False) PythonAnalyzer ¶
Create a new Python frozen dependency analyzer.
- Parameters
path (
pathlib.Path
) – Path to the Git repository.use_venv (
bool
, optional) – Whether to use a virtualenv to isolate analysis. Default is false.
- Returns
analyzer – New analyzer.
- Return type