api
api
¶
Module contains high level API of cssfinder.
TaskOptions
dataclass
¶
AmbiguousTaskKeyError
¶
run_project_from
¶
run_project_from(
project_file_path: Path | str,
tasks: list[str] | None = None,
*,
is_debug: bool = False,
is_rich: bool = True,
force_sequential: bool = False,
max_parallel: int = -1
) -> None
Load project and run all tasks.
Source code in cssfinder/api.py
run_project
¶
run_project(
project: CSSFProject,
tasks: list[str] | None = None,
*,
is_debug: bool = False,
is_rich: bool = True,
force_sequential: bool = False,
max_parallel: int = -1
) -> list[Task]
Run all tasks defined in project.
Source code in cssfinder/api.py
run_task
¶
Run task until completed.
Source code in cssfinder/api.py
run_gilbert
¶
run_gilbert(
config: GilbertCfg,
task_output_directory: Path,
*,
is_debug: bool = False,
is_rich: bool = True
) -> None
Run Gilbert algorithm part of task.
Source code in cssfinder/api.py
create_gilbert
¶
Create Gilbert object from configuration with help of specified IO.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config |
GilbertCfg
|
Algorithm configuration. |
required |
asset_io |
GilbertIO
|
IO manager to use for loading assets. |
required |
is_debug |
bool
|
Debug mode flag. |
required |
Returns:
Type | Description |
---|---|
Gilbert
|
Initialized |
Source code in cssfinder/api.py
create_report_from
¶
create_report_from(
project_file_path: Path | str,
task: str,
reports: list[ReportType],
) -> Iterable[Report]
Load project (cssfproject.json
) and create report for task selected by pattern.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
project_file_path |
Path | str
|
Path to cssfproject.json file or directory containing one. |
required |
task |
str
|
Name or glob expression matching task name, expected to result in selection of single task. |
required |
reports |
list[ReportType]
|
description |
required |
Returns:
Type | Description |
---|---|
Iterable[Report]
|
description |
Yields:
Type | Description |
---|---|
Iterator[Iterable[Report]]
|
description |
Source code in cssfinder/api.py
create_report
¶
Create report for task selected by pattern from project object.