<#9280 refactor: Split job and ELT schedules into ...
# meltano-repo-activity
g
#9280 refactor: Split job and ELT schedules into separate classes Pull request opened by edgarrmondragon ## Description To follow the principle of "Making illegal states unrepresentable". ## Related Issues • Closes #XXXX ## Summary by Sourcery Enforce distinct schedule types by splitting the Schedule class into ELTSchedule and JobSchedule subclasses and updating all related creation, parsing, CLI commands, and service logic to dispatch on the new types. Enhancements: • Introduce ELTSchedule and JobSchedule subclasses to make illegal states unrepresentable. • Refactor ScheduleService, meltano_file loader, and run invocation to instantiate and handle schedule subclasses based on their type. • Update CLI formatting, list, set, and install commands to dispatch on ELTSchedule vs JobSchedule instead of checking job attributes. • Replace NotImplementedError guards and mixed-state logic with explicit instance checks for scheduling behavior. Tests: • Adjust tests to assert on ELTSchedule and JobSchedule instance types after operations. Chores: • Define PluginInfo TypedDict and refine the plugin.info return type. • Update TaskSets.flat_args_per_set return signature to a list of lists. ## Summary by Sourcery Split the unified Schedule class into dedicated ELTSchedule and JobSchedule subclasses and update all related components to use explicit type-based dispatching for schedule operations. Enhancements: • Introduce ELTSchedule and JobSchedule subclasses to enforce distinct schedule types. • Refactor ScheduleService, meltano_file loader, CLI commands, and run invocation logic to dispatch based on schedule type. • Replace NotImplementedError guards and mixed-state attribute checks with explicit instance checks for scheduling behavior. Tests: • Update tests to assert on ELTSchedule and JobSchedule instances and verify CLI list output in text and JSON formats. Chores: • Add PluginInfo TypedDict and refine the plugin.info return type. • Extend coverage configuration to ignore TYPE_CHECKING blocks, assert_never checks, ellipsis in abstract methods, and no cover markers in pyproject.toml. meltano/meltano