Source code for arcade

"""ARCADE: Automated Readout Classification, Analysis, Design, and Evaluation."""

from __future__ import annotations

import importlib as _importlib

from ._logging import configure_logging

__version__ = "0.1.0"

__all__ = [
    "config",
    "hardware",
    "viz",
    "utils",
    "data",
    "features",
    "classifiers",
    "training",
    "optimization",
    "classifieroptimization",
    "nn",
    "pipeline",
    "run",
    "configure_logging",
    "load",
    "compare",
    "explore",
    "describe",
]


def __getattr__(name: str):
    _api_funcs = {"load", "compare", "explore", "describe"}
    if name in _api_funcs:
        from . import api as _api

        return getattr(_api, name)
    _lazy = {
        "hardware", "viz", "utils",
        "data", "features", "classifiers", "training",
        "optimization", "classifieroptimization", "nn",
        "pipeline",
    }
    if name in _lazy:
        return _importlib.import_module(f".{name}", __name__)
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")


[docs] def run(config_path: str) -> dict: """Run the full ARCADE pipeline from a YAML config file. This is the primary programmatic entry point (same as ``arcade run``). Args: config_path: Path to a main YAML configuration file (see ``configs/example.yaml`` and the docs config schema). Returns: Results dict from all pipeline stages (data, classify, hardware, report). """ from .pipeline import ArcadePipeline return ArcadePipeline().run(config_path)