simonsobs / sorunlib

High level library for running observatory operations using OCS.
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Refactor how SMuRF operations are called #108

Closed BrianJKoopman closed 11 months ago

BrianJKoopman commented 11 months ago

This PR contains the following:

  1. Introduces smurf._run_op(), which provides a convenient way to call any given task in the pysmurf controllers.
  2. Expands the way the mocked smurf clients were constructed -- all SMuRF operations now need their own Mock object due to the construction in smurf._run_op().
  3. Moves the mocked clients function to tests/util.py, since several tests are implementing the same thing. Future tests should use this as the "one true mock".
  4. Updates the CLIENTS list patch to patch it directly, rather than patching the create_clients() function (which still then requires an initialize() is run in every test). This matches the way the wiregrid module patches.

This is in advance of work on #94, which requires adding error handling within _run_op().