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

Add showSchema command to the script queue.

    XMLWordPrintable

    Details

    • Story Points:
      2
    • Sprint:
      TSSW Sprint - Mar 18 - Mar 30, TSSW Sprint - May 28 - Jun 8, TSSW Sprint - Jun 10 - Jun 22
    • Team:
      Telescope and Site

      Description

      Each script available to the queue have different sets of configuration parameters. To know them, we currently have to look into the code… It would be very helpful to be able to “ask the queue” what are the parameters of a specific script are. Ideally, when the queue receives such a command it would not put the script to run on the queue, but rather, read the configuration parameters from it and publish it through an event.

      I think that it would suffice to get the docstring from the configure method and output that to SAL.

      In [1]: from lsst.ts.scriptqueue.test_utils import TestScript
      Could not import lsstcppimport; please ensure the base package has been built (not just setup).
       
       
      In [2]: print(TestScript.configure.__doc__)
      Configure the script.
       
              Parameters
              ----------
              wait_time : `float`
                  Time to wait, in seconds
              fail_run : `bool`
                  If True then raise an exception in `run` after the "start"
                  checkpoint but before waiting.
              fail_cleanup : `bool`
                  If True then raise an exception in `cleanup`.
       
              Raises
              ------
              `salobj.ExpectedError`
                  If ``wait_time < 0``. This can be used to make config fail.
      

      Although I'm not sure how that would work for non-python scripts.

        Attachments

          Issue Links

            Activity

            Hide
            rowen Russell Owen added a comment - - edited

            In addition to the change specified I also did two other things:

            • Speeded up startup by using Remote that do not wait for historical data, when practical. This makes a big improvement in unit test execution speed.
            • Added explicit wait for Remote.start_task, to make the timing of waiting for events more predictable and to make the code a better example of recommended usage.

            Pull requests:

            Rob Bovill could you please review the ts_xml ticket branch? I'll ask Tiago Ribeiro to review the other pull requests.

            Show
            rowen Russell Owen added a comment - - edited In addition to the change specified I also did two other things: Speeded up startup by using Remote that do not wait for historical data, when practical. This makes a big improvement in unit test execution speed. Added explicit wait for Remote.start_task , to make the timing of waiting for events more predictable and to make the code a better example of recommended usage. Pull requests: ts_scriptqueue: https://github.com/lsst-ts/ts_scriptqueue/pull/32 ts_standardscripts: https://github.com/lsst-ts/ts_standardscripts/pull/18 ts_xml: https://github.com/lsst-ts/ts_xml/pull/89 Rob Bovill could you please review the ts_xml ticket branch? I'll ask Tiago Ribeiro to review the other pull requests.
            Hide
            tribeiro Tiago Ribeiro added a comment -

            Code reviewed in GitHub.

            Show
            tribeiro Tiago Ribeiro added a comment - Code reviewed in GitHub.
            Hide
            rbovill Rob Bovill added a comment -

            I reviewed the Pull Request and made comments.  The term 'schema' is a MySQL reserved word and thus the 'schema' event in ScriptQueue Events file must be changed.

            Show
            rbovill Rob Bovill added a comment - I reviewed the Pull Request and made comments.  The term 'schema' is a MySQL reserved word and thus the 'schema' event in ScriptQueue Events file must be changed.
            Hide
            rowen Russell Owen added a comment -

            Rob Bovill my apologies. I fixed that when you first pointed it out but forgot to push. The change is now pushed and rebased. I renamed "schema" to "configSchema" in the events.

            Show
            rowen Russell Owen added a comment - Rob Bovill my apologies. I fixed that when you first pointed it out but forgot to push. The change is now pushed and rebased. I renamed "schema" to "configSchema" in the events.
            Hide
            rowen Russell Owen added a comment -

            Merged ts_xml, ts_scriptqueue and ts_standardscripts to develop.

            Show
            rowen Russell Owen added a comment - Merged ts_xml, ts_scriptqueue and ts_standardscripts to develop.

              People

              Assignee:
              rowen Russell Owen
              Reporter:
              tribeiro Tiago Ribeiro
              Reviewers:
              Rob Bovill, Tiago Ribeiro
              Watchers:
              Andy Clements, James Buffill [X] (Inactive), Patrick Ingraham, Rob Bovill, Russell Owen, Tiago Ribeiro, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Start date:
                End date:

                  Jenkins

                  No builds found.