Skip to content

Files

Latest commit

 

History

History
 
 

app

OT-App

Overview

Our app is built with Electron. The structure and configuration of bundling, testing and packaging are based on this great repo.

You can read great coverage of some tools that are used in our stack here. Note, our front-end framework of choice is Vue.js which dictates our choice of test tools: Karma, Mocha, Chai and Istanbul

Structure

  • ui — front-end assets. Corresponds to Electron's renderer process If you change webpack's libraryTarge to var you can run it in the browser
  • shell — Corresponds to Electron's main process. Entry-point of the app, starts opentrons API server locally and loads the UI.
  • Make sure to build API exe first, as we are embedding it into the app

Build

Install OT-App dependencies.

cd app
make install

Build and package the app

make build package
# Optionally test
make test
# For end-to-end click-through test
make test-e2e

Develop

If you want to play with the code base and make some changes, feel free to do so.

Start Python API Server (in a separate terminal):

cd api
export ENABLE_VIRTUAL_SMOOTHIE=true; python opentrons/server/main.py

Install dev tools:

cd app
# Install development tools that are not part of package.json
npm i electron-debug
npm i vue-devtools

Run OT-App in development mode. This will open development tools and connect to the API Server already running (instead of starting it from app/bin/opentrons-api-server):

#	Run in the `app` directory
make dev