Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

tmtsoftware/esw-prototype

Repository files navigation

esw-prototype

Subprojects

  • ocs-api
  • ocs-framework
  • ocs-react4s-app
  • ocs-gateway
  • ocs-client
  • ocs-react-app
  • ocs-testkit
  • react4s-facade

Build Instructions

The build is based on sbt and depends on libraries published to bintray from the csw project.

Pre-requisites before running Components

run csw-services.sh script using tmt-deploy readme - Clone csw-prod git checkout <sha> (sha is mentioned in Libs.scala for csw-prod dependencies) - Run sbt universal:stage - $cd target/universal/stage/bin - $./csw-services.sh start -i en0

Run sample assembly

Follow instructions in readme

Running esw-sequencer

  • Run e.g.
sbt 
sequencer-scripts-test/reStart iris darknight 8000

  • Connect to ammonite REPL
ssh repl@localhost -p8000

Run ocs gateway

sbt
ocs-gateway/reStart

Default port for gateway is 9090 you can override it e.g.

sbt
ocs-gateway/reStart 9000

Run scala.js app

sbt
ocs-react4s-app/fastOptJS::startWebpackDevServer

Open scala.js web app in browser

Open : e.g - localhost:8080 (with webpack dev server) OR Open index.html from intelliJ

Run typescript app (ocs-react-app)

npm install
npm start

ocs-client

ocs-client module exposes componentFactory which is simpler API for resolving assembly or sequencer It also provides standalone app which grants access to components registered with Location service via componentFactory

sbt ocs-client/run

ocs-testkit

It provides mocks for cswServices and sequencerCommandService. It allows to unit test scripts logic by mocking cswServices. Find sample unit test case for script for iris here

react4s-facade

This module provides facade/interface for reactJs and react-dom javascript libraries to be used in ScalaJs.