Module for building, searching, and updating the PAPER database compression pipeline
(1) git clone respository
(2) Rename all .cfg.test files .cfg inside config directory
replace fields within with correct credentials
(3) Install necessary packages through pip
pip install -r requirements.txt
(4) [In virtualenv if possible] Run python setup.py develop (for altering package)
Due to path setup, package MUST be installed in development mode
python setup.py develop
(5) Further setup required if running docker container or rebuilding database
Main package for modules
Contains modules which directly interact with the paperdata database
Contains modules which directly interact with the paperdistiller database
Contains modules to record the state of each host at any time in the ganglia database
module & scripts for calibration of uv files
NOW DEFUNCT
module & scripts for instantiation of websites for paperdata
Example of how to get all compressed files in database in a certain range julian days and change field is_tapeable to True
from paper.data import dbi as pdbi
dbi = pdbi.DataBaseInterface() <!--instantiate DBI object-->
with dbi.session_scope() as s: <!--instantiate session object as context manager-->
FILE_query = s.query(pdbi.File).join(pdbi.Observation) <!--grabs base query object and joins table-->
<!--filters query to look for particular range of dates and a file type-->
filtered_query = FILE_query.filter(pdbi.File.filetype == 'uvcRRE')\
.filter(pdbi.Observation.julian_day >= 2455903)
.filter(pdbi.Observation.julian_day <= 2456036)
FILEs = filtered_query.all() <!--gets generator of all FILE objects-->
for FILE in FILEs:
FILE.is_tapeable = True
<!--automatically commits to database upon finishing due to context manager-->
GPL. Inside LICENSE file