Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-20115

Fix circular dependency between ts_scriptqueue and ts_standard/eternalscripts

    XMLWordPrintable

    Details

    • Story Points:
      2
    • Sprint:
      TSSW Sprint - Jun 10 - Jun 22
    • Team:
      Telescope and Site

      Description

      ts_externalscripts and ts_standardscripts depend on ts_scriptqueue because that is where BaseScript is defined.

      ts_scriptqueue depends on ts_externalscripts and ts_standardscripts in order to find the scripts in those packages. (This is an optional dependency in the ups table).

      This is a real nuisance so I propose to break the dependency by moving BaseScript into ts_salobj. It's a bit of clutter there, but otherwise we need a new package, which seems overkill for a single class and its unit tests.

      For simplicity I propose to merge DM-18012 first, then implement this ticket. After both are merged to develop I will tag new versions of ts_salobj and ts_scriptqueue.

        Attachments

          Issue Links

            Activity

            Hide
            rowen Russell Owen added a comment - - edited

            I moved the BaseScript and TestScript classes from ts_scriptqueue to ts_salobj, along with the SAL Script documentation. I also took the opportunity to rename the test_utils module to test_script because it only contained the TestScript class. Finally I updated ts_standardscripts to get BaseScript from ts_salobj. I did not updated ts_externalscripts; that will be done on a different ticket.

            Pull requests:

            Built documentation:

            Show
            rowen Russell Owen added a comment - - edited I moved the BaseScript and TestScript classes from ts_scriptqueue to ts_salobj, along with the SAL Script documentation. I also took the opportunity to rename the test_utils module to test_script because it only contained the TestScript class. Finally I updated ts_standardscripts to get BaseScript from ts_salobj. I did not updated ts_externalscripts; that will be done on a different ticket. Pull requests: https://github.com/lsst-ts/ts_salobj/pull/45 https://github.com/lsst-ts/ts_scriptqueue/pull/33 https://github.com/lsst-ts/ts_standardscripts/pull/20 Built documentation: https://staff.washington.edu/rowen/ts_salobj_42/ https://staff.washington.edu/rowen/ts_scriptqueue_22/
            Hide
            tribeiro Tiago Ribeiro added a comment -

            I'm unable to build the system with the current setup. I think we need to resolve this before closing this ticket, otherwise we are left with a broken head.

            When I try to build sal with the required XML I get the following:

            ============================= test session starts ==============================
            platform linux -- Python 3.6.6, pytest-3.6.2, py-1.7.0, pluggy-0.6.0
            rootdir: /home/saluser/repos/ts_sal, inifile:
            plugins: cov-2.5.1, session2file-0.1.9, forked-0.2, xdist-1.20.1, flake8-1.0.4, remotedata-0.3.0, openfiles-0.3.0, doctestplus-0.1.3, arraydiff-0.2
            collected 28 items
            run-last-failure: run all (no recorded failures)
             
            tests/test_lsst_dds_domain.py .                                          [  3%]
            tests/test_sal.py FF.FF.FF.FFF..s.s....s.x.F.                            [100%]
             
            =================================== FAILURES ===================================
            ______________________ BasicTestCase.test_evt_get_newest _______________________
             
            self = <test_sal.BasicTestCase testMethod=test_evt_get_newest>
             
                def test_evt_get_newest(self):
                    """Write several messages and make sure gettting the newest
                        returns that and flushes the queue.
                        """
                    self.remote.salEventSub("Test_logevent_arrays")
                    time.sleep(STD_SLEEP)
                    self.controller.salEventPub("Test_logevent_arrays")
                    time.sleep(STD_SLEEP)
             
                    data_list = []
                    for i in range(3):
                        data = SALPY_Test.Test_logevent_arraysC()
            >           self.test_data.set_random_arrays(data)
             
            tests/test_sal.py:173:
            _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
             
            self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e6db9d3c8>
            data = <SALPY_Test.Test_logevent_arraysC object at 0x7f7e6db9d340>
             
                def set_random_arrays(self, data):
                    """Make random data for the arrays or setArrays topic."""
                    nelts = 5
                    data.boolean0[:] = np.random.choice([False, True], size=(nelts,))
                    printable_chars = [c for c in string.ascii_letters + string.digits]
            >       data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,)))
            E       AttributeError: 'SALPY_Test.Test_logevent_arraysC' object has no attribute 'char0'
             
            python/lsst/ts/sal/test_utils.py:192: AttributeError
            ______________ BasicTestCase.test_evt_get_newest_after_get_oldest ______________
             
            self = <test_sal.BasicTestCase testMethod=test_evt_get_newest_after_get_oldest>
             
                def test_evt_get_newest_after_get_oldest(self):
                    """Test that get newest after get oldest gets the newest value.
             
                        This tests DM-18491.
                        """
                    self.remote.salEventSub("Test_logevent_arrays")
                    time.sleep(STD_SLEEP)
                    self.controller.salEventPub("Test_logevent_arrays")
                    time.sleep(STD_SLEEP)
             
                    for get_event in (False, True):
                        with self.subTest(get_event=get_event):
            >               self.check_get_newest_after_get_oldest(test_events=True, get_event=get_event)
             
            tests/test_sal.py:237:
            _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
            tests/test_sal.py:274: in check_get_newest_after_get_oldest
                self.test_data.set_random_arrays(data)
            _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
             
            self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e3f9e2d30>
            data = <SALPY_Test.Test_logevent_arraysC object at 0x7f7e3f9e2dc0>
             
                def set_random_arrays(self, data):
                    """Make random data for the arrays or setArrays topic."""
                    nelts = 5
                    data.boolean0[:] = np.random.choice([False, True], size=(nelts,))
                    printable_chars = [c for c in string.ascii_letters + string.digits]
            >       data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,)))
            E       AttributeError: 'SALPY_Test.Test_logevent_arraysC' object has no attribute 'char0'
             
            python/lsst/ts/sal/test_utils.py:192: AttributeError
            __________________ BasicTestCase.test_evt_late_joiner_newest ___________________
             
            self = <test_sal.BasicTestCase testMethod=test_evt_late_joiner_newest>
             
                def test_evt_late_joiner_newest(self):
                    """Test that a late joiner can see an event using getEvent.
                        """
                    self.controller.salEventPub("Test_logevent_arrays")
                    time.sleep(STD_SLEEP)
             
                    data_list = []
                    for i in range(5):
                        data = SALPY_Test.Test_logevent_arraysC()
            >           self.test_data.set_random_arrays(data)
             
            tests/test_sal.py:360:
            _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
             
            self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e3fa09dd8>
            data = <SALPY_Test.Test_logevent_arraysC object at 0x7f7e3fa09df8>
             
                def set_random_arrays(self, data):
                    """Make random data for the arrays or setArrays topic."""
                    nelts = 5
                    data.boolean0[:] = np.random.choice([False, True], size=(nelts,))
                    printable_chars = [c for c in string.ascii_letters + string.digits]
            >       data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,)))
            E       AttributeError: 'SALPY_Test.Test_logevent_arraysC' object has no attribute 'char0'
             
            python/lsst/ts/sal/test_utils.py:192: AttributeError
            __________________ BasicTestCase.test_evt_late_joiner_oldest ___________________
             
            self = <test_sal.BasicTestCase testMethod=test_evt_late_joiner_oldest>
             
                def test_evt_late_joiner_oldest(self):
                    """Test that a late joiner can an event using getNextSample.
             
                        Only one value is retrievable.
                        """
                    self.controller.salEventPub("Test_logevent_arrays")
                    time.sleep(STD_SLEEP)
             
                    data_list = []
                    for i in range(5):
                        data = SALPY_Test.Test_logevent_arraysC()
            >           self.test_data.set_random_arrays(data)
             
            tests/test_sal.py:316:
            _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
             
            self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e3f974908>
            data = <SALPY_Test.Test_logevent_arraysC object at 0x7f7e3f974928>
             
                def set_random_arrays(self, data):
                    """Make random data for the arrays or setArrays topic."""
                    nelts = 5
                    data.boolean0[:] = np.random.choice([False, True], size=(nelts,))
                    printable_chars = [c for c in string.ascii_letters + string.digits]
            >       data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,)))
            E       AttributeError: 'SALPY_Test.Test_logevent_arraysC' object has no attribute 'char0'
             
            python/lsst/ts/sal/test_utils.py:192: AttributeError
            ______________________ BasicTestCase.test_tel_get_newest _______________________
             
            self = <test_sal.BasicTestCase testMethod=test_tel_get_newest>
             
                def test_tel_get_newest(self):
                    """Write several messages and make sure gettting the newest
                        returns that and flushes the queue.
                        """
                    self.remote.salTelemetrySub("Test_arrays")
                    time.sleep(STD_SLEEP)
                    self.controller.salTelemetryPub("Test_arrays")
                    time.sleep(STD_SLEEP)
             
                    data_list = []
                    for i in range(3):
                        data = SALPY_Test.Test_arraysC()
            >           self.test_data.set_random_arrays(data)
             
            tests/test_sal.py:205:
            _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
             
            self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e6de36cc0>
            data = <SALPY_Test.Test_arraysC object at 0x7f7e6de368b8>
             
                def set_random_arrays(self, data):
                    """Make random data for the arrays or setArrays topic."""
                    nelts = 5
                    data.boolean0[:] = np.random.choice([False, True], size=(nelts,))
                    printable_chars = [c for c in string.ascii_letters + string.digits]
            >       data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,)))
            E       AttributeError: 'SALPY_Test.Test_arraysC' object has no attribute 'char0'
             
            python/lsst/ts/sal/test_utils.py:192: AttributeError
            ______________ BasicTestCase.test_tel_get_newest_after_get_oldest ______________
             
            self = <test_sal.BasicTestCase testMethod=test_tel_get_newest_after_get_oldest>
             
                def test_tel_get_newest_after_get_oldest(self):
                    """Test that get newest after get oldest gets the newest value.
             
                        This tests DM-18491.
                        """
                    self.remote.salTelemetrySub("Test_arrays")
                    time.sleep(STD_SLEEP)
                    self.controller.salTelemetryPub("Test_arrays")
                    time.sleep(STD_SLEEP)
             
            >       self.check_get_newest_after_get_oldest(test_events=False, get_event=False)
             
            tests/test_sal.py:249:
            _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
            tests/test_sal.py:274: in check_get_newest_after_get_oldest
                self.test_data.set_random_arrays(data)
            _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
             
            self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e3f9e2080>
            data = <SALPY_Test.Test_arraysC object at 0x7f7e3f9e2420>
             
                def set_random_arrays(self, data):
                    """Make random data for the arrays or setArrays topic."""
                    nelts = 5
                    data.boolean0[:] = np.random.choice([False, True], size=(nelts,))
                    printable_chars = [c for c in string.ascii_letters + string.digits]
            >       data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,)))
            E       AttributeError: 'SALPY_Test.Test_arraysC' object has no attribute 'char0'
             
            python/lsst/ts/sal/test_utils.py:192: AttributeError
            __________________ BasicTestCase.test_tel_late_joiner_newest ___________________
             
            self = <test_sal.BasicTestCase testMethod=test_tel_late_joiner_newest>
             
                def test_tel_late_joiner_newest(self):
                    """Test that a late joiner can see telemetry using getSample.
                        """
                    self.controller.salTelemetryPub("Test_arrays")
                    time.sleep(STD_SLEEP)
             
                    data_list = []
                    for i in range(5):
                        data = SALPY_Test.Test_arraysC()
            >           self.test_data.set_random_arrays(data)
             
            tests/test_sal.py:381:
            _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
             
            self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e3f924c18>
            data = <SALPY_Test.Test_arraysC object at 0x7f7e3f9240d8>
             
                def set_random_arrays(self, data):
                    """Make random data for the arrays or setArrays topic."""
                    nelts = 5
                    data.boolean0[:] = np.random.choice([False, True], size=(nelts,))
                    printable_chars = [c for c in string.ascii_letters + string.digits]
            >       data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,)))
            E       AttributeError: 'SALPY_Test.Test_arraysC' object has no attribute 'char0'
             
            python/lsst/ts/sal/test_utils.py:192: AttributeError
            __________________ BasicTestCase.test_tel_late_joiner_oldest ___________________
             
            self = <test_sal.BasicTestCase testMethod=test_tel_late_joiner_oldest>
             
                def test_tel_late_joiner_oldest(self):
                    """Test that a late joiner can see telemetry using getNextSample.
             
                        Only one value is retrievable.
                        """
                    self.controller.salTelemetryPub("Test_arrays")
                    time.sleep(STD_SLEEP)
             
                    data_list = []
                    for i in range(5):
                        data = SALPY_Test.Test_arraysC()
            >           self.test_data.set_random_arrays(data)
             
            tests/test_sal.py:339:
            _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
             
            self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e6db9d080>
            data = <SALPY_Test.Test_arraysC object at 0x7f7e6db9d260>
             
                def set_random_arrays(self, data):
                    """Make random data for the arrays or setArrays topic."""
                    nelts = 5
                    data.boolean0[:] = np.random.choice([False, True], size=(nelts,))
                    printable_chars = [c for c in string.ascii_letters + string.digits]
            >       data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,)))
            E       AttributeError: 'SALPY_Test.Test_arraysC' object has no attribute 'char0'
             
            python/lsst/ts/sal/test_utils.py:192: AttributeError
            ___________________ ScriptTestCase.test_enumerations_present ___________________
             
            self = <test_sal.ScriptTestCase testMethod=test_enumerations_present>
             
                def test_enumerations_present(self):
                    """Test that enumeration values are present as constants."""
            >       self.assertTrue(hasattr(SALPY_Script, "state_Done"))
            E       AssertionError: False is not true
             
            tests/test_sal.py:400: AssertionError
            ___________________________ TestTestData.test_arrays ___________________________
             
            self = <test_sal.TestTestData testMethod=test_arrays>
             
                def test_arrays(self):
                    data_list = []
                    for i in range(10):
                        data = SALPY_Test.Test_arraysC()
            >           self.test_data.set_random_arrays(data)
             
            tests/test_sal.py:733:
            _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
             
            self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e3fa092b0>
            data = <SALPY_Test.Test_arraysC object at 0x7f7e3fa09308>
             
                def set_random_arrays(self, data):
                    """Make random data for the arrays or setArrays topic."""
                    nelts = 5
                    data.boolean0[:] = np.random.choice([False, True], size=(nelts,))
                    printable_chars = [c for c in string.ascii_letters + string.digits]
            >       data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,)))
            E       AttributeError: 'SALPY_Test.Test_arraysC' object has no attribute 'char0'
             
            python/lsst/ts/sal/test_utils.py:192: AttributeError
             generated xml file: /home/saluser/repos/ts_sal/tests/.tests/pytest-ts_sal.xml -
             
            ----------- coverage: platform linux, python 3.6.6-final-0 -----------
            Name                               Stmts   Miss Branch BrPart  Cover
            --------------------------------------------------------------------
            python/lsst/ts/sal/test_utils.py      77     21     28      2    67%
            tests/test_lsst_dds_domain.py         84      3     26      3    95%
            tests/test_sal.py                    436    109     70     13    73%
            --------------------------------------------------------------------
            TOTAL                                597    133    124     18    75%
            Coverage HTML written to dir tests/.tests/pytest-ts_sal.xml-htmlcov
            Coverage XML written to file tests/.tests/pytest-ts_sal.xml-cov-ts_sal.xml
             
            ========= 10 failed, 14 passed, 3 skipped, 1 xfailed in 31.77 seconds ==========
            Global pytest run: failed with 1
            Failed test output:
            Global pytest output is in /home/saluser/repos/ts_sal/tests/.tests/pytest-ts_sal.xml.failed
            The following tests failed:
            /home/saluser/repos/ts_sal/tests/.tests/pytest-ts_sal.xml.failed
            

            which seems to be caused by char0 being removed from Test_arrays topic.

            Show
            tribeiro Tiago Ribeiro added a comment - I'm unable to build the system with the current setup. I think we need to resolve this before closing this ticket, otherwise we are left with a broken head. When I try to build sal with the required XML I get the following: ============================= test session starts ============================== platform linux -- Python 3.6.6, pytest-3.6.2, py-1.7.0, pluggy-0.6.0 rootdir: /home/saluser/repos/ts_sal, inifile: plugins: cov-2.5.1, session2file-0.1.9, forked-0.2, xdist-1.20.1, flake8-1.0.4, remotedata-0.3.0, openfiles-0.3.0, doctestplus-0.1.3, arraydiff-0.2 collected 28 items run-last-failure: run all (no recorded failures)   tests/test_lsst_dds_domain.py . [ 3%] tests/test_sal.py FF.FF.FF.FFF..s.s....s.x.F. [100%]   =================================== FAILURES =================================== ______________________ BasicTestCase.test_evt_get_newest _______________________   self = <test_sal.BasicTestCase testMethod=test_evt_get_newest>   def test_evt_get_newest(self): """Write several messages and make sure gettting the newest returns that and flushes the queue. """ self.remote.salEventSub("Test_logevent_arrays") time.sleep(STD_SLEEP) self.controller.salEventPub("Test_logevent_arrays") time.sleep(STD_SLEEP)   data_list = [] for i in range(3): data = SALPY_Test.Test_logevent_arraysC() > self.test_data.set_random_arrays(data)   tests/test_sal.py:173: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _   self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e6db9d3c8> data = <SALPY_Test.Test_logevent_arraysC object at 0x7f7e6db9d340>   def set_random_arrays(self, data): """Make random data for the arrays or setArrays topic.""" nelts = 5 data.boolean0[:] = np.random.choice([False, True], size=(nelts,)) printable_chars = [c for c in string.ascii_letters + string.digits] > data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,))) E AttributeError: 'SALPY_Test.Test_logevent_arraysC' object has no attribute 'char0'   python/lsst/ts/sal/test_utils.py:192: AttributeError ______________ BasicTestCase.test_evt_get_newest_after_get_oldest ______________   self = <test_sal.BasicTestCase testMethod=test_evt_get_newest_after_get_oldest>   def test_evt_get_newest_after_get_oldest(self): """Test that get newest after get oldest gets the newest value.   This tests DM-18491. """ self.remote.salEventSub("Test_logevent_arrays") time.sleep(STD_SLEEP) self.controller.salEventPub("Test_logevent_arrays") time.sleep(STD_SLEEP)   for get_event in (False, True): with self.subTest(get_event=get_event): > self.check_get_newest_after_get_oldest(test_events=True, get_event=get_event)   tests/test_sal.py:237: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_sal.py:274: in check_get_newest_after_get_oldest self.test_data.set_random_arrays(data) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _   self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e3f9e2d30> data = <SALPY_Test.Test_logevent_arraysC object at 0x7f7e3f9e2dc0>   def set_random_arrays(self, data): """Make random data for the arrays or setArrays topic.""" nelts = 5 data.boolean0[:] = np.random.choice([False, True], size=(nelts,)) printable_chars = [c for c in string.ascii_letters + string.digits] > data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,))) E AttributeError: 'SALPY_Test.Test_logevent_arraysC' object has no attribute 'char0'   python/lsst/ts/sal/test_utils.py:192: AttributeError __________________ BasicTestCase.test_evt_late_joiner_newest ___________________   self = <test_sal.BasicTestCase testMethod=test_evt_late_joiner_newest>   def test_evt_late_joiner_newest(self): """Test that a late joiner can see an event using getEvent. """ self.controller.salEventPub("Test_logevent_arrays") time.sleep(STD_SLEEP)   data_list = [] for i in range(5): data = SALPY_Test.Test_logevent_arraysC() > self.test_data.set_random_arrays(data)   tests/test_sal.py:360: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _   self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e3fa09dd8> data = <SALPY_Test.Test_logevent_arraysC object at 0x7f7e3fa09df8>   def set_random_arrays(self, data): """Make random data for the arrays or setArrays topic.""" nelts = 5 data.boolean0[:] = np.random.choice([False, True], size=(nelts,)) printable_chars = [c for c in string.ascii_letters + string.digits] > data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,))) E AttributeError: 'SALPY_Test.Test_logevent_arraysC' object has no attribute 'char0'   python/lsst/ts/sal/test_utils.py:192: AttributeError __________________ BasicTestCase.test_evt_late_joiner_oldest ___________________   self = <test_sal.BasicTestCase testMethod=test_evt_late_joiner_oldest>   def test_evt_late_joiner_oldest(self): """Test that a late joiner can an event using getNextSample.   Only one value is retrievable. """ self.controller.salEventPub("Test_logevent_arrays") time.sleep(STD_SLEEP)   data_list = [] for i in range(5): data = SALPY_Test.Test_logevent_arraysC() > self.test_data.set_random_arrays(data)   tests/test_sal.py:316: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _   self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e3f974908> data = <SALPY_Test.Test_logevent_arraysC object at 0x7f7e3f974928>   def set_random_arrays(self, data): """Make random data for the arrays or setArrays topic.""" nelts = 5 data.boolean0[:] = np.random.choice([False, True], size=(nelts,)) printable_chars = [c for c in string.ascii_letters + string.digits] > data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,))) E AttributeError: 'SALPY_Test.Test_logevent_arraysC' object has no attribute 'char0'   python/lsst/ts/sal/test_utils.py:192: AttributeError ______________________ BasicTestCase.test_tel_get_newest _______________________   self = <test_sal.BasicTestCase testMethod=test_tel_get_newest>   def test_tel_get_newest(self): """Write several messages and make sure gettting the newest returns that and flushes the queue. """ self.remote.salTelemetrySub("Test_arrays") time.sleep(STD_SLEEP) self.controller.salTelemetryPub("Test_arrays") time.sleep(STD_SLEEP)   data_list = [] for i in range(3): data = SALPY_Test.Test_arraysC() > self.test_data.set_random_arrays(data)   tests/test_sal.py:205: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _   self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e6de36cc0> data = <SALPY_Test.Test_arraysC object at 0x7f7e6de368b8>   def set_random_arrays(self, data): """Make random data for the arrays or setArrays topic.""" nelts = 5 data.boolean0[:] = np.random.choice([False, True], size=(nelts,)) printable_chars = [c for c in string.ascii_letters + string.digits] > data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,))) E AttributeError: 'SALPY_Test.Test_arraysC' object has no attribute 'char0'   python/lsst/ts/sal/test_utils.py:192: AttributeError ______________ BasicTestCase.test_tel_get_newest_after_get_oldest ______________   self = <test_sal.BasicTestCase testMethod=test_tel_get_newest_after_get_oldest>   def test_tel_get_newest_after_get_oldest(self): """Test that get newest after get oldest gets the newest value.   This tests DM-18491. """ self.remote.salTelemetrySub("Test_arrays") time.sleep(STD_SLEEP) self.controller.salTelemetryPub("Test_arrays") time.sleep(STD_SLEEP)   > self.check_get_newest_after_get_oldest(test_events=False, get_event=False)   tests/test_sal.py:249: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/test_sal.py:274: in check_get_newest_after_get_oldest self.test_data.set_random_arrays(data) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _   self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e3f9e2080> data = <SALPY_Test.Test_arraysC object at 0x7f7e3f9e2420>   def set_random_arrays(self, data): """Make random data for the arrays or setArrays topic.""" nelts = 5 data.boolean0[:] = np.random.choice([False, True], size=(nelts,)) printable_chars = [c for c in string.ascii_letters + string.digits] > data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,))) E AttributeError: 'SALPY_Test.Test_arraysC' object has no attribute 'char0'   python/lsst/ts/sal/test_utils.py:192: AttributeError __________________ BasicTestCase.test_tel_late_joiner_newest ___________________   self = <test_sal.BasicTestCase testMethod=test_tel_late_joiner_newest>   def test_tel_late_joiner_newest(self): """Test that a late joiner can see telemetry using getSample. """ self.controller.salTelemetryPub("Test_arrays") time.sleep(STD_SLEEP)   data_list = [] for i in range(5): data = SALPY_Test.Test_arraysC() > self.test_data.set_random_arrays(data)   tests/test_sal.py:381: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _   self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e3f924c18> data = <SALPY_Test.Test_arraysC object at 0x7f7e3f9240d8>   def set_random_arrays(self, data): """Make random data for the arrays or setArrays topic.""" nelts = 5 data.boolean0[:] = np.random.choice([False, True], size=(nelts,)) printable_chars = [c for c in string.ascii_letters + string.digits] > data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,))) E AttributeError: 'SALPY_Test.Test_arraysC' object has no attribute 'char0'   python/lsst/ts/sal/test_utils.py:192: AttributeError __________________ BasicTestCase.test_tel_late_joiner_oldest ___________________   self = <test_sal.BasicTestCase testMethod=test_tel_late_joiner_oldest>   def test_tel_late_joiner_oldest(self): """Test that a late joiner can see telemetry using getNextSample.   Only one value is retrievable. """ self.controller.salTelemetryPub("Test_arrays") time.sleep(STD_SLEEP)   data_list = [] for i in range(5): data = SALPY_Test.Test_arraysC() > self.test_data.set_random_arrays(data)   tests/test_sal.py:339: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _   self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e6db9d080> data = <SALPY_Test.Test_arraysC object at 0x7f7e6db9d260>   def set_random_arrays(self, data): """Make random data for the arrays or setArrays topic.""" nelts = 5 data.boolean0[:] = np.random.choice([False, True], size=(nelts,)) printable_chars = [c for c in string.ascii_letters + string.digits] > data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,))) E AttributeError: 'SALPY_Test.Test_arraysC' object has no attribute 'char0'   python/lsst/ts/sal/test_utils.py:192: AttributeError ___________________ ScriptTestCase.test_enumerations_present ___________________   self = <test_sal.ScriptTestCase testMethod=test_enumerations_present>   def test_enumerations_present(self): """Test that enumeration values are present as constants.""" > self.assertTrue(hasattr(SALPY_Script, "state_Done")) E AssertionError: False is not true   tests/test_sal.py:400: AssertionError ___________________________ TestTestData.test_arrays ___________________________   self = <test_sal.TestTestData testMethod=test_arrays>   def test_arrays(self): data_list = [] for i in range(10): data = SALPY_Test.Test_arraysC() > self.test_data.set_random_arrays(data)   tests/test_sal.py:733: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _   self = <lsst.ts.sal.test_utils.TestData object at 0x7f7e3fa092b0> data = <SALPY_Test.Test_arraysC object at 0x7f7e3fa09308>   def set_random_arrays(self, data): """Make random data for the arrays or setArrays topic.""" nelts = 5 data.boolean0[:] = np.random.choice([False, True], size=(nelts,)) printable_chars = [c for c in string.ascii_letters + string.digits] > data.char0 = "".join(np.random.choice(printable_chars, size=(nelts,))) E AttributeError: 'SALPY_Test.Test_arraysC' object has no attribute 'char0'   python/lsst/ts/sal/test_utils.py:192: AttributeError generated xml file: /home/saluser/repos/ts_sal/tests/.tests/pytest-ts_sal.xml -   ----------- coverage: platform linux, python 3.6.6-final-0 ----------- Name Stmts Miss Branch BrPart Cover -------------------------------------------------------------------- python/lsst/ts/sal/test_utils.py 77 21 28 2 67% tests/test_lsst_dds_domain.py 84 3 26 3 95% tests/test_sal.py 436 109 70 13 73% -------------------------------------------------------------------- TOTAL 597 133 124 18 75% Coverage HTML written to dir tests/.tests/pytest-ts_sal.xml-htmlcov Coverage XML written to file tests/.tests/pytest-ts_sal.xml-cov-ts_sal.xml   ========= 10 failed, 14 passed, 3 skipped, 1 xfailed in 31.77 seconds ========== Global pytest run: failed with 1 Failed test output: Global pytest output is in /home/saluser/repos/ts_sal/tests/.tests/pytest-ts_sal.xml.failed The following tests failed: /home/saluser/repos/ts_sal/tests/.tests/pytest-ts_sal.xml.failed which seems to be caused by char0 being removed from Test_arrays topic.
            Hide
            tribeiro Tiago Ribeiro added a comment -

            Reviewed all the code on GitHub. 

            Show
            tribeiro Tiago Ribeiro added a comment - Reviewed all the code on GitHub. 
            Hide
            rowen Russell Owen added a comment -

            At the standup meeting today we agreed to fix the incompatibility between ts_sal 3.10 and ts_xml develop by adding a temporary commit to ts_xml develop that works with both ts_sal 3.10 and ts_sal develop: DM-20239.

            Show
            rowen Russell Owen added a comment - At the standup meeting today we agreed to fix the incompatibility between ts_sal 3.10 and ts_xml develop by adding a temporary commit to ts_xml develop that works with both ts_sal 3.10 and ts_sal develop: DM-20239 .
            Hide
            rowen Russell Owen added a comment -

            Merged to develop and master and released as:

            • ts_salobj v4.2.0
            • ts_scriptqueue v2.2.0
            • ts_standardscripts v0.4.0

            I will update ts_externalscripts on DM-20243 once the blocking tickets are implemented.

            Show
            rowen Russell Owen added a comment - Merged to develop and master and released as: ts_salobj v4.2.0 ts_scriptqueue v2.2.0 ts_standardscripts v0.4.0 I will update ts_externalscripts on DM-20243 once the blocking tickets are implemented.

              People

              Assignee:
              rowen Russell Owen
              Reporter:
              rowen Russell Owen
              Reviewers:
              Tiago Ribeiro
              Watchers:
              Russell Owen, Tiago Ribeiro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.