Skip to content

Commit

Permalink
Merge branch 'edge' into app_deck-configuration-to-notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
mjhuff committed Apr 25, 2024
2 parents 2c09d6b + f6099c4 commit a5aee09
Show file tree
Hide file tree
Showing 155 changed files with 59,148 additions and 1,206 deletions.
1 change: 1 addition & 0 deletions .eslintcache

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .github/actions/python/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ runs:
- shell: bash
run: |
if [[ "${OSTYPE}" =~ "linux" ]]; then
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update
sudo apt-get install -y --no-install-recommends libsystemd-dev
fi
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/app-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ jobs:
with:
node-version: '18.19.0'
- name: 'install udev'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
id: 'set-vars'
uses: actions/github-script@v6
Expand Down Expand Up @@ -116,7 +119,10 @@ jobs:
run: make --version
- name: 'install libudev and libsystemd'
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
id: 'set-vars'
uses: actions/github-script@v6
Expand Down Expand Up @@ -247,7 +253,10 @@ jobs:
run: make --version
- name: 'install libudev and libsystemd'
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
id: 'set-vars'
uses: actions/github-script@v6
Expand Down Expand Up @@ -423,7 +432,10 @@ jobs:
with:
node-version: '18.19.0'
- name: 'install udev'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
id: 'set-vars'
uses: actions/github-script@v6
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/components-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ jobs:
with:
node-version: '18.19.0'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -77,7 +80,10 @@ jobs:
with:
node-version: '18.19.0'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -175,7 +181,10 @@ jobs:
node-version: '18.19.0'
registry-url: 'https://registry.npmjs.org'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'setup-js'
run: |
npm config set cache ./.npm-cache
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/g-code-testing-lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ jobs:
with:
fetch-depth: 0
- name: 'install udev'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- uses: 'actions/setup-node@v3'
with:
node-version: '18.19.0'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/js-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ jobs:
const { buildComplexEnvVars } = require(`${process.env.GITHUB_WORKSPACE}/.github/workflows/utils.js`)
buildComplexEnvVars(core, context)
- name: 'install libudev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/ll-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ jobs:
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
git checkout ${{ github.ref }}
- name: 'install libudev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -93,7 +96,10 @@ jobs:
with:
node-version: '18.19.0'
- name: 'install libudev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -133,7 +139,10 @@ jobs:
with:
node-version: '18.19.0'
- name: 'install libudev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -176,7 +185,10 @@ jobs:
with:
node-version: '18.19.0'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
id: 'set-vars'
uses: actions/github-script@v6
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/opentrons-ai-client-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ jobs:
with:
node-version: '18.19.0'
- name: 'install udev'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
id: 'set-vars'
uses: actions/github-script@v6
Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/pd-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ jobs:
with:
node-version: '18.19.0'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -99,7 +102,10 @@ jobs:
node-version: '18.19.0'
- name: 'install udev for usb-detection'
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -135,7 +141,10 @@ jobs:
with:
node-version: '18.19.0'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -176,7 +185,10 @@ jobs:
with:
node-version: '18.19.0'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
id: 'set-vars'
uses: actions/github-script@v6
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/react-api-client-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ jobs:
with:
node-version: '18.19.0'
- name: 'install libudev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/shared-data-test-lint-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ jobs:
fetch-depth: 0
- name: 'install udev for usb-detection'
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- uses: 'actions/setup-node@v1'
with:
node-version: '18.19.0'
Expand Down Expand Up @@ -117,7 +120,10 @@ jobs:
with:
node-version: '18.19.0'
- name: 'install udev'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -159,7 +165,10 @@ jobs:
with:
node-version: '18.19.0'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- uses: 'actions/setup-python@v4'
with:
python-version: '3.10'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/step-generation-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ jobs:
with:
node-version: '18.19.0'
- name: 'install udev for usb-detection'
run: sudo apt-get update && sudo apt-get install libudev-dev
run: |
# WORKAROUND: Remove microsoft debian repo due to https://github.com/microsoft/linux-package-repositories/issues/130. Remove line below after it is resolved
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update && sudo apt-get install libudev-dev
- name: 'cache yarn cache'
uses: actions/cache@v3
with:
Expand Down
11 changes: 8 additions & 3 deletions abr-testing/abr_testing/automation/google_drive_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import webbrowser
import mimetypes
from oauth2client.service_account import ServiceAccountCredentials # type: ignore[import]
import googleapiclient # type: ignore[import]
from googleapiclient.discovery import build
from googleapiclient.http import MediaFileUpload

Expand Down Expand Up @@ -58,7 +59,6 @@ def list_folder(self, delete: Any = False) -> Set[str]:
break
if not file_names:
print("No folders or files found in Google Drive.")
print(f"{len(file_names)} item(s) in Google Drive")
return file_names

def delete_files(self, file_or_folder_id: str) -> None:
Expand Down Expand Up @@ -98,18 +98,22 @@ def upload_missing_files(self, storage_directory: str) -> None:
file for file in os.listdir(storage_directory) if file.endswith(".json")
)
missing_files = local_files_json - set(google_drive_files_json)
print(f"Missing files: {len(missing_files)}")
# Upload missing files.
uploaded_files = []
for file in missing_files:
file_path = os.path.join(storage_directory, file)
uploaded_file_id = google_drive.upload_file(self, file_path)
self.share_permissions(uploaded_file_id)
uploaded_files.append(
{"name": os.path.basename(file_path), "id": uploaded_file_id}
)
try:
self.share_permissions(uploaded_file_id)
except googleapiclient.errors.HttpError:
continue

# Fetch the updated file list after all files are uploaded
files = google_drive.list_folder(self)

file_names = [file for file in files]
for uploaded_file in uploaded_files:
this_name = uploaded_file["name"]
Expand All @@ -121,6 +125,7 @@ def upload_missing_files(self, storage_directory: str) -> None:
print(
f"File '{this_name}' was not found in the list of files after uploading."
)
print(f"{len(files)} item(s) in Google Drive")

def open_folder(self) -> Optional[str]:
"""Open folder in web browser."""
Expand Down
7 changes: 6 additions & 1 deletion abr-testing/abr_testing/automation/google_sheets_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import gspread # type: ignore[import]
import socket
import httplib2
import time as t
from datetime import datetime
from oauth2client.service_account import ServiceAccountCredentials # type: ignore[import]
from typing import Dict, List, Any, Set, Tuple
Expand Down Expand Up @@ -71,6 +72,10 @@ def write_to_row(self, data: List) -> None:
print("UNABLE TO CONNECT TO SERVER!!, CHECK CONNECTION")
except Exception as error:
print(error.__traceback__)
except gspread.exceptions.APIError:
print("Write quotes exceeded. Waiting 30 sec before writing.")
t.sleep(30)
self.worksheet.insert_row(data, index=self.row_index)

def delete_row(self, row_index: int) -> None:
"""Delete Row from google sheet."""
Expand All @@ -94,7 +99,7 @@ def get_column(self, column_number: int) -> Set[str]:
def get_index_row(self) -> int:
"""Check for the next available row to write too."""
row_index = len(self.get_column(1))
print("Row Index: ", row_index)
print(f"Row Index: {row_index} recorded on google sheet.")
return row_index

def update_row_index(self) -> None:
Expand Down
Loading

0 comments on commit a5aee09

Please sign in to comment.