A mock up of the interface with Protocol Builder
Go to file
mike cullerton 19bc45a94b Add REVIEW_TYPE and REVIEWTYPENAME to Study Details schema in PB Mock API 2022-03-29 11:44:36 -04:00
.github/workflows updating our github actions. 2022-01-04 12:58:08 -05:00
config Changed the test database to use Postgres, instead of SQLite. 2021-06-23 12:31:10 -04:00
migrations Change column names for required documents to match UVA IRB 2021-11-09 08:58:21 -05:00
pb Add REVIEW_TYPE and REVIEWTYPENAME to Study Details schema in PB Mock API 2022-03-29 11:44:36 -04:00
templates Possible fix for URL error on testing. 2021-07-02 13:00:04 -04:00
tests Add IRB_REVIEW_TYPE to the `irb_info` call in `test_delete_study` 2022-03-25 12:58:36 -04:00
.gitignore Fixes WTForms deprecation warnings 2020-06-16 15:50:46 -04:00
.sonarcloud.properties Adds sonarcloud and coverage reporting. Removes duplicate config file. 2020-06-16 14:45:41 -04:00
.travis.yml Trying to fix a failing build 2022-03-28 15:26:41 -04:00
Dockerfile don't depend on dockerhub for nothin, ever. 2021-04-09 09:53:56 -04:00
Pipfile Added ldap3 2021-01-06 11:16:57 -05:00
Pipfile.lock Bump urllib3 from 1.26.4 to 1.26.5 2021-06-02 00:59:12 +00:00
README.md README updates 2021-01-20 11:03:14 -05:00
docker_run.sh Adds environment variable option for loading sponsors via Docker. Prevents duplicate sponsors from being loaded. 2020-08-14 09:39:05 -04:00
example_data.py Adds environment variable option for loading sponsors via Docker. Prevents duplicate sponsors from being loaded. 2020-08-14 09:39:05 -04:00
run.py Reorganizes files for consistency between repos. Completely refactors Dockerfile to install from wheel. 2020-05-24 18:30:57 -04:00
setup.cfg Reorganizes files for consistency between repos. Completely refactors Dockerfile to install from wheel. 2020-05-24 18:30:57 -04:00
setup.py Reorganizes files for consistency between repos. Completely refactors Dockerfile to install from wheel. 2020-05-24 18:30:57 -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
wsgi.py Fixes root path bug 2020-05-25 11:41:39 -04:00

README.md

sartography/protocol-builder-mock

UVA IRB Protocol Builder Mock

Requirements

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

Database Setup

The database for the CR Connect project will create an empty database for protocol builder as well. We did this because you would only by running this mock in order to support the app. Would be good to have this set up and run as a part of that docker-compose rather than having to spin this up seperately.

With the database running, be sure to execute

flask db upgrade

to set up the database structure.

Starting up Protocol Builder

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

Create an example study

Finally, you will need to connect to the protocol builder mock ui in a web browser (see above url) And use this to connect to create a new study. Be sure the study is owned by the person you are logging in to on CR-Connect. For must development environments this will be dhf8r.

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