Skip to content

Miscellaneous suggestions during review of v2.9.0

  1. https://git.ligo.org/computing/sccb/-/issues/1884#note_1584080

This is a really minor thing, but in tasks/external_triggers.py, the lines

    if (Time.now().gps - end) > 3:
        waittime = 0
    else:  # wait 3 seconds for data transfer
        waittime = 3 - (Time.now().gps - end)

could be simplified to

    waittime = max(3 - (Time.now().gps - end), 0)

Technically the behavior is slightly different, as you're only calling Time.now() once, but not in a way that I think matters.

Since it's simplified, you could split it over more lines to be a little clearer

    seconds_since_end = Time.now().gps - end
    waittime = max(3-seconds_since_end, 0)
  1. see https://git.ligo.org/computing/sccb/-/issues/1884#note_1584084

Not review blocker, but something that should be addressed in a later release: there are a couple issues with tasks/orchestrator.py.

The docstring says filenames is a tuple, but that can't be true or else .remove() wouldn't work. The docstring also calls it a list, which I'm assuming is correct, so it should be referred to as a list everywhere.

Also, list.remove isn't the most efficient way to handle this, as it is searching by value (which could one day introduce a bug if somehow two entries had a value of None), whereas you know which index needs to be removed (the last one). Instead you should replace

    filenames.remove(filenames[-1])

with

    del filenames[-1]
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information