def perform()

in atr/analysis.py [0:0]


def perform(path_lines: list[str]) -> Analysis:
    """Perform the analysis."""
    paths = []
    for line in path_lines:
        path = pathlib.Path(line.strip())
        if is_skippable(path):
            continue
        paths.append(path)

    analysis = Analysis(
        versions={},
        subs={},
        templates={},
    )
    for path in paths:
        size = len(path.parts)
        elements: dict[str, str | None] = {
            "core": None,
            "version": None,
            "sub": None,
            "template": None,
            "substitutions": None,
        }
        for i, component in enumerate(path.parts):
            component_parse(i, component, size, elements)

        if elements["core"] is not None:
            elements_update(elements, elements["core"], analysis)

    return analysis