import importlib.metadata
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from harbor.job import Job
    from harbor.trial.trial import Trial

__version__ = importlib.metadata.version("harbor")


# Lazy imports to avoid loading heavy dependencies at package import time
def __getattr__(name):
    if name == "Job":
        from harbor.job import Job

        return Job
    elif name == "Trial":
        from harbor.trial.trial import Trial

        return Trial
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")


__all__ = ["Trial", "Job"]
