Skip to content

Commit

Permalink
Merge branch 'add-abr-protocols' of https://github.com/Opentrons/open…
Browse files Browse the repository at this point in the history
…trons into add-abr-protocols
  • Loading branch information
rclarke0 committed Nov 7, 2024
2 parents 1bdf055 + 3890d70 commit defc508
Show file tree
Hide file tree
Showing 757 changed files with 67,458 additions and 4,905 deletions.
35 changes: 20 additions & 15 deletions .github/workflows/app-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -318,19 +318,28 @@ jobs:
if: startsWith(matrix.os, 'windows') && contains(needs.determine-build-type.outputs.type, 'release')
shell: cmd
env:
SM_HOST: ${{ secrets.SM_HOST }}
SM_HOST: ${{ secrets.SM_HOST_V2 }}
SM_CLIENT_CERT_FILE: "D:\\Certificate_pkcs12.p12"
SM_CLIENT_CERT_PASSWORD: ${{secrets.SM_CLIENT_CERT_PASSWORD}}
SM_API_KEY: ${{secrets.SM_API_KEY}}
SM_CLIENT_CERT_PASSWORD: ${{secrets.SM_CLIENT_CERT_PASSWORD_V2}}
SM_API_KEY: ${{secrets.SM_API_KEY_V2}}
run: |
curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/Keylockertools-windows-x64.msi/download -H "x-api-key:${{secrets.SM_API_KEY}}" -o Keylockertools-windows-x64.msi
curl -X GET https://one.digicert.com/signingmanager/api-ui/v1/releases/Keylockertools-windows-x64.msi/download -H "x-api-key:${{secrets.SM_API_KEY_V2}}" -o Keylockertools-windows-x64.msi
msiexec /i Keylockertools-windows-x64.msi /quiet /qn
smksp_registrar.exe list
smctl.exe keypair ls
C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user
smksp_cert_sync.exe
smctl.exe healthcheck --all
# Do the frontend dist bundle
- name: 'bundle ${{matrix.variant}} frontend'
env:
OT_APP_MIXPANEL_ID: ${{ secrets.OT_APP_MIXPANEL_ID }}
OT_APP_INTERCOM_ID: ${{ secrets.OT_APP_INTERCOM_ID }}
OPENTRONS_PROJECT: ${{ steps.project.outputs.project }}
run: |
make -C app dist
# build the desktop app and deploy it
- name: 'build ${{matrix.variant}} app for ${{ matrix.os }}'
if: matrix.target == 'desktop'
Expand All @@ -339,18 +348,14 @@ jobs:
OT_APP_MIXPANEL_ID: ${{ secrets.OT_APP_MIXPANEL_ID }}
OT_APP_INTERCOM_ID: ${{ secrets.OT_APP_INTERCOM_ID }}
WINDOWS_SIGN: ${{ format('{0}', contains(needs.determine-build-type.outputs.type, 'release')) }}
SM_HOST: ${{secrets.SM_HOST}}
SM_CLIENT_CERT_FILE: "D:\\Certificate_pkcs12.p12"
SM_CLIENT_CERT_PASSWORD: ${{secrets.SM_CLIENT_CERT_PASSWORD}}
SM_API_KEY: ${{secrets.SM_API_KEY}}
SM_CODE_SIGNING_CERT_SHA1_HASH: ${{secrets.SM_CODE_SIGNING_CERT_SHA1_HASH}}
SM_KEYPAIR_ALIAS: ${{secrets.SM_KEYPAIR_ALIAS}}
SM_CODE_SIGNING_CERT_SHA1_HASH: ${{secrets.SM_CODE_SIGNING_CERT_SHA1_HASH_V2}}
SM_KEYPAIR_ALIAS: ${{secrets.SM_KEYPAIR_ALIAS_V2}}
WINDOWS_CSC_FILEPATH: "D:\\opentrons_labworks_inc.crt"
CSC_LINK: ${{ secrets.OT_APP_CSC_MACOS }}
CSC_KEY_PASSWORD: ${{ secrets.OT_APP_CSC_KEY_MACOS }}
APPLE_ID: ${{ secrets.OT_APP_APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.OT_APP_APPLE_ID_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.OT_APP_APPLE_TEAM_ID }}
CSC_LINK: ${{ secrets.OT_APP_CSC_MACOS_V2 }}
CSC_KEY_PASSWORD: ${{ secrets.OT_APP_CSC_KEY_MACOS_V2 }}
APPLE_ID: ${{ secrets.OT_APP_APPLE_ID_V2 }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.OT_APP_APPLE_ID_PASSWORD_V2 }}
APPLE_TEAM_ID: ${{ secrets.OT_APP_APPLE_TEAM_ID_V2 }}
HOST_PYTHON: python
OPENTRONS_PROJECT: ${{ steps.project.outputs.project }}
OT_APP_DEPLOY_BUCKET: ${{ steps.project.outputs.bucket }}
Expand Down
86 changes: 43 additions & 43 deletions .github/workflows/pd-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,49 +79,49 @@ jobs:
files: ./coverage/lcov.info
flags: protocol-designer

e2e-test:
name: 'pd e2e tests'
needs: ['js-unit-test']
timeout-minutes: 30
strategy:
matrix:
os: ['ubuntu-22.04']
runs-on: '${{ matrix.os }}'
steps:
- uses: 'actions/checkout@v3'
with:
fetch-depth: 0
# https://github.com/actions/checkout/issues/290
- name: 'Fix actions/checkout odd handling of tags'
if: startsWith(github.ref, 'refs/tags')
run: |
git fetch -f origin ${{ github.ref }}:${{ github.ref }}
git checkout ${{ github.ref }}
- uses: 'actions/setup-node@v3'
with:
node-version: '18.19.0'
- name: 'install udev for usb-detection'
if: startsWith(matrix.os, 'ubuntu')
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:
path: |
${{ github.workspace }}/.yarn-cache
${{ github.workspace }}/.npm-cache
key: js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-
- name: 'setup-js'
run: |
npm config set cache ./.npm-cache
yarn config set cache-folder ./.yarn-cache
make setup-js
- name: 'test-e2e'
run: make -C protocol-designer test-e2e
# e2e-test:
# name: 'pd e2e tests'
# needs: ['js-unit-test']
# timeout-minutes: 30
# strategy:
# matrix:
# os: ['ubuntu-22.04']
# runs-on: '${{ matrix.os }}'
# steps:
# - uses: 'actions/checkout@v3'
# with:
# fetch-depth: 0
# # https://github.com/actions/checkout/issues/290
# - name: 'Fix actions/checkout odd handling of tags'
# if: startsWith(github.ref, 'refs/tags')
# run: |
# git fetch -f origin ${{ github.ref }}:${{ github.ref }}
# git checkout ${{ github.ref }}
# - uses: 'actions/setup-node@v3'
# with:
# node-version: '18.19.0'
# - name: 'install udev for usb-detection'
# if: startsWith(matrix.os, 'ubuntu')
# 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:
# path: |
# ${{ github.workspace }}/.yarn-cache
# ${{ github.workspace }}/.npm-cache
# key: js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
# restore-keys: |
# js-${{ secrets.GH_CACHE_VERSION }}-${{ runner.os }}-yarn-
# - name: 'setup-js'
# run: |
# npm config set cache ./.npm-cache
# yarn config set cache-folder ./.yarn-cache
# make setup-js
# - name: 'test-e2e'
# run: make -C protocol-designer test-e2e
build-pd:
name: 'build protocol designer artifact'
needs: ['js-unit-test']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def module_helper(
y = one_module["moduleOffset"]["offset"].get("y", "")
z = one_module["moduleOffset"]["offset"].get("z", "")
except KeyError:
pass
continue
if mod_serial in module_sheet_serials and modified in module_modify_dates:
continue
module_row = (
Expand Down
15 changes: 10 additions & 5 deletions abr-testing/abr_testing/data_collection/read_robot_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def identify_labware_ids(
file_results: Dict[str, Any], labware_name: Optional[str]
) -> List[str]:
"""Determine what type of labware is being picked up."""
list_of_labware_ids: List[str] = []
if labware_name:
labwares = file_results.get("labware", "")
list_of_labware_ids = []
Expand Down Expand Up @@ -341,8 +342,9 @@ def hs_commands(file_results: Dict[str, Any]) -> Dict[str, float]:
)
if temp_time is not None and deactivate_time is None:
# If heater shaker module is not deactivated, protocol completedAt time stamp used.
default = commandData[len(commandData) - 1].get("completedAt")
protocol_end = datetime.strptime(
file_results.get("completedAt", ""), "%Y-%m-%dT%H:%M:%S.%f%z"
file_results.get("completedAt", default), "%Y-%m-%dT%H:%M:%S.%f%z"
)
temp_duration = (protocol_end - temp_time).total_seconds()
hs_temps[hs_temp] = hs_temps.get(hs_temp, 0.0) + temp_duration
Expand Down Expand Up @@ -389,8 +391,9 @@ def temperature_module_commands(file_results: Dict[str, Any]) -> Dict[str, Any]:
tm_temps[tm_temp] = tm_temps.get(tm_temp, 0.0) + temp_duration
if temp_time is not None and deactivate_time is None:
# If temperature module is not deactivated, protocol completedAt time stamp used.
default = commandData[len(commandData) - 1].get("completedAt")
protocol_end = datetime.strptime(
file_results.get("completedAt", ""), "%Y-%m-%dT%H:%M:%S.%f%z"
file_results.get("completedAt", default), "%Y-%m-%dT%H:%M:%S.%f%z"
)
temp_duration = (protocol_end - temp_time).total_seconds()
tm_temps[tm_temp] = tm_temps.get(tm_temp, 0.0) + temp_duration
Expand Down Expand Up @@ -473,15 +476,17 @@ def thermocycler_commands(file_results: Dict[str, Any]) -> Dict[str, float]:
block_temps[block_temp] = block_temps.get(block_temp, 0.0) + block_time
if block_on_time is not None and block_off_time is None:
# If thermocycler block not deactivated protocol completedAt time stamp used
default = commandData[len(commandData) - 1].get("completedAt")
protocol_end = datetime.strptime(
file_results.get("completedAt", ""), "%Y-%m-%dT%H:%M:%S.%f%z"
file_results.get("completedAt", default), "%Y-%m-%dT%H:%M:%S.%f%z"
)
temp_duration = (protocol_end - block_on_time).total_seconds()
block_temps[block_temp] = block_temps.get(block_temp, 0.0) + temp_duration

if lid_on_time is not None and lid_off_time is None:
# If thermocycler lid not deactivated protocol completedAt time stamp used
default = commandData[len(commandData) - 1].get("completedAt")
protocol_end = datetime.strptime(
file_results.get("completedAt", ""), "%Y-%m-%dT%H:%M:%S.%f%z"
file_results.get("completedAt", default), "%Y-%m-%dT%H:%M:%S.%f%z"
)
temp_duration = (protocol_end - lid_on_time).total_seconds()
lid_temps[lid_temp] = block_temps.get(lid_temp, 0.0) + temp_duration
Expand Down
8 changes: 4 additions & 4 deletions abr-testing/abr_testing/protocol_simulation/abr_sim_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from pathlib import Path


def run(file_to_simulate: str) -> None:
def run(file_to_simulate: Path) -> None:
"""Simulate protocol and raise errors."""
protocol_name = Path(file_to_simulate).stem
protocol_name = file_to_simulate.stem
try:
simulation_metrics.main(file_to_simulate, False)
except Exception:
Expand All @@ -29,6 +29,6 @@ def run(file_to_simulate: str) -> None:
if file.endswith(".py"): # If it's a Python file
if file in exclude:
continue
file_path = os.path.join(root, file)
print(f"Simulating protocol: {file_path}")
file_path = Path(os.path.join(root, file))
print(f"Simulating protocol: {file_path.stem}")
run(file_path)
Loading

0 comments on commit defc508

Please sign in to comment.