Skip to content

Commit

Permalink
lint round 3
Browse files Browse the repository at this point in the history
  • Loading branch information
rclarke0 committed Feb 27, 2024
1 parent a0826c5 commit d2fbca5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions hardware-testing/hardware_testing/abr_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Download run logs from ABR robots."""
9 changes: 5 additions & 4 deletions hardware-testing/hardware_testing/abr_tools/abr_run_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@


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.
"""
"""Read all files in storage directory, extracts run id, adds to set."""
os.makedirs(storage_directory, exist_ok=True)
list_of_files = os.listdir(storage_directory)
run_ids = set()
Expand Down Expand Up @@ -109,7 +107,9 @@ 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.
"""GET ALL RUN LOGS.
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.
"""
Expand All @@ -125,6 +125,7 @@ def get_all_run_logs(storage_directory: str) -> None:


if __name__ == "__main__":
"""Get run logs."""
parser = argparse.ArgumentParser(description="Pulls run logs from ABR robots.")
parser.add_argument(
"storage_directory",
Expand Down

0 comments on commit d2fbca5

Please sign in to comment.