Coverage for src / zooc / run / run_config.py: 100%

16 statements  

« prev     ^ index     » next       coverage.py v7.13.0, created at 2025-12-11 21:45 +0000

1"""Data for calibration run.""" 

2from __future__ import annotations 

3 

4from dataclasses import dataclass 

5from typing import TYPE_CHECKING 

6 

7from zooc.data.temps import Temps 

8 

9# Avoid circular imports 

10if TYPE_CHECKING: 

11 from .measure_methods import MeasureMethods 

12 from .temp_scan_methods import TempsScanMethods 

13 

14@dataclass(kw_only=True, frozen=True) 

15class RunConfig: 

16 """Collection of settings to run the calibration routine. 

17 

18 This is build from the configuration file and passed to the calibration run. 

19 

20 :param temps_ref: Reference temperatures for the calibration run. 

21 :param bed_temps: List of bed temperatures to scan through [°C]. 

22 :param extruder_temps: List of extruder temperatures to scan through [°C]. 

23 :param horizontal_move_speed: Speed of horizontal moves [mm/s]. 

24 :param zero_reference_position: Position to move the nozzle to before the calibration run [mm]. 

25 :param pre_run_gcode: G-code to run before the calibration run. 

26 :param post_run_gcode: G-code to run after the calibration run. 

27 :param wait_stabilize_s: Time to wait for the temperatures to stabilize before measuring [s]. 

28 :param measure_method: Method to measure the Z-offset. 

29 :param temps_scan_method: Method to scan through the bed and extruder temperatures. 

30 """ 

31 

32 temps_ref: Temps 

33 bed_temps: list[float] 

34 extruder_temps: list[float] 

35 horizontal_move_speed: float 

36 zero_reference_position: tuple[float, float] 

37 pre_run_gcode: list[str] 

38 post_run_gcode: list[str] 

39 wait_stabilize_s: float 

40 measure_method: MeasureMethods 

41 temps_scan_method: TempsScanMethods