Skip to content

Commit

Permalink
removing google sheets tools
Browse files Browse the repository at this point in the history
  • Loading branch information
rclarke0 committed Feb 27, 2024
1 parent 6561b8f commit 8e55ce9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 151 deletions.
13 changes: 0 additions & 13 deletions hardware-testing/hardware_testing/abr.json

This file was deleted.

116 changes: 0 additions & 116 deletions hardware-testing/hardware_testing/google_sheets_tool.py

This file was deleted.

33 changes: 11 additions & 22 deletions hardware-testing/hardware_testing/scripts/abr_asair_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
import os





def _get_user_input(lst: List[str], some_string: str) -> str:
variable = input(some_string)
while variable not in lst:
Expand All @@ -24,27 +21,20 @@ def _get_user_input(lst: List[str], some_string: str) -> str:

class _ABRAsairSensor:
def __init__(self, robot: str, duration: int, frequency: int) -> None:
var = _get_user_input(["C", "R"], "Running on computer (C) or robot (R)? ")
if var == "R":
try:
sys.path.insert(0, "/var/lib/jupyter/notebooks")
import google_sheets_tool # type: ignore[import]
credentials_path = "/var/lib/jupyter/notebooks/abr.json"
except ImportError:
from hardware_testing import google_sheets_tool
raise ImportError(
"Run on robot. Make sure google_sheets_tool.py is in jupyter notebook."
)
else:
from hardware_testing import google_sheets_tool
#credentials_path = "/hardware-testing/hardware_testing/abr.json"
credentials_path = "C:/Users/Rhyann Clarke/opentrons/hardware-testing/hardware_testing/abr.json"

try:
sys.path.insert(0, "/var/lib/jupyter/notebooks")
import google_sheets_tool # type: ignore[import]

credentials_path = "/var/lib/jupyter/notebooks/abr.json"
except ImportError:
raise ImportError(
"Run on robot. Make sure google_sheets_tool.py is in jupyter notebook."
)
print(os.path.exists(credentials_path))
test_name = "ABR-Environment-Monitoring"
run_id = data.create_run_id()
file_name = data.create_file_name(test_name, run_id, robot)
sensor = asair_sensor.BuildAsairSensor(False, False)
sensor = asair_sensor.BuildAsairSensor(False, True)
print(sensor)
env_data = sensor.get_reading()
header = [
Expand All @@ -58,7 +48,6 @@ def __init__(self, robot: str, duration: int, frequency: int) -> None:
header_str = ",".join(header) + "\n"
data.append_data_to_file(test_name, run_id, file_name, header_str)
# Upload to google has passed

try:
google_sheet = google_sheets_tool.google_sheet(
credentials_path, "ABR Ambient Conditions", tab_number=0
Expand Down Expand Up @@ -132,7 +121,7 @@ def __init__(self, robot: str, duration: int, frequency: int) -> None:
"PVT1ABR10",
"PVT1ABR11",
"PVT1ABR12",
"ROOM_339",
"ROOM_339",
"Room_340",
] # type: List
robot = _get_user_input(robot_list, "Robot/Room: ")
Expand Down
2 changes: 2 additions & 0 deletions hardware-testing/hardware_testing/scripts/abr_scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"PVT1ABR10",
"PVT1ABR11",
"PVT1ABR12",
"ROOM_339",
"ROOM_340",
]
# Labware per Robot
labware_DVT1ABR4 = [
Expand Down

0 comments on commit 8e55ce9

Please sign in to comment.