Build: #1 failed

Job: Pipeline PR Test 6.6.6 failed

Stages & jobs

  1. Default Stage

Build log

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

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