Commit 205cd4ea authored by Kelvin Loh's avatar Kelvin Loh 🖖
Browse files

Merge branch 'fix_ic_prefix_zi_backend_csv' into 'main'

Fixes the ic prefix issue for the csv files.

Closes #259

See merge request quantify-os/quantify-scheduler!334
parents cbc93b6a b2dd81df
Loading
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ class ZIInstrumentCoordinatorComponent(base.InstrumentCoordinatorComponentBase):
            )
            return False

        logger.info(f"Configuring {self.name}.")
        logger.info(f"Configuring {self.instrument.name}.")
        # if the settings are not identical, update the attributes of the
        # ic component and apply the settings to the hardware.
        self.zi_settings = new_zi_settings
@@ -108,7 +108,7 @@ class ZIInstrumentCoordinatorComponent(base.InstrumentCoordinatorComponentBase):
        self.zi_settings.serialize(
            self._data_path,
            ZISerializeSettings(
                self.name, self.instrument._serial, self.instrument._type
                self.instrument.name, self.instrument._serial, self.instrument._type
            ),
        )

@@ -247,7 +247,7 @@ class UHFQAInstrumentCoordinatorComponent(ZIInstrumentCoordinatorComponent):
        # N.B. note this copies waves that were written during compilation, but are not
        # contained in the zi_device_config that is passed as an argument here.
        waves_path: Path = zi_helpers.get_waves_directory(self.instrument.awg)
        wave_files = list(self._data_path.glob(f"{self.name}*.csv"))
        wave_files = list(self._data_path.glob(f"{self.instrument.name}*.csv"))
        for file in wave_files:
            shutil.copy2(str(file), str(waves_path))

+2 −2
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ def test_hdawg_prepare(mocker, make_hdawg):

    # Assert
    hdawg_serialize_settings = settings.ZISerializeSettings(
        f"ic_{hdawg.instrument.name}", hdawg.instrument._serial, hdawg.instrument._type
        f"{hdawg.instrument.name}", hdawg.instrument._serial, hdawg.instrument._type
    )
    serialize.assert_called_with(Path("."), hdawg_serialize_settings)
    apply.assert_called_with(hdawg.instrument)
@@ -241,7 +241,7 @@ def test_uhfqa_prepare(mocker, make_uhfqa):

    # Assert
    uhfqa_serialize_settings = settings.ZISerializeSettings(
        f"ic_{uhfqa.instrument.name}", uhfqa.instrument._serial, uhfqa.instrument._type
        f"{uhfqa.instrument.name}", uhfqa.instrument._serial, uhfqa.instrument._type
    )
    serialize.assert_called_with(Path("."), uhfqa_serialize_settings)
    apply.assert_called_with(uhfqa.instrument)