Example #1
0
 def abandoned_arm_from_sqa(
         self, abandoned_arm_sqa: SQAAbandonedArm) -> AbandonedArm:
     """Convert SQLAlchemy AbandonedArm to Ax AbandonedArm."""
     arm = AbandonedArm(
         name=abandoned_arm_sqa.name,
         reason=abandoned_arm_sqa.abandoned_reason,
         time=abandoned_arm_sqa.time_abandoned,
     )
     arm.db_id = abandoned_arm_sqa.id
     return arm
Example #2
0
def get_abandoned_arm() -> AbandonedArm:
    return AbandonedArm(name="0_0", reason="foobar", time=datetime.now())