Skip to content

Commit

Permalink
Merge branch 'edge' into 7.3.1-shapshot-testing-2.19-protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
y3rsh committed Jun 26, 2024
2 parents ba813e2 + 1ecc05b commit a2096b8
Show file tree
Hide file tree
Showing 1,630 changed files with 103,259 additions and 28,292 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ 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-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',
Expand All @@ -127,11 +125,13 @@ module.exports = {
'**/__fixtures__/**.@(js|ts|tsx)',
'**/fixtures/**.@(js|ts|tsx)',
'scripts/*.@(js|ts|tsx)',
'**/**test.@(js|ts|tsx)',
],
rules: {
'@typescript-eslint/consistent-type-assertions': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-confusing-void-expression': 'warn',
'node/handle-callback-err': 'off',
},
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/analyses-snapshot-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,23 @@ on:
default: 'edge'
schedule:
- cron: '26 7 * * *' # 7:26 AM UTC
pull_request:
paths:
- 'api/**'
- 'shared-data/**/*'
- '!shared-data/js/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

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' }}
TARGET: ${{ github.event.inputs.TARGET || github.head_ref || 'edge' }}
TEST_SOURCE: ${{ github.event.inputs.TEST_SOURCE || github.head_ref || 'edge' }}

steps:
- name: Checkout Repository
Expand Down Expand Up @@ -61,6 +70,7 @@ jobs:
run: make snapshot-test-update

- name: Create Snapshot update Request
id: create-pull-request
if: failure()
uses: peter-evans/create-pull-request@v5
with:
Expand All @@ -70,3 +80,15 @@ jobs:
branch: 'app-testing/${{ env.TARGET }}-from-${{ env.TEST_SOURCE}}'
base: ${{ env.TEST_SOURCE}}

- name: Comment on PR
if: failure() && github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const message = 'A PR has been opened to address analyses snapshot changes. Please review the changes here: https://github.com/${{ github.repository }}/pull/${{ steps.create-pull-request.outputs.pull-request-number }}';
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: message
});
23 changes: 17 additions & 6 deletions .github/workflows/components-test-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ on:
paths:
- 'Makefile'
- 'components/**'
- 'app/**/*.stories.@(js|jsx|ts|tsx)'
- 'app/**/*.stories.*'
- 'app/src/atoms/**/*'
- 'app/src/molecules/**/*'
- 'package.json'
- '.github/workflows/components-test-build-deploy.yaml'
push:
paths:
- 'components/**'
- 'app/**/*.stories.@(js|jsx|ts|tsx)'
- 'app/**/*.stories.*'
- 'app/src/atoms/**/*'
- 'app/src/molecules/**/*'
- 'package.json'
- '.github/workflows/components-test-build-deploy.yaml'
branches:
Expand Down Expand Up @@ -114,15 +118,18 @@ jobs:
steps:
- id: determine-build-type
run: |
echo "Determining build type for event ${{github.event_type}} and ref ${{github.ref}}"
if [ "${{ format('{0}', github.ref == 'refs/heads/edge') }}" = "true" ] ; then
echo "storybook s3 builds for edge"
echo "Determining build type for event ${{github.event_name}} and ref ${{github.ref}}"
if [ "${{ format('{0}', github.event_name == 'pull_request') }}" = "true" ] ; then
echo "No builds for pull requests"
echo 'type=none' >> $GITHUB_OUTPUT
elif [ "${{ format('{0}', startsWith(github.ref, 'refs/heads/')) }}" = "true" ] ; then
echo "storybook s3 builds for branch ${{ github.ref_name }}"
echo 'type=storybook' >> $GITHUB_OUTPUT
elif [ "${{ format('{0}', startsWith(github.ref, 'refs/tags/components')) }}" = "true" ] ; then
echo "publish builds for components tags"
echo 'type=publish' >> $GITHUB_OUTPUT
else
echo "No build for ref ${{github.ref}} and event ${{github.event_type}}"
echo "No build for ref ${{github.ref}} and event ${{github.event_name}}"
echo 'type=none' >> $GITHUB_OUTPUT
fi
Expand Down Expand Up @@ -162,6 +169,10 @@ jobs:
AWS_DEFAULT_REGION: us-east-2
run: |
aws s3 sync ./dist s3://opentrons-components/${{ env.OT_BRANCH}} --acl public-read
- name: 'Set generated URL'
run: |
echo 'Created component storybook for [${{ env.OT_BRANCH }}](https://s3-us-west-2.amazonaws.com/opentrons-components/${{ env.OT_BRANCH }}/index.html?path=/)' >> $GITHUB_STEP_SUMMARY
echo 'Created component storybook for https://s3-us-west-2.amazonaws.com/opentrons-components/${{ env.OT_BRANCH }}/index.html?path=/'
publish-components:
name: 'publish components package to npm'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/js-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ jobs:
make setup-js
# Use the if to run all the lint checks even of some fail
shell: bash
- name: 'lint js'
if: always() && steps.setup-js.outcome == 'success'
run: make lint-js
- name: 'typechecks'
if: always() && steps.setup-js.outcome == 'success'
run: make check-js
- name: 'lint js'
if: always() && steps.setup-js.outcome == 'success'
run: make lint-js
- name: 'circular deps'
if: always() && steps.setup-js.outcome == 'success'
run: make circular-dependencies-js
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ update-server/LICENSE
shared-data/python/LICENSE
shared-data/LICENSE
robot-server/LICENSE
performance-metrics/LICENSE

# typescript incremental files
*.tsbuildinfo
Expand All @@ -160,4 +161,5 @@ opentrons-robot-app.tar.gz
# asdf versions file
.tool-versions
mock_dir
.npm-cache/
.eslintcache
32 changes: 31 additions & 1 deletion .storybook/preview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ import { I18nextProvider } from 'react-i18next'
import { GlobalStyle } from '../app/src/atoms/GlobalStyle'
import { i18n } from '../app/src/i18n'

global.APP_SHELL_REMOTE = {
ipcRenderer: {
on: (topic, cb) => {},
invoke: (callname, args) => {},
send: (message, payload) => {}
},
}
global._PKG_VERSION_ = '0.0.0-storybook'

export const customViewports = {
onDeviceDisplay: {
name: 'Touchscreen',
Expand All @@ -12,6 +21,27 @@ export const customViewports = {
height: '600px',
},
},
desktopMinWidth: {
// retains a 4:3 aspect ratio... minHeight is not set so the user
// could drag the app up to a thin strip, but that's not terribly
// useful for viewing designs
name: 'Desktop Minimum Width',
type: 'desktop',
styles: {
width: '600px',
height: '450px'
}
},
desktopSmall: {
// A size typically used in figma app backgrounds, useful for viewing
// larger components in context
name: 'Desktop Typical Small',
type: 'desktop',
styles: {
width: '1024px',
height: '700px'
}
}
}

export const parameters = {
Expand All @@ -29,7 +59,7 @@ export const parameters = {
export const decorators = [
Story => (
<I18nextProvider i18n={i18n}>
<GlobalStyle isOnDevice={true} />
<GlobalStyle />
<Story />
</I18nextProvider>
),
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ lint-js: lint-js-eslint lint-js-prettier

.PHONY: lint-js-eslint
lint-js-eslint:
yarn eslint --quiet=$(quiet) --ignore-pattern "node_modules/" --cache ".*.@(js|ts|tsx)" "**/*.@(js|ts|tsx)"
yarn eslint --quiet=$(quiet) --ignore-pattern "node_modules/" ".*.@(js|ts|tsx)" "**/*.@(js|ts|tsx)"

.PHONY: lint-js-prettier
lint-js-prettier:
Expand Down
6 changes: 5 additions & 1 deletion abr-testing/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name = "pypi"

[packages]
abr-testing = { editable = true, path = "." }
google-api-python-client = "==2.41.0"
google-api-python-client = "*"
httplib2 = "==0.22.0"
types-httplib2 = "*"
oauth2client = "==4.1.3"
Expand All @@ -14,6 +14,10 @@ hardware-testing = {editable = true, path = "../hardware-testing"}
opentrons-shared-data = {editable = true, path = "./../shared-data/python"}
opentrons-hardware = {editable = true, path = "./../hardware", extras=['FLEX']}
opentrons = {editable = true, path = "./../api", extras=['flex-hardware']}
slackclient = "*"
slack-sdk = "*"
scikit-learn = "*"
pandas = "*"

[dev-packages]
atomicwrites = "==1.4.1"
Expand Down
Loading

0 comments on commit a2096b8

Please sign in to comment.