-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'edge' into abr-plate-reader-tart
- Loading branch information
Showing
329 changed files
with
2,185 additions
and
865 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
"""Push one or more folders to one or more robots.""" | ||
import subprocess | ||
import multiprocessing | ||
import json | ||
|
||
global folders | ||
# Opentrons folders that can be pushed to robot | ||
folders = [ | ||
"abr-testing", | ||
"hardware-testing", | ||
"abr-testing + hardware-testing", | ||
"other", | ||
] | ||
|
||
|
||
def push_subroutine(cmd: str) -> None: | ||
"""Pushes specified folder to specified robot.""" | ||
try: | ||
subprocess.run(cmd) | ||
except Exception: | ||
print("failed to push folder") | ||
raise | ||
|
||
|
||
def main(folder_to_push: str, robot_to_push: str) -> int: | ||
"""Main process!""" | ||
cmd = "make -C {folder} push-ot3 host={ip}" | ||
robot_ip_path = "" | ||
push_cmd = "" | ||
folder_int = int(folder_to_push) | ||
if folders[folder_int].lower() == "abr-testing + hardware-testing": | ||
if robot_to_push.lower() == "all": | ||
robot_ip_path = input("Path to robot ips: ") | ||
with open(robot_ip_path, "r") as ip_file: | ||
robot_json = json.load(ip_file) | ||
robot_ips_dict = robot_json.get("ip_address_list") | ||
robot_ips = list(robot_ips_dict.keys()) | ||
ip_file.close() | ||
else: | ||
robot_ips = [robot_to_push] | ||
for folder_name in folders[:-2]: | ||
# Push abr-testing and hardware-testing folders to all robots | ||
for robot in robot_ips: | ||
print_proc = multiprocessing.Process( | ||
target=print, args=(f"Pushing {folder_name} to {robot}!\n\n",) | ||
) | ||
print_proc.start() | ||
print_proc.join() | ||
push_cmd = cmd.format(folder=folder_name, ip=robot) | ||
process = multiprocessing.Process( | ||
target=push_subroutine, args=(push_cmd,) | ||
) | ||
process.start() | ||
process.join() | ||
print_proc = multiprocessing.Process(target=print, args=("Done!\n\n",)) | ||
print_proc.start() | ||
print_proc.join() | ||
else: | ||
|
||
if folder_int == (len(folders) - 1): | ||
folder_name = input("Which folder? ") | ||
else: | ||
folder_name = folders[folder_int] | ||
if robot_to_push.lower() == "all": | ||
robot_ip_path = input("Path to robot ips: ") | ||
with open(robot_ip_path, "r") as ip_file: | ||
robot_json = json.load(ip_file) | ||
robot_ips = robot_json.get("ip_address_list") | ||
ip_file.close() | ||
else: | ||
robot_ips = [robot_to_push] | ||
|
||
# Push folder to robots | ||
for robot in robot_ips: | ||
print_proc = multiprocessing.Process( | ||
target=print, args=(f"Pushing {folder_name} to {robot}!\n\n",) | ||
) | ||
print_proc.start() | ||
print_proc.join() | ||
push_cmd = cmd.format(folder=folder_name, ip=robot) | ||
process = multiprocessing.Process(target=push_subroutine, args=(push_cmd,)) | ||
process.start() | ||
process.join() | ||
print_proc = multiprocessing.Process(target=print, args=("Done!\n\n",)) | ||
print_proc.start() | ||
print_proc.join() | ||
return 0 | ||
|
||
|
||
if __name__ == "__main__": | ||
for i, folder in enumerate(folders): | ||
print(f"{i}) {folder}") | ||
folder_to_push = input("Please Select a Folder to Push: ") | ||
robot_to_push = input("Type in robots ip (type all for all): ") | ||
print(main(folder_to_push, robot_to_push)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16668,6 +16668,7 @@ | |
} | ||
} | ||
], | ||
"liquidClasses": [], | ||
"liquids": [], | ||
"metadata": { | ||
"apiLevel": "2.11" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4919,6 +4919,7 @@ | |
} | ||
} | ||
], | ||
"liquidClasses": [], | ||
"liquids": [], | ||
"metadata": { | ||
"apiLevel": "2.7", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11824,6 +11824,7 @@ | |
} | ||
} | ||
], | ||
"liquidClasses": [], | ||
"liquids": [], | ||
"metadata": { | ||
"author": "<[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11452,6 +11452,7 @@ | |
} | ||
} | ||
], | ||
"liquidClasses": [], | ||
"liquids": [ | ||
{ | ||
"description": "High Quality H₂O", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2917,6 +2917,7 @@ | |
} | ||
} | ||
], | ||
"liquidClasses": [], | ||
"liquids": [ | ||
{ | ||
"description": "H₂O", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3113,6 +3113,7 @@ | |
} | ||
} | ||
], | ||
"liquidClasses": [], | ||
"liquids": [], | ||
"metadata": { | ||
"author": "Opentrons Engineering <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9569,6 +9569,7 @@ | |
} | ||
} | ||
], | ||
"liquidClasses": [], | ||
"liquids": [], | ||
"metadata": { | ||
"author": "Opentrons Engineering <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66156,6 +66156,7 @@ | |
} | ||
} | ||
], | ||
"liquidClasses": [], | ||
"liquids": [], | ||
"metadata": { | ||
"author": "Opentrons <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1481,6 +1481,7 @@ | |
} | ||
} | ||
], | ||
"liquidClasses": [], | ||
"liquids": [], | ||
"metadata": { | ||
"description": "oooo", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -154,6 +154,7 @@ | |
} | ||
} | ||
], | ||
"liquidClasses": [], | ||
"liquids": [], | ||
"metadata": {}, | ||
"modules": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49707,6 +49707,7 @@ | |
} | ||
} | ||
], | ||
"liquidClasses": [], | ||
"liquids": [ | ||
{ | ||
"description": "CleanupBead Beads", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1481,6 +1481,7 @@ | |
} | ||
} | ||
], | ||
"liquidClasses": [], | ||
"liquids": [], | ||
"metadata": { | ||
"description": "oooo", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17072,6 +17072,7 @@ | |
} | ||
} | ||
], | ||
"liquidClasses": [], | ||
"liquids": [ | ||
{ | ||
"description": "H₂O", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9569,6 +9569,7 @@ | |
} | ||
} | ||
], | ||
"liquidClasses": [], | ||
"liquids": [], | ||
"metadata": { | ||
"author": "Opentrons Engineering <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49392,6 +49392,7 @@ | |
} | ||
} | ||
], | ||
"liquidClasses": [], | ||
"liquids": [ | ||
{ | ||
"description": "Beads", | ||
|
Oops, something went wrong.