Metadata-Version: 2.1
Name: studygovernor
Version: 7.0.0
Summary: Study Governor is a controller for data in large population imaging studies.
Home-page: https://gitlab.com/radiology/infrastructure/study-governor
Author: H.C. Achterberg, M. Koek, A. Versteeg, M. Birhanu
Author-email: h.achterberg@erasmusmc.nl, m.koek@erasmusmc.nl, a.versteeg@erasmusmc.nl, m.birhanu@erasmusmc.nl
License: Apache 2.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: System :: Logging
Classifier: Topic :: Utilities
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: alembic (==1.7.7)
Requires-Dist: bcrypt (==3.2.0)
Requires-Dist: bleach (==5.0.1)
Requires-Dist: celery (==5.2.7)
Requires-Dist: email-validator (==1.1.3)
Requires-Dist: Flask (==2.0.3)
Requires-Dist: Flask-BabelEx (==0.9.4)
Requires-Dist: Flask-Login (==0.5.0)
Requires-Dist: Flask-Mail (==0.9.1)
Requires-Dist: Flask-Migrate (==3.1.0)
Requires-Dist: flask-restx (==0.5.1)
Requires-Dist: Flask-Security-Too (==4.1.3)
Requires-Dist: flask-shell-ipython (==0.4.1)
Requires-Dist: Flask-SQLAlchemy (==2.5.1)
Requires-Dist: Flask-WTF (==1.0)
Requires-Dist: idna (==3.3)
Requires-Dist: importlib-metadata (<5.0.0)
Requires-Dist: jedi (==0.17.2)
Requires-Dist: markupsafe (==2.1.1)
Requires-Dist: Pygments (==2.13.0)
Requires-Dist: PyMySQL (==1.0.2)
Requires-Dist: python-dotenv (==0.19.2)
Requires-Dist: PyYAML (==6.0)
Requires-Dist: requests (<3.0,>=2.27.1)
Requires-Dist: sqlalchemy (==1.4.32)
Requires-Dist: studygovernor-client (>=0.4.0)
Requires-Dist: task-client (==1.0.1)
Requires-Dist: Werkzeug (==2.0.3)
Requires-Dist: WTForms (==2.3.3)

Study Governor is a controller for data in large population imaging studies.

Documentation
=============

The Study Governor is documented at https://idsp-study-governor.readthedocs.io/


Setting up development environment for kubernetes
=================================================

You need a number of tools to start developing for the Study Governor on kubernetes locally.

 1. Docker: https://www.docker.com/
 2. k3d: https://k3d.io
 3. helm: https://helm.sh/
 4. Tilt: https://tilt.dev/


Installation and operation instructions
=======================================

 1. Install `mysql` and `libmysqlclient-dev` (e.g. `sudo apt-get install mysql-server libmysqlclient-dev`)
 2. Run `python setup.py install` (or `python setup.py develop` inside a virtualenv if developing)
 3. Create the database in the following way:

``
# Go the mysql command line (add the -p if you have set a root password).
$ sudo mysql (-p)

# Create user
mysql> CREATE USER 'studygovernor'@'localhost' IDENTIFIED BY 'blaat123';

# Create database
mysql> CREATE DATABASE studygovernor;

# Grant all permissions of the database to the user.
mysql> GRANT ALL ON studygovernor.* TO 'studygovernor'@'localhost';
``

 4. Run `studygov-db-init` to initialize the database.


Adding some stuff via REST
==========================

>>> sub = {'label': 'sub_001', 'date_of_birth': '2000-12-25'}
>>> requests.post('http://localhost:5000/api/v1/subjects', json=sub)
>>> exp = {'label': 'exp_001', 'subject': '/api/v1/subjects/1', 'scandate': datetime.datetime.now().isoformat()}
>>> requests.post('http://localhost:5000/api/v1/experiments', json=exp)
>>> requests.get('http://localhost:5000/api/v1/experiments/1/state')
>>> requests.put('http://localhost:5000/api/v1/experiments/1/state', json={'state': '/api/v1/states/3'})
