Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding ip address and google sheet path as arguments (#14676)
<!-- Thanks for taking the time to open a pull request! Please make sure you've read the "Opening Pull Requests" section of our Contributing Guide: https://github.com/Opentrons/opentrons/blob/edge/CONTRIBUTING.md#opening-pull-requests To ensure your code is reviewed quickly and thoroughly, please fill out the sections below to the best of your ability! --> # Overview Added Google Sheet Path as Arguments and IP import from storage_directory # Test Plan Tested with different google sheet to ensure that new names work. # Changelog **abr_run_logs.py** In get_all_run_logs function added ` try: sys.path.insert(0, storage_directory) import IPs # type: ignore[import] ip_address_list = IPs.ip_address_list except ImportError: raise ImportError("Make sure Ip address file is saved in storage directory.")` **abr_read_logs.py** changed credentials file to be called credentials.json instead of abr.json added google sheet path and tab as arguments. `parser.add_argument( "file_name", metavar="FILE_NAME", type=str, nargs=1, help="Name of google sheet and local csv to save data to.", ) parser.add_argument( "google_sheet_tab_number", metavar="GOOGLE_SHEET_TAB_NUMBER", type=int, nargs=1, help="Google sheet tab number.", ) args = parser.parse_args() storage_directory = args.storage_directory[0] file_name = args.file_name[0] tab_number = args.google_sheet_tab_number[0]` changed local file name to be same as google sheet name `def create_abr_data_sheet(storage_directory: str, file_name: str) -> str: """Creates csv file to log ABR data.""" file_name_csv = file_name + ".csv" sheet_location = os.path.join(storage_directory, file_name_csv)` Changed ip adress file to be read as .json. # Review requests Determine if there is any other lines in this code that make it too abr specific # Risk assessment <!-- Carefully go over your pull request and look at the other parts of the codebase it may affect. Look for the possibility, even if you think it's small, that your change may affect some other part of the system - for instance, changing return tip behavior in protocol may also change the behavior of labware calibration. Identify the other parts of the system your codebase may affect, so that in addition to your own review and testing, other people who may not have the system internalized as much as you can focus their attention and testing there. -->
- Loading branch information