simonsobs / simonsobs/sorunlib

`smurf.set_targets()` only works on first call without reinitialization

Open
#55 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
0
Forks
0
Avg merge
17h 32m
Merged PRs (30d)
1

Description

If you set the target pysmurf-controllers via smurf.set_targets(), then want to change to a different controller that isn't in the list you set the first time it won't work. For example:

from sorunlib import *

initialize()  # creates CLIENT list with ['smurf1', 'smurf2'] in it
smurf.set_targets(['smurf1'])

# won't work
smurf.set_targets(['smurf2'])

This is because smurf.set_targets() merely selects items from the existing run.CLIENTS list. This means one has to re-initialize(). Perhaps smurf.set_targets() should re-build the run.CLIENTS list itself.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the smurf.set_targets() entry point and trace how it selects items from run.CLIENTS after initialize(). Reproduce the two successive set_targets() calls from the issue, then verify that changing from smurf1 to smurf2 works without reinitialization.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.