Skip to content

Commit

Permalink
The ScriptQueue index is now a required argument to the csc_state_tra…
Browse files Browse the repository at this point in the history
…nsition.py script.
  • Loading branch information
rbovill committed Nov 5, 2024
1 parent 24e240b commit 011faa9
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions python/lsst/ts/IntegrationTests/csc_state_transition.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class CSCStateTransition(BaseScript):
The index value for the indexed-CSC.
state : `str`
The state to transition.
sq_index : `int`
The index of the ScriptQueue to use to run the state transition.
additional_configuration : `str`
Any additional state-transition configuration items.
"""
Expand All @@ -55,17 +57,14 @@ def __init__(
self,
csc: str,
state: str,
sq_index: int,
additional_configuration: str = "",
) -> None:
super().__init__()
self.csc = csc
self.state = state
self.index = sq_index
self.added_config = additional_configuration
# Set the ScriptQueue index based on which telescope.
if csc[:2].lower() == "at":
self.index = 2
else:
self.index = 1
# Construct the intermediate configuration list.
# Convert the list to a string.
temp_config = [self.csc, self.state]
Expand All @@ -87,9 +86,7 @@ def __init__(


def csc_state_transition() -> None:
# Define the lists of CSC and State options.
csc_list = list(utils.cscs)
csc_list.sort()
# Define the State options lists.
state_list = list(utils.csc_states)
state_list.sort()
# Define the script arguments.
Expand Down Expand Up @@ -132,7 +129,7 @@ def csc_state_transition() -> None:
exit()
if args.csc.split(":")[0] not in utils.cscs:
print(
f"Invalid CSC: {args.csc.split(":")[0]}. "
f"Invalid CSC: {args.csc.split(':')[0]}. "
f"Perhaps it is misspelled or not properly capitalized."
)
parser.print_help()
Expand Down

0 comments on commit 011faa9

Please sign in to comment.