A mock up of the interface with Protocol Builder
Go to file
Aaron Louie 3cdb39aecc Adds dev, demo, and training branches 2020-05-11 12:05:05 -04:00
config Sets dev and testing environment variables 2020-04-15 16:49:14 -04:00
migrations Minor cleanup and bug fixes. 2020-02-18 09:25:29 -05:00
static Adds favicon to silence 404 error 2020-04-03 18:14:51 -04:00
templates Adds favicon to silence 404 error 2020-04-03 18:14:51 -04:00
.gitignore Moves styles into scss. Makes things prettier. 2020-02-26 12:17:37 -05:00
.travis.yml Adds dev, demo, and training branches 2020-05-11 12:05:05 -04:00
Dockerfile Exposes correct port. Prints some config settings for debugging. 2020-04-15 13:49:57 -04:00
Pipfile Installs pyscss build dependency 2020-03-25 10:00:07 -04:00
Pipfile.lock Installs pyscss build dependency 2020-03-25 10:00:07 -04:00
README.md stuff to automate deployment. 2020-02-17 16:47:34 -05:00
api.yml All the possible details to pass over from protocol builder. 2020-02-17 16:21:18 -05:00
app.py Prevents duplicate studies and requirements from being created on study update 2020-04-17 11:27:12 -04:00
deploy.sh Tags Docker image with branch, commit, and Travis build number. Deploys to appropriate DC/OS stage after successful Docker push. 2020-05-07 17:03:57 -04:00
docker_run.sh stuff to automate deployment. 2020-02-17 16:47:34 -05:00
forms.py Just auto-increment study ids, don't require them. Creates a big mess. 2020-03-24 16:52:13 -04:00
models.py Adds DSP 2020-05-06 10:38:02 -04:00
run.py Changing the port. 2020-01-08 16:14:16 -05:00
test_sanity.py Prevents duplicate studies and requirements from being created on study update 2020-04-17 11:27:12 -04:00
wait-for-it.sh Converting to use Postgres rather than SQLLite for database so that data might persist between bounces. 2020-03-23 13:57:19 -04:00

README.md

Requirements

  • Python 3
  • pip (for python 3)
  • pipenv (just run pip install pipenv)

Running these examples

pipenv run python run.py

This will start a webserver on localhost at port 5001. To see the api, you can visit http://localhost:5001/pb/ui

For future reference, these are the steps Sartography is taking to set up Mock Services:

  1. mdkir project
  2. cd project
  3. pipenv install
  4. pipenv install flask
  5. pipenv install connexion
  6. place your swagger/openapi file in the root directory
  7. add methods to return example data in the app.py file.

Deploying to staging

We don't have a travis / test environment set up for this yet, no tests but you can build and publish it with:

docker image build -t sartography/protocol-builder-mock:latest .
docker push sartography/protocol-builder-mock:latest