# ruff: noqa: F403
# ruff: noqa: E402
from __future__ import annotations

from flux.utils import get_logger
from flux.utils import configure_logging

configure_logging()

# First import the core domain classes to avoid circular imports
from flux.domain.events import ExecutionEvent, ExecutionEventType, ExecutionState
from flux.domain.execution_context import ExecutionContext

# Then import the rest of the modules
from flux.task import task, TaskMetadata
from flux.workflow import workflow
from flux.encoders import *
from flux.output_storage import *
from flux.secret_managers import *
from flux.tasks import *
from flux.catalogs import *
from flux.context_managers import *
from flux.domain.schedule import cron, interval, once, Schedule, ScheduleType, ScheduleStatus
from flux.schedule_manager import create_schedule_manager

logger = get_logger("flux")

__all__ = [
    "task",
    "workflow",
    "TaskMetadata",
    "ExecutionEvent",
    "ExecutionState",
    "ExecutionEventType",
    "ExecutionContext",
    "cron",
    "interval",
    "once",
    "Schedule",
    "ScheduleType",
    "ScheduleStatus",
    "create_schedule_manager",
]
