boilercv_pipeline.models.deps#

Dependency models.

Submodules#

Package Contents#

Classes#

DirSlicer

Directory slicer.

Functions#

get_slices

Get slices from slicers.

first_slicer

Slicer for the first n elements taken at steps.

get_slicers

Get slicers for a path.

API#

boilercv_pipeline.models.deps.get_slices(
slicers: boilercv_pipeline.models.deps.types.Slicers,
) dict[str, slice]#

Get slices from slicers.

boilercv_pipeline.models.deps.first_slicer(
n: int = 0,
step: int = 1,
) boilercv_pipeline.models.deps.types.Slicer#

Slicer for the first n elements taken at steps.

class boilercv_pipeline.models.deps.DirSlicer(
/,
**data: typing.Any,
)#

Bases: pydantic.BaseModel

Directory slicer.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

path: pathlib.Path#

None

include: list[str]#

‘Field(…)’

exclude: list[str]#

‘Field(…)’

include_patterns: list[str]#

‘Field(…)’

exclude_patterns: list[str]#

‘Field(…)’

slicers: dict[str, boilercv_pipeline.models.deps.types.Slicers]#

‘Field(…)’

slicer_patterns: dict[str, boilercv_pipeline.models.deps.types.Slicers]#

‘Field(…)’

property paths: list[pathlib.Path]#

Filtered paths.

boilercv_pipeline.models.deps.get_slicers(
path: pathlib.Path,
path_slicers: dict[str, boilercv_pipeline.models.deps.types.Slicers] | None = None,
slicer_patterns: dict[str, boilercv_pipeline.models.deps.types.Slicers] | None = None,
) boilercv_pipeline.models.deps.types.Slicers#

Get slicers for a path.