A mock up of the interface with Protocol Builder
Go to file
Dan Funk 43a9a66d63 Minor cleanup and bug fixes. 2020-02-18 09:25:29 -05:00
migrations Minor cleanup and bug fixes. 2020-02-18 09:25:29 -05:00
templates All the possible details to pass over from protocol builder. 2020-02-17 16:21:18 -05:00
.gitignore Minor cleanup and bug fixes. 2020-02-18 09:25:29 -05:00
.travis.yml stuff to automate deployment. 2020-02-17 16:47:34 -05:00
Dockerfile Initializing project. 2020-01-08 15:57:00 -05:00
Pipfile stuff to automate deployment. 2020-02-17 16:47:34 -05:00
Pipfile.lock stuff to automate deployment. 2020-02-17 16:47:34 -05: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 Minor cleanup and bug fixes. 2020-02-18 09:25:29 -05:00
docker_push.sh stuff to automate deployment. 2020-02-17 16:47:34 -05:00
docker_run.sh stuff to automate deployment. 2020-02-17 16:47:34 -05:00
forms.py All the possible details to pass over from protocol builder. 2020-02-17 16:21:18 -05:00
models.py A sanity test. 2020-02-17 17:30:55 -05:00
run.py Changing the port. 2020-01-08 16:14:16 -05:00
test_sanity.py A sanity test. 2020-02-17 17:30:55 -05: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