A mock up of the interface with Protocol Builder
Go to file
Dan ccdc878bf1 Merge branch 'pb-mock-ldap-search-101' into dev 2021-01-21 12:26:11 -05:00
config Allow overriding the ldap url using the environment. 2021-01-21 12:25:01 -05:00
migrations WIP: Adds sponsor model, mock sponsors list, and form for adding sponsors to a study. 2020-08-12 19:15:16 -04:00
pb Added route for search_ldap 2021-01-06 11:16:36 -05:00
templates Import jquery.min.js 2021-01-06 11:15:46 -05:00
tests Simple test of the Python part of searching LDAP for users 2021-01-06 11:17:41 -05: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 Fixes WTForms deprecation warnings 2020-06-16 15:50:46 -04:00
Dockerfile Goes back to python base 2020-06-16 22:41:27 -04:00
Pipfile Added ldap3 2021-01-06 11:16:57 -05:00
Pipfile.lock Added ldap3 2021-01-06 11:16:57 -05:00
README.md README updates 2021-01-20 11:03:14 -05:00
deploy.sh Disables AWS SQS message to refresh DCOS 2020-06-16 11:09:36 -04: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