Skip to content

Commit

Permalink
lint fixes round 2
Browse files Browse the repository at this point in the history
  • Loading branch information
rclarke0 committed Feb 27, 2024
1 parent 022dd19 commit a0826c5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions hardware-testing/hardware_testing/abr_tools/abr_run_logs.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
"""ABR Run Log Pull."""
from .abr_robots import ABR_IPS
from typing import Set, Dict, Any

import argparse
import os
import json
import traceback
import requests
from typing import Set, Dict, Any


def get_run_ids_from_storage(storage_directory: str) -> Set[str]:
"""Read all files in long term storage directory and read run id.
Add run id to a set. Return run id set."""
Add run id to a set. Return run id set.
"""
os.makedirs(storage_directory, exist_ok=True)
list_of_files = os.listdir(storage_directory)
run_ids = set()
Expand Down Expand Up @@ -109,7 +111,8 @@ def save_runs(runs_to_save: Set[str], ip: str, storage_directory: str) -> None:
def get_all_run_logs(storage_directory: str) -> None:
"""Connect to each ABR robot to read run log data.
Read each robot's list of unique run log IDs and compare them to all IDs in storage.
Any ID that is not in storage, download the run log and put it in storage."""
Any ID that is not in storage, download the run log and put it in storage.
"""
runs_from_storage = get_run_ids_from_storage(storage_directory)
for ip in ABR_IPS:
try:
Expand Down

0 comments on commit a0826c5

Please sign in to comment.