Build: #2 failed

Job: Pipeline PR Test 6.6.6 failed

Stages & jobs

  1. Default Stage

Build log

The build generated 28,816 lines of output.   The output is too long and has been truncated to the last 1,000 lines. Download or view full build log.

23-Feb-2026 22:06:10 recipes/recipe_converter_test.py::test_get_comment[hsd_baseline-config2-] PASSED [ 97%]
23-Feb-2026 22:06:10 recipes/recipe_converter_test.py::test_get_comment[hsd_baseline-config3-        # This is comment\n] PASSED [ 98%]
23-Feb-2026 22:06:10 recipes/recipe_converter_test.py::test_get_comment[hsd_baseline-config4-        # This is comment\n] PASSED [ 98%]
23-Feb-2026 22:06:10 recipes/recipe_converter_test.py::test_get_comment[hsd_baseline-config5-        # This is \n        # multi-line comment\n] PASSED [ 98%]
23-Feb-2026 22:06:10 recipes/recipe_converter_test.py::test_get_comment[hsd_baseline-config6-        # This is \n        # multi-line comment\n] PASSED [ 98%]
23-Feb-2026 22:06:10 recipes/recipe_converter_test.py::test_get_execution_command[breakpoint-config0-] PASSED [ 98%]
23-Feb-2026 22:06:10 recipes/recipe_converter_test.py::test_get_execution_command[hsd_baseline-config1-        hsd_baseline()] PASSED [ 98%]
23-Feb-2026 22:06:11 recipes/recipe_converter_test.py::test_get_execution_command[hsd_baseline-config2-        hsd_baseline(pstr='strval', pint=3)] PASSED [ 98%]
23-Feb-2026 22:06:11 recipes/recipe_converter_test.py::test_get_execution_command[hsd_importdata-config3-        hsd_importdata(vis=vislist)\n\n        if importonly:\n            raise Exception(IMPORT_ONLY)] PASSED [ 99%]
23-Feb-2026 22:06:11 recipes/recipe_converter_test.py::test_c2p PASSED                        [ 99%]
23-Feb-2026 22:06:11 recipes/recipe_converter_test.py::test_to_procedure PASSED               [ 99%]
23-Feb-2026 22:06:11 recipes/recipe_converter_test.py::test_export[False-] PASSED             [ 99%]
23-Feb-2026 22:06:11 recipes/recipe_converter_test.py::test_export[True-plotlevel='summary'] PASSED [ 99%]
23-Feb-2026 22:06:11 recipes/recipe_converter_test.py::test_main SKIPPED (Skip testing ma...) [ 99%]
23-Feb-2026 22:06:11 recipes/recipe_converter_test.py::test_generate_all SKIPPED (Skip te...) [100%]
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 =================================== FAILURES ===================================
23-Feb-2026 22:06:11 ______________ test_build_fitting_configuration[inp0-None-False] _______________
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 inp = {17: 'cspline', 19: 'cspline', 23: 'cspline'}, expected = None
23-Feb-2026 22:06:11 should_raise = False
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @pytest.mark.parametrize(
23-Feb-2026 22:06:11         "inp, expected, should_raise",
23-Feb-2026 22:06:11         [
23-Feb-2026 22:06:11             # valid inputs
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, None, False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, {}, False),
23-Feb-2026 22:06:11             ({17: "cspline", 19: "cspline", 23: "cspline"}, "spline", False), #   SPLINE = CSPLINE in the FittingFunction class of fitrorder.py
23-Feb-2026 22:06:11             ({17: DEF, 19: DEF, 23: DEF}, {30: "poly"}, False),
23-Feb-2026 22:06:11             ({17: "poly",   19: "poly",   23: "poly"}, "poly", False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: "poly"}, {"23":"poly"}, False),
23-Feb-2026 22:06:11             ({17:"poly",  19:"cspline",  23: DEF}, {"17":"poly", 19:"spline"}, False),
23-Feb-2026 22:06:11             ({17:"poly",    19:"cspline",  23:"poly"}, {17:"poly", 19:"spline", 23:"poly"}, False),
23-Feb-2026 22:06:11             # error inputs
23-Feb-2026 22:06:11             (ValueError, "badfunc", True),
23-Feb-2026 22:06:11             (ValueError, {19:"invalid"}, True),
23-Feb-2026 22:06:11         ],
23-Feb-2026 22:06:11     )
23-Feb-2026 22:06:11     def test_build_fitting_configuration(inp, expected, should_raise):
23-Feb-2026 22:06:11         if should_raise:
23-Feb-2026 22:06:11             with pytest.raises(expected):
23-Feb-2026 22:06:11                 worker.build_fitting_configuration(inp, SPWS)
23-Feb-2026 22:06:11             return
23-Feb-2026 22:06:11 >       cfg = worker.build_fitting_configuration(inp, SPWS)
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker_test.py:34:
23-Feb-2026 22:06:11 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 spw_id_list = {17: 'cspline', 19: 'cspline', 23: 'cspline'}
23-Feb-2026 22:06:11 fit_function = [17, 19, 23], ms = None, context = None, switchpoly = True
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @staticmethod
23-Feb-2026 22:06:11     def build_fitting_configuration(
23-Feb-2026 22:06:11             spw_id_list: Union[List[int], set[Any]],
23-Feb-2026 22:06:11             fit_function: Optional[Union[str, Dict[Union[int, str], str]]] = "cspline",
23-Feb-2026 22:06:11             ms: MeasurementSet = None,
23-Feb-2026 22:06:11             context: Context = None,
23-Feb-2026 22:06:11             switchpoly=True
23-Feb-2026 22:06:11     ) -> Dict[int, BaselineFitParamConfig]:
23-Feb-2026 22:06:11         """
23-Feb-2026 22:06:11         Convert the fit_function parameter into a dictionary mapping each SPW ID to its BaselineFitParamConfig.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         If fit_function is None or falsy, the default 'cspline' is used.
23-Feb-2026 22:06:11         If a single string is provided, one BaselineFitParamConfig instance is created and applied to all SPWs.
23-Feb-2026 22:06:11         If a dictionary is provided, keys are normalized to integers; SPWs not specified default to 'cspline'.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Args:
23-Feb-2026 22:06:11             switchpoly:
23-Feb-2026 22:06:11             context:
23-Feb-2026 22:06:11             ms: Measurement set
23-Feb-2026 22:06:11             fit_function: The fit function parameter (str, dict, or None).
23-Feb-2026 22:06:11             spw_id_list: List of spectral window IDs to process.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Raises:
23-Feb-2026 22:06:11             ValueError: fit_function has unsupported value.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Returns:
23-Feb-2026 22:06:11             A dictionary mapping each SPW ID (int) to a BaselineFitParamConfig instance.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         """
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         valid_functions = {'spline', 'cspline', 'poly', 'polynomial', 'sinusoid'}
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         if isinstance(fit_function, str):
23-Feb-2026 22:06:11             if fit_function not in valid_functions:
23-Feb-2026 22:06:11                 raise ValueError(f"Unsupported fitting function value: {fit_function}")
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             heuristics_out = dict.fromkeys(
23-Feb-2026 22:06:11                 spw_id_list,
23-Feb-2026 22:06:11                 BaselineFitParamConfig(
23-Feb-2026 22:06:11                         fitfunc=fit_function,
23-Feb-2026 22:06:11                         switchpoly=switchpoly
23-Feb-2026 22:06:11                 )
23-Feb-2026 22:06:11             )
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             return heuristics_out
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         if isinstance(fit_function, dict):
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             spw_function_map = dict.fromkeys(spw_id_list, "cspline")
23-Feb-2026 22:06:11             spw_function_map.update(fit_function)
23-Feb-2026 22:06:11             heuristics_out = {}
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             # Need to fill in the input fit functions. We could make this cleaner without
23-Feb-2026 22:06:11             # the virtual2real section, but I'm not sure if the keys will match.
23-Feb-2026 22:06:11             for key, value in spw_function_map.items():
23-Feb-2026 22:06:11                 # Check that all the functions are supported.
23-Feb-2026 22:06:11                 if not value in valid_functions:
23-Feb-2026 22:06:11                     raise ValueError(f"Unsupported fitting function value: {value}")
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11                 _key = context.observing_run.virtual2real_spw_id(key, ms) if context else key
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11                 heuristics_out[_key] = BaselineFitParamConfig(
23-Feb-2026 22:06:11                         fitfunc=spw_function_map[key],
23-Feb-2026 22:06:11                         switchpoly=switchpoly
23-Feb-2026 22:06:11                     )
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             return heuristics_out
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         else:
23-Feb-2026 22:06:11 >           raise ValueError(f"Unsupported fitting function type: {type(fit_function)}")
23-Feb-2026 22:06:11 E           ValueError: Unsupported fitting function type: <class 'list'>
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker.py:662: ValueError
23-Feb-2026 22:06:11 ____________ test_build_fitting_configuration[inp1-expected1-False] ____________
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 inp = {17: 'cspline', 19: 'cspline', 23: 'cspline'}, expected = {}
23-Feb-2026 22:06:11 should_raise = False
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @pytest.mark.parametrize(
23-Feb-2026 22:06:11         "inp, expected, should_raise",
23-Feb-2026 22:06:11         [
23-Feb-2026 22:06:11             # valid inputs
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, None, False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, {}, False),
23-Feb-2026 22:06:11             ({17: "cspline", 19: "cspline", 23: "cspline"}, "spline", False), #   SPLINE = CSPLINE in the FittingFunction class of fitrorder.py
23-Feb-2026 22:06:11             ({17: DEF, 19: DEF, 23: DEF}, {30: "poly"}, False),
23-Feb-2026 22:06:11             ({17: "poly",   19: "poly",   23: "poly"}, "poly", False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: "poly"}, {"23":"poly"}, False),
23-Feb-2026 22:06:11             ({17:"poly",  19:"cspline",  23: DEF}, {"17":"poly", 19:"spline"}, False),
23-Feb-2026 22:06:11             ({17:"poly",    19:"cspline",  23:"poly"}, {17:"poly", 19:"spline", 23:"poly"}, False),
23-Feb-2026 22:06:11             # error inputs
23-Feb-2026 22:06:11             (ValueError, "badfunc", True),
23-Feb-2026 22:06:11             (ValueError, {19:"invalid"}, True),
23-Feb-2026 22:06:11         ],
23-Feb-2026 22:06:11     )
23-Feb-2026 22:06:11     def test_build_fitting_configuration(inp, expected, should_raise):
23-Feb-2026 22:06:11         if should_raise:
23-Feb-2026 22:06:11             with pytest.raises(expected):
23-Feb-2026 22:06:11                 worker.build_fitting_configuration(inp, SPWS)
23-Feb-2026 22:06:11             return
23-Feb-2026 22:06:11 >       cfg = worker.build_fitting_configuration(inp, SPWS)
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker_test.py:34:
23-Feb-2026 22:06:11 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 spw_id_list = {17: 'cspline', 19: 'cspline', 23: 'cspline'}
23-Feb-2026 22:06:11 fit_function = [17, 19, 23], ms = None, context = None, switchpoly = True
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @staticmethod
23-Feb-2026 22:06:11     def build_fitting_configuration(
23-Feb-2026 22:06:11             spw_id_list: Union[List[int], set[Any]],
23-Feb-2026 22:06:11             fit_function: Optional[Union[str, Dict[Union[int, str], str]]] = "cspline",
23-Feb-2026 22:06:11             ms: MeasurementSet = None,
23-Feb-2026 22:06:11             context: Context = None,
23-Feb-2026 22:06:11             switchpoly=True
23-Feb-2026 22:06:11     ) -> Dict[int, BaselineFitParamConfig]:
23-Feb-2026 22:06:11         """
23-Feb-2026 22:06:11         Convert the fit_function parameter into a dictionary mapping each SPW ID to its BaselineFitParamConfig.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         If fit_function is None or falsy, the default 'cspline' is used.
23-Feb-2026 22:06:11         If a single string is provided, one BaselineFitParamConfig instance is created and applied to all SPWs.
23-Feb-2026 22:06:11         If a dictionary is provided, keys are normalized to integers; SPWs not specified default to 'cspline'.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Args:
23-Feb-2026 22:06:11             switchpoly:
23-Feb-2026 22:06:11             context:
23-Feb-2026 22:06:11             ms: Measurement set
23-Feb-2026 22:06:11             fit_function: The fit function parameter (str, dict, or None).
23-Feb-2026 22:06:11             spw_id_list: List of spectral window IDs to process.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Raises:
23-Feb-2026 22:06:11             ValueError: fit_function has unsupported value.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Returns:
23-Feb-2026 22:06:11             A dictionary mapping each SPW ID (int) to a BaselineFitParamConfig instance.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         """
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         valid_functions = {'spline', 'cspline', 'poly', 'polynomial', 'sinusoid'}
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         if isinstance(fit_function, str):
23-Feb-2026 22:06:11             if fit_function not in valid_functions:
23-Feb-2026 22:06:11                 raise ValueError(f"Unsupported fitting function value: {fit_function}")
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             heuristics_out = dict.fromkeys(
23-Feb-2026 22:06:11                 spw_id_list,
23-Feb-2026 22:06:11                 BaselineFitParamConfig(
23-Feb-2026 22:06:11                         fitfunc=fit_function,
23-Feb-2026 22:06:11                         switchpoly=switchpoly
23-Feb-2026 22:06:11                 )
23-Feb-2026 22:06:11             )
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             return heuristics_out
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         if isinstance(fit_function, dict):
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             spw_function_map = dict.fromkeys(spw_id_list, "cspline")
23-Feb-2026 22:06:11             spw_function_map.update(fit_function)
23-Feb-2026 22:06:11             heuristics_out = {}
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             # Need to fill in the input fit functions. We could make this cleaner without
23-Feb-2026 22:06:11             # the virtual2real section, but I'm not sure if the keys will match.
23-Feb-2026 22:06:11             for key, value in spw_function_map.items():
23-Feb-2026 22:06:11                 # Check that all the functions are supported.
23-Feb-2026 22:06:11                 if not value in valid_functions:
23-Feb-2026 22:06:11                     raise ValueError(f"Unsupported fitting function value: {value}")
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11                 _key = context.observing_run.virtual2real_spw_id(key, ms) if context else key
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11                 heuristics_out[_key] = BaselineFitParamConfig(
23-Feb-2026 22:06:11                         fitfunc=spw_function_map[key],
23-Feb-2026 22:06:11                         switchpoly=switchpoly
23-Feb-2026 22:06:11                     )
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             return heuristics_out
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         else:
23-Feb-2026 22:06:11 >           raise ValueError(f"Unsupported fitting function type: {type(fit_function)}")
23-Feb-2026 22:06:11 E           ValueError: Unsupported fitting function type: <class 'list'>
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker.py:662: ValueError
23-Feb-2026 22:06:11 _____________ test_build_fitting_configuration[inp2-spline-False] ______________
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 inp = {17: 'cspline', 19: 'cspline', 23: 'cspline'}, expected = 'spline'
23-Feb-2026 22:06:11 should_raise = False
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @pytest.mark.parametrize(
23-Feb-2026 22:06:11         "inp, expected, should_raise",
23-Feb-2026 22:06:11         [
23-Feb-2026 22:06:11             # valid inputs
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, None, False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, {}, False),
23-Feb-2026 22:06:11             ({17: "cspline", 19: "cspline", 23: "cspline"}, "spline", False), #   SPLINE = CSPLINE in the FittingFunction class of fitrorder.py
23-Feb-2026 22:06:11             ({17: DEF, 19: DEF, 23: DEF}, {30: "poly"}, False),
23-Feb-2026 22:06:11             ({17: "poly",   19: "poly",   23: "poly"}, "poly", False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: "poly"}, {"23":"poly"}, False),
23-Feb-2026 22:06:11             ({17:"poly",  19:"cspline",  23: DEF}, {"17":"poly", 19:"spline"}, False),
23-Feb-2026 22:06:11             ({17:"poly",    19:"cspline",  23:"poly"}, {17:"poly", 19:"spline", 23:"poly"}, False),
23-Feb-2026 22:06:11             # error inputs
23-Feb-2026 22:06:11             (ValueError, "badfunc", True),
23-Feb-2026 22:06:11             (ValueError, {19:"invalid"}, True),
23-Feb-2026 22:06:11         ],
23-Feb-2026 22:06:11     )
23-Feb-2026 22:06:11     def test_build_fitting_configuration(inp, expected, should_raise):
23-Feb-2026 22:06:11         if should_raise:
23-Feb-2026 22:06:11             with pytest.raises(expected):
23-Feb-2026 22:06:11                 worker.build_fitting_configuration(inp, SPWS)
23-Feb-2026 22:06:11             return
23-Feb-2026 22:06:11 >       cfg = worker.build_fitting_configuration(inp, SPWS)
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker_test.py:34:
23-Feb-2026 22:06:11 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 spw_id_list = {17: 'cspline', 19: 'cspline', 23: 'cspline'}
23-Feb-2026 22:06:11 fit_function = [17, 19, 23], ms = None, context = None, switchpoly = True
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @staticmethod
23-Feb-2026 22:06:11     def build_fitting_configuration(
23-Feb-2026 22:06:11             spw_id_list: Union[List[int], set[Any]],
23-Feb-2026 22:06:11             fit_function: Optional[Union[str, Dict[Union[int, str], str]]] = "cspline",
23-Feb-2026 22:06:11             ms: MeasurementSet = None,
23-Feb-2026 22:06:11             context: Context = None,
23-Feb-2026 22:06:11             switchpoly=True
23-Feb-2026 22:06:11     ) -> Dict[int, BaselineFitParamConfig]:
23-Feb-2026 22:06:11         """
23-Feb-2026 22:06:11         Convert the fit_function parameter into a dictionary mapping each SPW ID to its BaselineFitParamConfig.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         If fit_function is None or falsy, the default 'cspline' is used.
23-Feb-2026 22:06:11         If a single string is provided, one BaselineFitParamConfig instance is created and applied to all SPWs.
23-Feb-2026 22:06:11         If a dictionary is provided, keys are normalized to integers; SPWs not specified default to 'cspline'.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Args:
23-Feb-2026 22:06:11             switchpoly:
23-Feb-2026 22:06:11             context:
23-Feb-2026 22:06:11             ms: Measurement set
23-Feb-2026 22:06:11             fit_function: The fit function parameter (str, dict, or None).
23-Feb-2026 22:06:11             spw_id_list: List of spectral window IDs to process.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Raises:
23-Feb-2026 22:06:11             ValueError: fit_function has unsupported value.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Returns:
23-Feb-2026 22:06:11             A dictionary mapping each SPW ID (int) to a BaselineFitParamConfig instance.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         """
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         valid_functions = {'spline', 'cspline', 'poly', 'polynomial', 'sinusoid'}
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         if isinstance(fit_function, str):
23-Feb-2026 22:06:11             if fit_function not in valid_functions:
23-Feb-2026 22:06:11                 raise ValueError(f"Unsupported fitting function value: {fit_function}")
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             heuristics_out = dict.fromkeys(
23-Feb-2026 22:06:11                 spw_id_list,
23-Feb-2026 22:06:11                 BaselineFitParamConfig(
23-Feb-2026 22:06:11                         fitfunc=fit_function,
23-Feb-2026 22:06:11                         switchpoly=switchpoly
23-Feb-2026 22:06:11                 )
23-Feb-2026 22:06:11             )
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             return heuristics_out
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         if isinstance(fit_function, dict):
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             spw_function_map = dict.fromkeys(spw_id_list, "cspline")
23-Feb-2026 22:06:11             spw_function_map.update(fit_function)
23-Feb-2026 22:06:11             heuristics_out = {}
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             # Need to fill in the input fit functions. We could make this cleaner without
23-Feb-2026 22:06:11             # the virtual2real section, but I'm not sure if the keys will match.
23-Feb-2026 22:06:11             for key, value in spw_function_map.items():
23-Feb-2026 22:06:11                 # Check that all the functions are supported.
23-Feb-2026 22:06:11                 if not value in valid_functions:
23-Feb-2026 22:06:11                     raise ValueError(f"Unsupported fitting function value: {value}")
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11                 _key = context.observing_run.virtual2real_spw_id(key, ms) if context else key
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11                 heuristics_out[_key] = BaselineFitParamConfig(
23-Feb-2026 22:06:11                         fitfunc=spw_function_map[key],
23-Feb-2026 22:06:11                         switchpoly=switchpoly
23-Feb-2026 22:06:11                     )
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             return heuristics_out
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         else:
23-Feb-2026 22:06:11 >           raise ValueError(f"Unsupported fitting function type: {type(fit_function)}")
23-Feb-2026 22:06:11 E           ValueError: Unsupported fitting function type: <class 'list'>
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker.py:662: ValueError
23-Feb-2026 22:06:11 ____________ test_build_fitting_configuration[inp3-expected3-False] ____________
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 inp = {17: 'cspline', 19: 'cspline', 23: 'cspline'}, expected = {30: 'poly'}
23-Feb-2026 22:06:11 should_raise = False
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @pytest.mark.parametrize(
23-Feb-2026 22:06:11         "inp, expected, should_raise",
23-Feb-2026 22:06:11         [
23-Feb-2026 22:06:11             # valid inputs
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, None, False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, {}, False),
23-Feb-2026 22:06:11             ({17: "cspline", 19: "cspline", 23: "cspline"}, "spline", False), #   SPLINE = CSPLINE in the FittingFunction class of fitrorder.py
23-Feb-2026 22:06:11             ({17: DEF, 19: DEF, 23: DEF}, {30: "poly"}, False),
23-Feb-2026 22:06:11             ({17: "poly",   19: "poly",   23: "poly"}, "poly", False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: "poly"}, {"23":"poly"}, False),
23-Feb-2026 22:06:11             ({17:"poly",  19:"cspline",  23: DEF}, {"17":"poly", 19:"spline"}, False),
23-Feb-2026 22:06:11             ({17:"poly",    19:"cspline",  23:"poly"}, {17:"poly", 19:"spline", 23:"poly"}, False),
23-Feb-2026 22:06:11             # error inputs
23-Feb-2026 22:06:11             (ValueError, "badfunc", True),
23-Feb-2026 22:06:11             (ValueError, {19:"invalid"}, True),
23-Feb-2026 22:06:11         ],
23-Feb-2026 22:06:11     )
23-Feb-2026 22:06:11     def test_build_fitting_configuration(inp, expected, should_raise):
23-Feb-2026 22:06:11         if should_raise:
23-Feb-2026 22:06:11             with pytest.raises(expected):
23-Feb-2026 22:06:11                 worker.build_fitting_configuration(inp, SPWS)
23-Feb-2026 22:06:11             return
23-Feb-2026 22:06:11 >       cfg = worker.build_fitting_configuration(inp, SPWS)
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker_test.py:34:
23-Feb-2026 22:06:11 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 spw_id_list = {17: 'cspline', 19: 'cspline', 23: 'cspline'}
23-Feb-2026 22:06:11 fit_function = [17, 19, 23], ms = None, context = None, switchpoly = True
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @staticmethod
23-Feb-2026 22:06:11     def build_fitting_configuration(
23-Feb-2026 22:06:11             spw_id_list: Union[List[int], set[Any]],
23-Feb-2026 22:06:11             fit_function: Optional[Union[str, Dict[Union[int, str], str]]] = "cspline",
23-Feb-2026 22:06:11             ms: MeasurementSet = None,
23-Feb-2026 22:06:11             context: Context = None,
23-Feb-2026 22:06:11             switchpoly=True
23-Feb-2026 22:06:11     ) -> Dict[int, BaselineFitParamConfig]:
23-Feb-2026 22:06:11         """
23-Feb-2026 22:06:11         Convert the fit_function parameter into a dictionary mapping each SPW ID to its BaselineFitParamConfig.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         If fit_function is None or falsy, the default 'cspline' is used.
23-Feb-2026 22:06:11         If a single string is provided, one BaselineFitParamConfig instance is created and applied to all SPWs.
23-Feb-2026 22:06:11         If a dictionary is provided, keys are normalized to integers; SPWs not specified default to 'cspline'.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Args:
23-Feb-2026 22:06:11             switchpoly:
23-Feb-2026 22:06:11             context:
23-Feb-2026 22:06:11             ms: Measurement set
23-Feb-2026 22:06:11             fit_function: The fit function parameter (str, dict, or None).
23-Feb-2026 22:06:11             spw_id_list: List of spectral window IDs to process.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Raises:
23-Feb-2026 22:06:11             ValueError: fit_function has unsupported value.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Returns:
23-Feb-2026 22:06:11             A dictionary mapping each SPW ID (int) to a BaselineFitParamConfig instance.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         """
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         valid_functions = {'spline', 'cspline', 'poly', 'polynomial', 'sinusoid'}
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         if isinstance(fit_function, str):
23-Feb-2026 22:06:11             if fit_function not in valid_functions:
23-Feb-2026 22:06:11                 raise ValueError(f"Unsupported fitting function value: {fit_function}")
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             heuristics_out = dict.fromkeys(
23-Feb-2026 22:06:11                 spw_id_list,
23-Feb-2026 22:06:11                 BaselineFitParamConfig(
23-Feb-2026 22:06:11                         fitfunc=fit_function,
23-Feb-2026 22:06:11                         switchpoly=switchpoly
23-Feb-2026 22:06:11                 )
23-Feb-2026 22:06:11             )
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             return heuristics_out
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         if isinstance(fit_function, dict):
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             spw_function_map = dict.fromkeys(spw_id_list, "cspline")
23-Feb-2026 22:06:11             spw_function_map.update(fit_function)
23-Feb-2026 22:06:11             heuristics_out = {}
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             # Need to fill in the input fit functions. We could make this cleaner without
23-Feb-2026 22:06:11             # the virtual2real section, but I'm not sure if the keys will match.
23-Feb-2026 22:06:11             for key, value in spw_function_map.items():
23-Feb-2026 22:06:11                 # Check that all the functions are supported.
23-Feb-2026 22:06:11                 if not value in valid_functions:
23-Feb-2026 22:06:11                     raise ValueError(f"Unsupported fitting function value: {value}")
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11                 _key = context.observing_run.virtual2real_spw_id(key, ms) if context else key
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11                 heuristics_out[_key] = BaselineFitParamConfig(
23-Feb-2026 22:06:11                         fitfunc=spw_function_map[key],
23-Feb-2026 22:06:11                         switchpoly=switchpoly
23-Feb-2026 22:06:11                     )
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             return heuristics_out
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         else:
23-Feb-2026 22:06:11 >           raise ValueError(f"Unsupported fitting function type: {type(fit_function)}")
23-Feb-2026 22:06:11 E           ValueError: Unsupported fitting function type: <class 'list'>
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker.py:662: ValueError
23-Feb-2026 22:06:11 ______________ test_build_fitting_configuration[inp4-poly-False] _______________
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 inp = {17: 'poly', 19: 'poly', 23: 'poly'}, expected = 'poly'
23-Feb-2026 22:06:11 should_raise = False
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @pytest.mark.parametrize(
23-Feb-2026 22:06:11         "inp, expected, should_raise",
23-Feb-2026 22:06:11         [
23-Feb-2026 22:06:11             # valid inputs
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, None, False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, {}, False),
23-Feb-2026 22:06:11             ({17: "cspline", 19: "cspline", 23: "cspline"}, "spline", False), #   SPLINE = CSPLINE in the FittingFunction class of fitrorder.py
23-Feb-2026 22:06:11             ({17: DEF, 19: DEF, 23: DEF}, {30: "poly"}, False),
23-Feb-2026 22:06:11             ({17: "poly",   19: "poly",   23: "poly"}, "poly", False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: "poly"}, {"23":"poly"}, False),
23-Feb-2026 22:06:11             ({17:"poly",  19:"cspline",  23: DEF}, {"17":"poly", 19:"spline"}, False),
23-Feb-2026 22:06:11             ({17:"poly",    19:"cspline",  23:"poly"}, {17:"poly", 19:"spline", 23:"poly"}, False),
23-Feb-2026 22:06:11             # error inputs
23-Feb-2026 22:06:11             (ValueError, "badfunc", True),
23-Feb-2026 22:06:11             (ValueError, {19:"invalid"}, True),
23-Feb-2026 22:06:11         ],
23-Feb-2026 22:06:11     )
23-Feb-2026 22:06:11     def test_build_fitting_configuration(inp, expected, should_raise):
23-Feb-2026 22:06:11         if should_raise:
23-Feb-2026 22:06:11             with pytest.raises(expected):
23-Feb-2026 22:06:11                 worker.build_fitting_configuration(inp, SPWS)
23-Feb-2026 22:06:11             return
23-Feb-2026 22:06:11 >       cfg = worker.build_fitting_configuration(inp, SPWS)
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker_test.py:34:
23-Feb-2026 22:06:11 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 spw_id_list = {17: 'poly', 19: 'poly', 23: 'poly'}, fit_function = [17, 19, 23]
23-Feb-2026 22:06:11 ms = None, context = None, switchpoly = True
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @staticmethod
23-Feb-2026 22:06:11     def build_fitting_configuration(
23-Feb-2026 22:06:11             spw_id_list: Union[List[int], set[Any]],
23-Feb-2026 22:06:11             fit_function: Optional[Union[str, Dict[Union[int, str], str]]] = "cspline",
23-Feb-2026 22:06:11             ms: MeasurementSet = None,
23-Feb-2026 22:06:11             context: Context = None,
23-Feb-2026 22:06:11             switchpoly=True
23-Feb-2026 22:06:11     ) -> Dict[int, BaselineFitParamConfig]:
23-Feb-2026 22:06:11         """
23-Feb-2026 22:06:11         Convert the fit_function parameter into a dictionary mapping each SPW ID to its BaselineFitParamConfig.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         If fit_function is None or falsy, the default 'cspline' is used.
23-Feb-2026 22:06:11         If a single string is provided, one BaselineFitParamConfig instance is created and applied to all SPWs.
23-Feb-2026 22:06:11         If a dictionary is provided, keys are normalized to integers; SPWs not specified default to 'cspline'.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Args:
23-Feb-2026 22:06:11             switchpoly:
23-Feb-2026 22:06:11             context:
23-Feb-2026 22:06:11             ms: Measurement set
23-Feb-2026 22:06:11             fit_function: The fit function parameter (str, dict, or None).
23-Feb-2026 22:06:11             spw_id_list: List of spectral window IDs to process.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Raises:
23-Feb-2026 22:06:11             ValueError: fit_function has unsupported value.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Returns:
23-Feb-2026 22:06:11             A dictionary mapping each SPW ID (int) to a BaselineFitParamConfig instance.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         """
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         valid_functions = {'spline', 'cspline', 'poly', 'polynomial', 'sinusoid'}
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         if isinstance(fit_function, str):
23-Feb-2026 22:06:11             if fit_function not in valid_functions:
23-Feb-2026 22:06:11                 raise ValueError(f"Unsupported fitting function value: {fit_function}")
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             heuristics_out = dict.fromkeys(
23-Feb-2026 22:06:11                 spw_id_list,
23-Feb-2026 22:06:11                 BaselineFitParamConfig(
23-Feb-2026 22:06:11                         fitfunc=fit_function,
23-Feb-2026 22:06:11                         switchpoly=switchpoly
23-Feb-2026 22:06:11                 )
23-Feb-2026 22:06:11             )
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             return heuristics_out
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         if isinstance(fit_function, dict):
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             spw_function_map = dict.fromkeys(spw_id_list, "cspline")
23-Feb-2026 22:06:11             spw_function_map.update(fit_function)
23-Feb-2026 22:06:11             heuristics_out = {}
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             # Need to fill in the input fit functions. We could make this cleaner without
23-Feb-2026 22:06:11             # the virtual2real section, but I'm not sure if the keys will match.
23-Feb-2026 22:06:11             for key, value in spw_function_map.items():
23-Feb-2026 22:06:11                 # Check that all the functions are supported.
23-Feb-2026 22:06:11                 if not value in valid_functions:
23-Feb-2026 22:06:11                     raise ValueError(f"Unsupported fitting function value: {value}")
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11                 _key = context.observing_run.virtual2real_spw_id(key, ms) if context else key
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11                 heuristics_out[_key] = BaselineFitParamConfig(
23-Feb-2026 22:06:11                         fitfunc=spw_function_map[key],
23-Feb-2026 22:06:11                         switchpoly=switchpoly
23-Feb-2026 22:06:11                     )
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             return heuristics_out
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         else:
23-Feb-2026 22:06:11 >           raise ValueError(f"Unsupported fitting function type: {type(fit_function)}")
23-Feb-2026 22:06:11 E           ValueError: Unsupported fitting function type: <class 'list'>
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker.py:662: ValueError
23-Feb-2026 22:06:11 ____________ test_build_fitting_configuration[inp5-expected5-False] ____________
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 inp = {17: 'cspline', 19: 'cspline', 23: 'poly'}, expected = {'23': 'poly'}
23-Feb-2026 22:06:11 should_raise = False
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @pytest.mark.parametrize(
23-Feb-2026 22:06:11         "inp, expected, should_raise",
23-Feb-2026 22:06:11         [
23-Feb-2026 22:06:11             # valid inputs
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, None, False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, {}, False),
23-Feb-2026 22:06:11             ({17: "cspline", 19: "cspline", 23: "cspline"}, "spline", False), #   SPLINE = CSPLINE in the FittingFunction class of fitrorder.py
23-Feb-2026 22:06:11             ({17: DEF, 19: DEF, 23: DEF}, {30: "poly"}, False),
23-Feb-2026 22:06:11             ({17: "poly",   19: "poly",   23: "poly"}, "poly", False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: "poly"}, {"23":"poly"}, False),
23-Feb-2026 22:06:11             ({17:"poly",  19:"cspline",  23: DEF}, {"17":"poly", 19:"spline"}, False),
23-Feb-2026 22:06:11             ({17:"poly",    19:"cspline",  23:"poly"}, {17:"poly", 19:"spline", 23:"poly"}, False),
23-Feb-2026 22:06:11             # error inputs
23-Feb-2026 22:06:11             (ValueError, "badfunc", True),
23-Feb-2026 22:06:11             (ValueError, {19:"invalid"}, True),
23-Feb-2026 22:06:11         ],
23-Feb-2026 22:06:11     )
23-Feb-2026 22:06:11     def test_build_fitting_configuration(inp, expected, should_raise):
23-Feb-2026 22:06:11         if should_raise:
23-Feb-2026 22:06:11             with pytest.raises(expected):
23-Feb-2026 22:06:11                 worker.build_fitting_configuration(inp, SPWS)
23-Feb-2026 22:06:11             return
23-Feb-2026 22:06:11 >       cfg = worker.build_fitting_configuration(inp, SPWS)
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker_test.py:34:
23-Feb-2026 22:06:11 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 spw_id_list = {17: 'cspline', 19: 'cspline', 23: 'poly'}
23-Feb-2026 22:06:11 fit_function = [17, 19, 23], ms = None, context = None, switchpoly = True
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @staticmethod
23-Feb-2026 22:06:11     def build_fitting_configuration(
23-Feb-2026 22:06:11             spw_id_list: Union[List[int], set[Any]],
23-Feb-2026 22:06:11             fit_function: Optional[Union[str, Dict[Union[int, str], str]]] = "cspline",
23-Feb-2026 22:06:11             ms: MeasurementSet = None,
23-Feb-2026 22:06:11             context: Context = None,
23-Feb-2026 22:06:11             switchpoly=True
23-Feb-2026 22:06:11     ) -> Dict[int, BaselineFitParamConfig]:
23-Feb-2026 22:06:11         """
23-Feb-2026 22:06:11         Convert the fit_function parameter into a dictionary mapping each SPW ID to its BaselineFitParamConfig.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         If fit_function is None or falsy, the default 'cspline' is used.
23-Feb-2026 22:06:11         If a single string is provided, one BaselineFitParamConfig instance is created and applied to all SPWs.
23-Feb-2026 22:06:11         If a dictionary is provided, keys are normalized to integers; SPWs not specified default to 'cspline'.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Args:
23-Feb-2026 22:06:11             switchpoly:
23-Feb-2026 22:06:11             context:
23-Feb-2026 22:06:11             ms: Measurement set
23-Feb-2026 22:06:11             fit_function: The fit function parameter (str, dict, or None).
23-Feb-2026 22:06:11             spw_id_list: List of spectral window IDs to process.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Raises:
23-Feb-2026 22:06:11             ValueError: fit_function has unsupported value.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Returns:
23-Feb-2026 22:06:11             A dictionary mapping each SPW ID (int) to a BaselineFitParamConfig instance.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         """
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         valid_functions = {'spline', 'cspline', 'poly', 'polynomial', 'sinusoid'}
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         if isinstance(fit_function, str):
23-Feb-2026 22:06:11             if fit_function not in valid_functions:
23-Feb-2026 22:06:11                 raise ValueError(f"Unsupported fitting function value: {fit_function}")
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             heuristics_out = dict.fromkeys(
23-Feb-2026 22:06:11                 spw_id_list,
23-Feb-2026 22:06:11                 BaselineFitParamConfig(
23-Feb-2026 22:06:11                         fitfunc=fit_function,
23-Feb-2026 22:06:11                         switchpoly=switchpoly
23-Feb-2026 22:06:11                 )
23-Feb-2026 22:06:11             )
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             return heuristics_out
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         if isinstance(fit_function, dict):
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             spw_function_map = dict.fromkeys(spw_id_list, "cspline")
23-Feb-2026 22:06:11             spw_function_map.update(fit_function)
23-Feb-2026 22:06:11             heuristics_out = {}
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             # Need to fill in the input fit functions. We could make this cleaner without
23-Feb-2026 22:06:11             # the virtual2real section, but I'm not sure if the keys will match.
23-Feb-2026 22:06:11             for key, value in spw_function_map.items():
23-Feb-2026 22:06:11                 # Check that all the functions are supported.
23-Feb-2026 22:06:11                 if not value in valid_functions:
23-Feb-2026 22:06:11                     raise ValueError(f"Unsupported fitting function value: {value}")
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11                 _key = context.observing_run.virtual2real_spw_id(key, ms) if context else key
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11                 heuristics_out[_key] = BaselineFitParamConfig(
23-Feb-2026 22:06:11                         fitfunc=spw_function_map[key],
23-Feb-2026 22:06:11                         switchpoly=switchpoly
23-Feb-2026 22:06:11                     )
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             return heuristics_out
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         else:
23-Feb-2026 22:06:11 >           raise ValueError(f"Unsupported fitting function type: {type(fit_function)}")
23-Feb-2026 22:06:11 E           ValueError: Unsupported fitting function type: <class 'list'>
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker.py:662: ValueError
23-Feb-2026 22:06:11 ____________ test_build_fitting_configuration[inp6-expected6-False] ____________
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 inp = {17: 'poly', 19: 'cspline', 23: 'cspline'}
23-Feb-2026 22:06:11 expected = {'17': 'poly', 19: 'spline'}, should_raise = False
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @pytest.mark.parametrize(
23-Feb-2026 22:06:11         "inp, expected, should_raise",
23-Feb-2026 22:06:11         [
23-Feb-2026 22:06:11             # valid inputs
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, None, False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, {}, False),
23-Feb-2026 22:06:11             ({17: "cspline", 19: "cspline", 23: "cspline"}, "spline", False), #   SPLINE = CSPLINE in the FittingFunction class of fitrorder.py
23-Feb-2026 22:06:11             ({17: DEF, 19: DEF, 23: DEF}, {30: "poly"}, False),
23-Feb-2026 22:06:11             ({17: "poly",   19: "poly",   23: "poly"}, "poly", False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: "poly"}, {"23":"poly"}, False),
23-Feb-2026 22:06:11             ({17:"poly",  19:"cspline",  23: DEF}, {"17":"poly", 19:"spline"}, False),
23-Feb-2026 22:06:11             ({17:"poly",    19:"cspline",  23:"poly"}, {17:"poly", 19:"spline", 23:"poly"}, False),
23-Feb-2026 22:06:11             # error inputs
23-Feb-2026 22:06:11             (ValueError, "badfunc", True),
23-Feb-2026 22:06:11             (ValueError, {19:"invalid"}, True),
23-Feb-2026 22:06:11         ],
23-Feb-2026 22:06:11     )
23-Feb-2026 22:06:11     def test_build_fitting_configuration(inp, expected, should_raise):
23-Feb-2026 22:06:11         if should_raise:
23-Feb-2026 22:06:11             with pytest.raises(expected):
23-Feb-2026 22:06:11                 worker.build_fitting_configuration(inp, SPWS)
23-Feb-2026 22:06:11             return
23-Feb-2026 22:06:11 >       cfg = worker.build_fitting_configuration(inp, SPWS)
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker_test.py:34:
23-Feb-2026 22:06:11 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 spw_id_list = {17: 'poly', 19: 'cspline', 23: 'cspline'}
23-Feb-2026 22:06:11 fit_function = [17, 19, 23], ms = None, context = None, switchpoly = True
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @staticmethod
23-Feb-2026 22:06:11     def build_fitting_configuration(
23-Feb-2026 22:06:11             spw_id_list: Union[List[int], set[Any]],
23-Feb-2026 22:06:11             fit_function: Optional[Union[str, Dict[Union[int, str], str]]] = "cspline",
23-Feb-2026 22:06:11             ms: MeasurementSet = None,
23-Feb-2026 22:06:11             context: Context = None,
23-Feb-2026 22:06:11             switchpoly=True
23-Feb-2026 22:06:11     ) -> Dict[int, BaselineFitParamConfig]:
23-Feb-2026 22:06:11         """
23-Feb-2026 22:06:11         Convert the fit_function parameter into a dictionary mapping each SPW ID to its BaselineFitParamConfig.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         If fit_function is None or falsy, the default 'cspline' is used.
23-Feb-2026 22:06:11         If a single string is provided, one BaselineFitParamConfig instance is created and applied to all SPWs.
23-Feb-2026 22:06:11         If a dictionary is provided, keys are normalized to integers; SPWs not specified default to 'cspline'.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Args:
23-Feb-2026 22:06:11             switchpoly:
23-Feb-2026 22:06:11             context:
23-Feb-2026 22:06:11             ms: Measurement set
23-Feb-2026 22:06:11             fit_function: The fit function parameter (str, dict, or None).
23-Feb-2026 22:06:11             spw_id_list: List of spectral window IDs to process.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Raises:
23-Feb-2026 22:06:11             ValueError: fit_function has unsupported value.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Returns:
23-Feb-2026 22:06:11             A dictionary mapping each SPW ID (int) to a BaselineFitParamConfig instance.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         """
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         valid_functions = {'spline', 'cspline', 'poly', 'polynomial', 'sinusoid'}
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         if isinstance(fit_function, str):
23-Feb-2026 22:06:11             if fit_function not in valid_functions:
23-Feb-2026 22:06:11                 raise ValueError(f"Unsupported fitting function value: {fit_function}")
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             heuristics_out = dict.fromkeys(
23-Feb-2026 22:06:11                 spw_id_list,
23-Feb-2026 22:06:11                 BaselineFitParamConfig(
23-Feb-2026 22:06:11                         fitfunc=fit_function,
23-Feb-2026 22:06:11                         switchpoly=switchpoly
23-Feb-2026 22:06:11                 )
23-Feb-2026 22:06:11             )
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             return heuristics_out
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         if isinstance(fit_function, dict):
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             spw_function_map = dict.fromkeys(spw_id_list, "cspline")
23-Feb-2026 22:06:11             spw_function_map.update(fit_function)
23-Feb-2026 22:06:11             heuristics_out = {}
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             # Need to fill in the input fit functions. We could make this cleaner without
23-Feb-2026 22:06:11             # the virtual2real section, but I'm not sure if the keys will match.
23-Feb-2026 22:06:11             for key, value in spw_function_map.items():
23-Feb-2026 22:06:11                 # Check that all the functions are supported.
23-Feb-2026 22:06:11                 if not value in valid_functions:
23-Feb-2026 22:06:11                     raise ValueError(f"Unsupported fitting function value: {value}")
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11                 _key = context.observing_run.virtual2real_spw_id(key, ms) if context else key
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11                 heuristics_out[_key] = BaselineFitParamConfig(
23-Feb-2026 22:06:11                         fitfunc=spw_function_map[key],
23-Feb-2026 22:06:11                         switchpoly=switchpoly
23-Feb-2026 22:06:11                     )
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             return heuristics_out
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         else:
23-Feb-2026 22:06:11 >           raise ValueError(f"Unsupported fitting function type: {type(fit_function)}")
23-Feb-2026 22:06:11 E           ValueError: Unsupported fitting function type: <class 'list'>
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker.py:662: ValueError
23-Feb-2026 22:06:11 ____________ test_build_fitting_configuration[inp7-expected7-False] ____________
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 inp = {17: 'poly', 19: 'cspline', 23: 'poly'}
23-Feb-2026 22:06:11 expected = {17: 'poly', 19: 'spline', 23: 'poly'}, should_raise = False
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @pytest.mark.parametrize(
23-Feb-2026 22:06:11         "inp, expected, should_raise",
23-Feb-2026 22:06:11         [
23-Feb-2026 22:06:11             # valid inputs
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, None, False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, {}, False),
23-Feb-2026 22:06:11             ({17: "cspline", 19: "cspline", 23: "cspline"}, "spline", False), #   SPLINE = CSPLINE in the FittingFunction class of fitrorder.py
23-Feb-2026 22:06:11             ({17: DEF, 19: DEF, 23: DEF}, {30: "poly"}, False),
23-Feb-2026 22:06:11             ({17: "poly",   19: "poly",   23: "poly"}, "poly", False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: "poly"}, {"23":"poly"}, False),
23-Feb-2026 22:06:11             ({17:"poly",  19:"cspline",  23: DEF}, {"17":"poly", 19:"spline"}, False),
23-Feb-2026 22:06:11             ({17:"poly",    19:"cspline",  23:"poly"}, {17:"poly", 19:"spline", 23:"poly"}, False),
23-Feb-2026 22:06:11             # error inputs
23-Feb-2026 22:06:11             (ValueError, "badfunc", True),
23-Feb-2026 22:06:11             (ValueError, {19:"invalid"}, True),
23-Feb-2026 22:06:11         ],
23-Feb-2026 22:06:11     )
23-Feb-2026 22:06:11     def test_build_fitting_configuration(inp, expected, should_raise):
23-Feb-2026 22:06:11         if should_raise:
23-Feb-2026 22:06:11             with pytest.raises(expected):
23-Feb-2026 22:06:11                 worker.build_fitting_configuration(inp, SPWS)
23-Feb-2026 22:06:11             return
23-Feb-2026 22:06:11 >       cfg = worker.build_fitting_configuration(inp, SPWS)
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker_test.py:34:
23-Feb-2026 22:06:11 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 spw_id_list = {17: 'poly', 19: 'cspline', 23: 'poly'}
23-Feb-2026 22:06:11 fit_function = [17, 19, 23], ms = None, context = None, switchpoly = True
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @staticmethod
23-Feb-2026 22:06:11     def build_fitting_configuration(
23-Feb-2026 22:06:11             spw_id_list: Union[List[int], set[Any]],
23-Feb-2026 22:06:11             fit_function: Optional[Union[str, Dict[Union[int, str], str]]] = "cspline",
23-Feb-2026 22:06:11             ms: MeasurementSet = None,
23-Feb-2026 22:06:11             context: Context = None,
23-Feb-2026 22:06:11             switchpoly=True
23-Feb-2026 22:06:11     ) -> Dict[int, BaselineFitParamConfig]:
23-Feb-2026 22:06:11         """
23-Feb-2026 22:06:11         Convert the fit_function parameter into a dictionary mapping each SPW ID to its BaselineFitParamConfig.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         If fit_function is None or falsy, the default 'cspline' is used.
23-Feb-2026 22:06:11         If a single string is provided, one BaselineFitParamConfig instance is created and applied to all SPWs.
23-Feb-2026 22:06:11         If a dictionary is provided, keys are normalized to integers; SPWs not specified default to 'cspline'.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Args:
23-Feb-2026 22:06:11             switchpoly:
23-Feb-2026 22:06:11             context:
23-Feb-2026 22:06:11             ms: Measurement set
23-Feb-2026 22:06:11             fit_function: The fit function parameter (str, dict, or None).
23-Feb-2026 22:06:11             spw_id_list: List of spectral window IDs to process.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Raises:
23-Feb-2026 22:06:11             ValueError: fit_function has unsupported value.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         Returns:
23-Feb-2026 22:06:11             A dictionary mapping each SPW ID (int) to a BaselineFitParamConfig instance.
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         """
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         valid_functions = {'spline', 'cspline', 'poly', 'polynomial', 'sinusoid'}
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         if isinstance(fit_function, str):
23-Feb-2026 22:06:11             if fit_function not in valid_functions:
23-Feb-2026 22:06:11                 raise ValueError(f"Unsupported fitting function value: {fit_function}")
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             heuristics_out = dict.fromkeys(
23-Feb-2026 22:06:11                 spw_id_list,
23-Feb-2026 22:06:11                 BaselineFitParamConfig(
23-Feb-2026 22:06:11                         fitfunc=fit_function,
23-Feb-2026 22:06:11                         switchpoly=switchpoly
23-Feb-2026 22:06:11                 )
23-Feb-2026 22:06:11             )
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             return heuristics_out
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         if isinstance(fit_function, dict):
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             spw_function_map = dict.fromkeys(spw_id_list, "cspline")
23-Feb-2026 22:06:11             spw_function_map.update(fit_function)
23-Feb-2026 22:06:11             heuristics_out = {}
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             # Need to fill in the input fit functions. We could make this cleaner without
23-Feb-2026 22:06:11             # the virtual2real section, but I'm not sure if the keys will match.
23-Feb-2026 22:06:11             for key, value in spw_function_map.items():
23-Feb-2026 22:06:11                 # Check that all the functions are supported.
23-Feb-2026 22:06:11                 if not value in valid_functions:
23-Feb-2026 22:06:11                     raise ValueError(f"Unsupported fitting function value: {value}")
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11                 _key = context.observing_run.virtual2real_spw_id(key, ms) if context else key
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11                 heuristics_out[_key] = BaselineFitParamConfig(
23-Feb-2026 22:06:11                         fitfunc=spw_function_map[key],
23-Feb-2026 22:06:11                         switchpoly=switchpoly
23-Feb-2026 22:06:11                     )
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11             return heuristics_out
23-Feb-2026 22:06:11    
23-Feb-2026 22:06:11         else:
23-Feb-2026 22:06:11 >           raise ValueError(f"Unsupported fitting function type: {type(fit_function)}")
23-Feb-2026 22:06:11 E           ValueError: Unsupported fitting function type: <class 'list'>
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker.py:662: ValueError
23-Feb-2026 22:06:11 __________ test_build_fitting_configuration[ValueError-badfunc-True] ___________
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 inp = <class 'ValueError'>, expected = 'badfunc', should_raise = True
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @pytest.mark.parametrize(
23-Feb-2026 22:06:11         "inp, expected, should_raise",
23-Feb-2026 22:06:11         [
23-Feb-2026 22:06:11             # valid inputs
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, None, False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, {}, False),
23-Feb-2026 22:06:11             ({17: "cspline", 19: "cspline", 23: "cspline"}, "spline", False), #   SPLINE = CSPLINE in the FittingFunction class of fitrorder.py
23-Feb-2026 22:06:11             ({17: DEF, 19: DEF, 23: DEF}, {30: "poly"}, False),
23-Feb-2026 22:06:11             ({17: "poly",   19: "poly",   23: "poly"}, "poly", False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: "poly"}, {"23":"poly"}, False),
23-Feb-2026 22:06:11             ({17:"poly",  19:"cspline",  23: DEF}, {"17":"poly", 19:"spline"}, False),
23-Feb-2026 22:06:11             ({17:"poly",    19:"cspline",  23:"poly"}, {17:"poly", 19:"spline", 23:"poly"}, False),
23-Feb-2026 22:06:11             # error inputs
23-Feb-2026 22:06:11             (ValueError, "badfunc", True),
23-Feb-2026 22:06:11             (ValueError, {19:"invalid"}, True),
23-Feb-2026 22:06:11         ],
23-Feb-2026 22:06:11     )
23-Feb-2026 22:06:11     def test_build_fitting_configuration(inp, expected, should_raise):
23-Feb-2026 22:06:11         if should_raise:
23-Feb-2026 22:06:11 >           with pytest.raises(expected):
23-Feb-2026 22:06:11 E           TypeError: expected exception must be a BaseException type, not str
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker_test.py:31: TypeError
23-Feb-2026 22:06:11 _________ test_build_fitting_configuration[ValueError-expected9-True] __________
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 inp = <class 'ValueError'>, expected = {19: 'invalid'}, should_raise = True
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11     @pytest.mark.parametrize(
23-Feb-2026 22:06:11         "inp, expected, should_raise",
23-Feb-2026 22:06:11         [
23-Feb-2026 22:06:11             # valid inputs
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, None, False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: DEF}, {}, False),
23-Feb-2026 22:06:11             ({17: "cspline", 19: "cspline", 23: "cspline"}, "spline", False), #   SPLINE = CSPLINE in the FittingFunction class of fitrorder.py
23-Feb-2026 22:06:11             ({17: DEF, 19: DEF, 23: DEF}, {30: "poly"}, False),
23-Feb-2026 22:06:11             ({17: "poly",   19: "poly",   23: "poly"}, "poly", False),
23-Feb-2026 22:06:11             ({17: DEF,      19: DEF,      23: "poly"}, {"23":"poly"}, False),
23-Feb-2026 22:06:11             ({17:"poly",  19:"cspline",  23: DEF}, {"17":"poly", 19:"spline"}, False),
23-Feb-2026 22:06:11             ({17:"poly",    19:"cspline",  23:"poly"}, {17:"poly", 19:"spline", 23:"poly"}, False),
23-Feb-2026 22:06:11             # error inputs
23-Feb-2026 22:06:11             (ValueError, "badfunc", True),
23-Feb-2026 22:06:11             (ValueError, {19:"invalid"}, True),
23-Feb-2026 22:06:11         ],
23-Feb-2026 22:06:11     )
23-Feb-2026 22:06:11     def test_build_fitting_configuration(inp, expected, should_raise):
23-Feb-2026 22:06:11         if should_raise:
23-Feb-2026 22:06:11 >           with pytest.raises(expected):
23-Feb-2026 22:06:11 E           TypeError: expected exception must be a BaseException type, not int
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 hsd/tasks/baseline/worker_test.py:31: TypeError
23-Feb-2026 22:06:11 =============================== warnings summary ===============================
23-Feb-2026 22:06:11 pipeline/hifa/tasks/applycal/ampphase_vs_freq_qa_test.py::test_score_all_scans
23-Feb-2026 22:06:11   /home/casatest/casa-build-utils/pipeline/workdir/casa-6.6.6-18-py3.10.el8/lib/py/lib/python3.10/site-packages/numpy/ma/core.py:489: ComplexWarning: Casting complex values to real discards the imaginary part
23-Feb-2026 22:06:11     fill_value = np.asarray(fill_value, dtype=ndtype)
23-Feb-2026 22:06:11
23-Feb-2026 22:06:11 -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
23-Feb-2026 22:06:11 - generated xml file: /home/casatest/casa-build-utils/pipeline/workdir/pipeline_test_result.xml -
23-Feb-2026 22:06:11 =========================== short test summary info ============================
23-Feb-2026 22:06:11 SKIPPED [2] h/tasks/common/atmutil_test.py:213: need_vis
23-Feb-2026 22:06:11 SKIPPED [3] h/tasks/common/atmutil_test.py:233: need_vis
23-Feb-2026 22:06:11 SKIPPED [2] h/tasks/common/atmutil_test.py:251: need_vis
23-Feb-2026 22:06:12 SKIPPED [1] infrastructure/daskhelpers_test.py:80: dask not installed
23-Feb-2026 22:06:12 SKIPPED [1] infrastructure/daskhelpers_test.py:146: dask not installed
23-Feb-2026 22:06:12 SKIPPED [1] infrastructure/daskhelpers_test.py:195: dask not installed
23-Feb-2026 22:06:12 SKIPPED [1] recipes/recipe_converter_test.py:375: Skip testing main. Its output must be carefully examined by developer.
23-Feb-2026 22:06:12 SKIPPED [1] recipes/recipe_converter_test.py:380: Skip testing generate_all. Its output must be carefully examined by developer.
23-Feb-2026 22:06:12 FAILED hsd/tasks/baseline/worker_test.py::test_build_fitting_configuration[inp0-None-False]
23-Feb-2026 22:06:12 FAILED hsd/tasks/baseline/worker_test.py::test_build_fitting_configuration[inp1-expected1-False]
23-Feb-2026 22:06:12 FAILED hsd/tasks/baseline/worker_test.py::test_build_fitting_configuration[inp2-spline-False]
23-Feb-2026 22:06:12 FAILED hsd/tasks/baseline/worker_test.py::test_build_fitting_configuration[inp3-expected3-False]
23-Feb-2026 22:06:12 FAILED hsd/tasks/baseline/worker_test.py::test_build_fitting_configuration[inp4-poly-False]
23-Feb-2026 22:06:12 FAILED hsd/tasks/baseline/worker_test.py::test_build_fitting_configuration[inp5-expected5-False]
23-Feb-2026 22:06:12 FAILED hsd/tasks/baseline/worker_test.py::test_build_fitting_configuration[inp6-expected6-False]
23-Feb-2026 22:06:12 FAILED hsd/tasks/baseline/worker_test.py::test_build_fitting_configuration[inp7-expected7-False]
23-Feb-2026 22:06:12 FAILED hsd/tasks/baseline/worker_test.py::test_build_fitting_configuration[ValueError-badfunc-True]
23-Feb-2026 22:06:12 FAILED hsd/tasks/baseline/worker_test.py::test_build_fitting_configuration[ValueError-expected9-True]
23-Feb-2026 22:06:12 ====== 10 failed, 656 passed, 12 skipped, 1 warning in 673.22s (0:11:13) =======
23-Feb-2026 22:06:12 1
23-Feb-2026 22:06:12 mkdir: cannot create directory 'workdir': File exists
23-Feb-2026 22:06:12 Finished task 'Test' with result: Success
23-Feb-2026 22:06:12 All conditions for task 'JUnit Parser' were met. Conditions: Variable bamboo.repository.pr.targetBranch matches pattern main
23-Feb-2026 22:06:12 Starting task 'JUnit Parser' of type 'com.atlassian.bamboo.plugins.testresultparser:task.testresultparser.junit'
23-Feb-2026 22:06:12 Parsing test results under /export/home/cbt-pipeline-test/ci-workspace/bamboohome/xml-data/build-dir/PIPE-PPRT1297-PPT666...
23-Feb-2026 22:06:12 Failing task since 10 failing test cases were found.
23-Feb-2026 22:06:12 Finished task 'JUnit Parser' with result: Failed
23-Feb-2026 22:06:12 Starting task 'Cleanup' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
23-Feb-2026 22:06:12
Beginning to execute external process for build 'Pipeline - Pipeline Pull Request Test - PIPE-2893-hsd_baseline-enable-sinusoid-option - Pipeline PR Test 6.6.6 #2 (PIPE-PPRT1297-PPT666-2)'
... running command line:
/export/home/cbt-pipeline-test/ci-workspace/bamboohome/temp/PIPE-PPRT1297-PPT666-2-ScriptBuildTask-12348392915046522568.sh
... in: /export/home/cbt-pipeline-test/ci-workspace/bamboohome/xml-data/build-dir/PIPE-PPRT1297-PPT666
23-Feb-2026 22:06:12 Starting cleanup
23-Feb-2026 22:06:13 Error response from daemon: No such container: pipeline-test
23-Feb-2026 22:06:13 Error response from daemon: No such container: pipeline-test
23-Feb-2026 22:06:13 Cleanup complete
23-Feb-2026 22:06:13 Finished task 'Cleanup' with result: Success
23-Feb-2026 22:06:13 Running post build plugin 'Docker Container Cleanup'
23-Feb-2026 22:06:13
Beginning to execute external process for build 'Pipeline - Pipeline Pull Request Test - PIPE-2893-hsd_baseline-enable-sinusoid-option - Pipeline PR Test 6.6.6 #2 (PIPE-PPRT1297-PPT666-2)'
... running command line:
/usr/bin/docker rm -f pipelinetest
... in: /export/home/cbt-pipeline-test/ci-workspace/bamboohome/xml-data/build-dir/PIPE-PPRT1297-PPT666
23-Feb-2026 22:06:16 pipelinetest
23-Feb-2026 22:06:16 Running post build plugin 'NCover Results Collector'
23-Feb-2026 22:06:16 Running post build plugin 'Build Results Label Collector'
23-Feb-2026 22:06:16 Running post build plugin 'Clover Results Collector'
23-Feb-2026 22:06:16 Running post build plugin 'npm Cache Cleanup'
23-Feb-2026 22:06:16 Running post build plugin 'Artifact Copier'
23-Feb-2026 22:06:16 Publishing an artifact: Result xml
23-Feb-2026 22:06:16 Finished publishing of artifact Non required job artifact Http Compression On : [Result xml], patterns: [pipeline_test_result.xml] anchored at: [pkgout] in 116.9 ms
23-Feb-2026 22:06:16 Finalising the build...
23-Feb-2026 22:06:16 Stopping timer.
23-Feb-2026 22:06:16 Build PIPE-PPRT1297-PPT666-2 completed.
23-Feb-2026 22:06:17 Running on server: post build plugin 'Build Hanging Detection Configuration'
23-Feb-2026 22:06:17 Running on server: post build plugin 'NCover Results Collector'
23-Feb-2026 22:06:17 Running on server: post build plugin 'Build Labeller'
23-Feb-2026 22:06:17 Running on server: post build plugin 'Clover Delta Calculator'
23-Feb-2026 22:06:17 Running on server: post build plugin 'Maven Dependencies Postprocessor'
23-Feb-2026 22:06:17 All post build plugins have finished
23-Feb-2026 22:06:17 Generating build results summary...
23-Feb-2026 22:06:17 Saving build results to disk...
23-Feb-2026 22:06:17 Store variable context...
23-Feb-2026 22:06:17 Finished building PIPE-PPRT1297-PPT666-2.