wiki:HeronAdminDev

nearby: DevTools

While we are Using I2B2 for the bulk of the functionality of HERON, heron-admin provides a regulatory enforcement web layer for HERON#governance. HERONTrainingMaterials provides end-user documentation. (Well, it used to; see #1268)

in progress; see ticket:600#comment:11 for context

Automated tests to match HERONTrainingMaterials sure would be nice.

Design

Developer documentation, including doctests, is generated from the code:

Access Policy and Authority Flow

Anyone who can login (via CAS) can review usage stats or sign a system access agreement (which is recorded in REDCap).

Investigators, i.e. faculty and executives, can submit investigator requests (sponsorship, data use) to the DROC.

GraphViz image

Investigators and sponsored users, provided their human subjects training is current and they have signed the system access agreement, can follow the "start i2b2 query tool" link; if they have an acknowledgement on file, they can use i2b2; otherwise, they can acknowledge the disclaimer.

GraphViz image

Module Dependencies

GraphViz image

Development process

genshi template language @@...

see source:raven-j/heron_wsgi/Makefile and source:raven-j/README.rst

Clone Repository

UsingVersionControl: Clone the raven-j (a.k.a Heron Admin) repository from using your preferred method (e.g. TortoiseHg?, Hg command-line, etc.).

2. Setup Virtualenv

If you want use anaconda as virtualenv, please use the following pattern. Please push requirements.sh and requirements.txt to a git repo.

cat requirements.sh
############################################################################################
# Part-1 How did you create the environment (this helps in future if you need to recreate it)
############################################################################################

# conda create -n lav_test_env python=2.7
# source activate lav_test_env

# Now installing pip inside virtul-env
# conda install pip

# I will manually install the latest version of pandas, during this installation, I will
# find out what is the version(by pip freeze), and then I 'll put it in requiremnts.txt.
# pip install pandas

# if you know the exact version, skip the above step and write the exact version in requirements.txt
# Please always write versions for each libary in requiremnts.txt
# pip install -r requiremnts.txt

# if you can't install the certain library with pip, then install with conda
# conda install cx_Oracle

############################################################################################
# Part-2 activate env
############################################################################################

source activate lav_test_env

############################################################################################
# Part-3 Print dependencies as well as child dependencies
############################################################################################

which python
python --version
pip freeze
conda env export

############################################################################################
# Part-4 Run Code
############################################################################################

python test.py

############################################################################################
# Part-5 deactivate env
############################################################################################

source deactivate

dependencies... mysql, cx_Oracle, etc. ... PythonVirtualEnvironment, PythonOnWindows

2.1. Create an associated Python virtualenv (optimally separated from the code).

$ virtualenv <venv-path>

2.2. Activate your virtualenv.

$ source <venv-path>/bin/activate

2.3. Use PIP to install necessary Python

$ cd <raven-j-path>
$ pip install -r requirements.txt

... and (introduced in #653 ldap_cert_653; TODO: merge requirements files) ...

$ cd <raven-j-path>/traincheck/
$ pip install -r requirements.txt

see also PythonVirtualEnvironment, PythonOnWindows, WritingQualityCode#pypy)

Unit test can be run with:

$ python -m doctest <file>

CLI Integration Testing

see GroupOnly/HeronAdmin

History

oops... heron-admin is now ambiguous: support email address and software package.

Last modified 2 months ago Last modified on 03/12/18 09:54:20