Skip to content

Commit

Permalink
Merge branch 'edge' into pick_up_tip_testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos-fernandez committed Feb 7, 2024
2 parents 99392de + 00ccc2c commit 9a4c8dc
Show file tree
Hide file tree
Showing 2,050 changed files with 781,105 additions and 70,762 deletions.
1 change: 0 additions & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
ignore:
- '**/node_modules'
- 'protocol-library-kludge'
- 'webpack-config'
- 'hardware-testing'
- '**/*.md'
Expand Down
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
**/build/**
**/venv/**
.opentrons_config
**/tsconfig*.json

# prettier
**/package.json
Expand All @@ -25,9 +26,10 @@ storybook-static
api/**
update-server/**
robot-server/**
notify-server/**
shared-data/python/**
hardware-testing/**

# app-testing don't format the json protocols
app-testing/files
# app testing don't format the snapshots
app-testing/tests/__snapshots__
41 changes: 38 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ module.exports = {
project: require('path').join(__dirname, 'tsconfig-eslint.json'),
},

extends: ['standard-with-typescript', 'plugin:react/recommended', 'prettier'],
extends: [
'standard-with-typescript',
'plugin:react/recommended',
'prettier',
'plugin:json/recommended',
],

plugins: ['react', 'react-hooks', 'json', 'jest'],
plugins: ['react', 'react-hooks', 'json', 'jest', 'testing-library'],

rules: {
camelcase: 'off',
Expand Down Expand Up @@ -50,7 +55,15 @@ module.exports = {
overrides: [
{
files: ['**/*.js'],
parser: '@babel/eslint-parser',
extends: ['plugin:@typescript-eslint/disable-type-checked'],
parserOptions: {
project: require('path').join(__dirname, 'tsconfig-eslint.json'),
},
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/explicit-function-return-type': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
},
},
{
// TODO(mc, 2021-03-18): remove to default these rules back to errors
Expand All @@ -65,6 +78,17 @@ module.exports = {
'@typescript-eslint/no-floating-promises': 'warn',
'@typescript-eslint/no-unnecessary-type-assertion': 'warn',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn',
'@typescript-eslint/consistent-type-imports': 'warn',
'@typescript-eslint/consistent-indexed-object-style': 'warn',
'@typescript-eslint/no-confusing-void-expression': 'warn',
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/non-nullable-type-assertion-style': 'warn',
'@typescript-eslint/await-thenable': 'warn',
'@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/unbound-method': 'warn',
'@typescript-eslint/consistent-generic-constructors': 'warn',
'@typescript-eslint/no-misused-promises': 'warn',
},
},
{
Expand All @@ -88,11 +112,22 @@ module.exports = {
'@typescript-eslint/consistent-type-assertions': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-confusing-void-expression': 'warn',
'node/handle-callback-err': 'off',
// TODO(mc, 2021-01-29): fix these and remove warning overrides
'jest/no-deprecated-functions': 'warn',
'jest/valid-title': 'warn',
'jest/no-conditional-expect': 'warn',
'jest/no-alias-methods': 'warn',
'jest/valid-describe-callback': 'warn',
},
},
{
files: ['**/__tests__/**test.tsx'],
env: { jest: true },
extends: ['plugin:testing-library/react'],
rules: {
'testing-library/prefer-screen-queries': 'warn',
},
},
{
Expand Down
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
/protocol-designer @Opentrons/app-and-uis
/labware-designer @Opentrons/app-and-uis
/labware-library @Opentrons/app-and-uis
/protocol-library-kludge @Opentrons/app-and-uis
/update-server @Opentrons/robot-svcs
/discovery-client @Opentrons/robot-svcs @Opentrons/app-and-uis
/shared-data/pipette @Opentrons/embedded-sw
Expand All @@ -24,6 +23,8 @@
# subprojects by language - some subprojects are shared by teams but united by a
# language community (including makefiles and config) so mark them appropriately
/app @Opentrons/js
/api-client @Opentrons/js
/react-api-client @Opentrons/js
/app-shell @Opentrons/js
/components @Opentrons/js
/api @Opentrons/py
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/python/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ runs:
- shell: bash
run: |
npm install --global [email protected]
$OT_PYTHON -m pip install pipenv==2021.5.29
$OT_PYTHON -m pip install pipenv==2023.11.15
- shell: bash
run: 'make -C ${{ inputs.project }} setup'
2 changes: 1 addition & 1 deletion .github/actions/webstack/deploy-to-sandbox/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ runs:
steps:
- shell: bash
run: |
aws s3 sync ${{ inputs.distPath }} s3://sandbox.${{ inputs.domain }}/${{ inputs.destPrefix }} --acl=public-read
aws s3 sync ${{ inputs.distPath }} s3://sandbox.${{ inputs.domain }}/${{ inputs.destPrefix }}
72 changes: 72 additions & 0 deletions .github/workflows/analyses-snapshot-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Analyses Snapshot Test

on:
workflow_dispatch:
inputs:
TARGET:
description: 'Target branch or tag'
required: true
default: 'edge'
TEST_SOURCE:
description: 'Target for the test code'
required: true
default: 'edge'
schedule:
- cron: '26 7 * * *' # 7:26 AM UTC

jobs:
build-and-test:
timeout-minutes: 15
runs-on: ubuntu-latest
env:
TARGET: ${{ github.event.inputs.TARGET || 'edge' }}
TEST_SOURCE: ${{ github.event.inputs.TEST_SOURCE || 'edge' }}

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ env.TEST_SOURCE }}

- name: Docker Build
working-directory: app-testing
run: make build-opentrons-analysis

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pipenv'
cache-dependency-path: app-testing/Pipfile.lock

- name: Setup Python Dependencies
working-directory: app-testing
run: make setup

- name: Run Test
id: run_test
working-directory: app-testing
run: make snapshot-test

- name: Upload Report
if: '!cancelled()'
uses: actions/upload-artifact@v4
with:
name: test-report
path: app-testing/results/

- name: Handle Test Failure
if: failure()
working-directory: app-testing
run: make snapshot-test-update

- name: Create Snapshot update Request
if: failure()
uses: peter-evans/create-pull-request@v5
with:
commit-message: 'fix(app-testing): snapshot failure capture'
title: 'Evaluate Analyses Snapshot Update ${{ env.TARGET }}'
body: 'This PR is an automated snapshot update request. Please review the changes and merge if they are acceptable or find you bug and fix it.'
branch: 'app-testing/${{ env.TARGET }}-from-${{ env.TEST_SOURCE}}'
base: ${{ env.TEST_SOURCE}}

16 changes: 6 additions & 10 deletions .github/workflows/api-test-lint-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ jobs:
fetch-depth: 0
- uses: 'actions/setup-node@v3'
with:
node-version: '16'
node-version: '18.19.0'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
python-version: '3.10'

- uses: './.github/actions/python/setup'
with:
Expand All @@ -75,17 +75,13 @@ jobs:
os: ['windows-2022', 'ubuntu-22.04', 'macos-latest']
# TODO(mc, 2022-02-24): expand this matrix to 3.8 and 3.9,
# preferably in a nightly cronjob on edge or something
python: ['3.7', '3.10']
python: ['3.10']
with-ot-hardware: ['true', 'false']
exclude:
- os: 'windows-2022'
with-ot-hardware: 'true'
- os: 'macos-latest'
with-ot-hardware: 'true'
- os: 'macos-latest'
python: '3.10'
- python: '3.10'
with-ot-hardware: 'true'
runs-on: '${{ matrix.os }}'
steps:
- uses: 'actions/checkout@v3'
Expand All @@ -99,7 +95,7 @@ jobs:
git checkout ${{ github.ref }}
- uses: 'actions/setup-node@v3'
with:
node-version: '16'
node-version: '18.19.0'
- uses: 'actions/setup-python@v4'
with:
python-version: ${{ matrix.python }}
Expand Down Expand Up @@ -149,10 +145,10 @@ jobs:
git checkout ${{ github.ref }}
- uses: 'actions/setup-node@v3'
with:
node-version: '16'
node-version: '18.19.0'
- uses: 'actions/setup-python@v4'
with:
python-version: '3.7'
python-version: '3.10'
- name: 'set complex environment variables'
uses: actions/github-script@v6
with:
Expand Down
8 changes: 4 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,7 @@ jobs:
- uses: 'actions/checkout@v3'
- uses: 'actions/setup-node@v3'
with:
node-version: '16'
node-version: '18.19.0'
- name: 'install udev'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
git checkout ${{ github.ref }}
- uses: 'actions/setup-node@v3'
with:
node-version: '16'
node-version: '18.19.0'
- uses: actions/setup-python@v4
with:
python-version: '3.10'
Expand Down Expand Up @@ -243,7 +243,7 @@ jobs:
git checkout ${{ github.ref }}
- uses: 'actions/setup-node@v3'
with:
node-version: '16'
node-version: '18.19.0'
- uses: actions/setup-python@v4
with:
python-version: '3.10'
Expand Down Expand Up @@ -427,7 +427,7 @@ jobs:
git checkout ${{ github.ref }}
- uses: 'actions/setup-node@v3'
with:
node-version: '16'
node-version: '18.19.0'
- name: 'install udev'
run: sudo apt-get update && sudo apt-get install libudev-dev
- name: 'set complex environment variables'
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/app-testing-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,18 @@ jobs:
lint:
name: 'app-testing lint'
timeout-minutes: 5
runs-on: 'ubuntu-22.04'
runs-on: 'ubuntu-latest'
steps:
- name: Checkout opentrons repo
uses: 'actions/checkout@v3'
uses: 'actions/checkout@v4'

- name: Setup Python
uses: 'actions/setup-python@v4'
uses: 'actions/setup-python@v5'
with:
python-version: '3.11'
python-version: '3.12'
cache: 'pipenv'
cache-dependency-path: app-testing/Pipfile.lock
- name: Install Pipenv
run: pip install -U pipenv
- name: Pipenv Install
- name: Setup
id: install
working-directory: ./app-testing
run: make setup
Expand Down
Loading

0 comments on commit 9a4c8dc

Please sign in to comment.