Skip to content

Commit

Permalink
Add SessionInfo.rig and task_version
Browse files Browse the repository at this point in the history
  • Loading branch information
bjhardcastle committed Oct 24, 2023
1 parent 3608c84 commit c3542cd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/npc_lims/status/tracked_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,23 @@ def is_templeton(self) -> bool:
self.training_info
) # training_info not available for Templeton sessions

@property
def rig(self) -> str:
"""From DR training spreadsheet (`NP2`, `B2`, 'BEH.E`).
- does not necessarily match `AIBS_RIG_ID` on computer
- `unknown` if not available (for Templeton sessions)
"""
return self.training_info.get("rig_name", "unknown")

@property
def task_version(self) -> str:
"""From DR training spreadsheet (`stage 5 ori AMN moving timeouts
repeats`).
- `unknown` if not available (for Templeton sessions)
"""
return self.training_info.get("task_version", "unknown")

def __hash__(self) -> int:
return hash(self.id)

Expand Down

0 comments on commit c3542cd

Please sign in to comment.