Skip to content

Python Directories

Siqi Tian edited this page Feb 5, 2017 · 8 revisions
  • Install django-filemanager with the modified version (0.0.2). The source code are available from the backup/backup_config.tgz. The original (0.0.1) is here.
  • Install gviz-api.py. The source code are available from the backup/backup_config.tgz, or download from here.
  • Other dependencies are described in requirements.txt and should be installed via pip system-wide.

The following sections breaks down each directory and their contents.

/ (root)

File Description
requirements.txt Description of python package dependency.
robots.txt Instruction for web crawlers. See here.
manage.py Django script entry point. Do not change, unless syntax changes in newer Django releases.
util_chmod.sh Runs chmod and chown to files and directories to set minimal required permissions. Most files are owned by www-data (the Apache user). config/bot.conf and config/cron.conf are writable by www-data, while others are read-only. *.sh are only accessible by ubuntu.
util_minify.sh Minifies *.css and *.js files for production. Also concatenates cetain *.css and *.js files for fewer requests in production. Requires ../yuicompressor.jar.
util_prep_dir.sh Prepares empty directories and log files for first time setup.
util_src_dist.sh Updates the local copy of primerize package (at /home/ubuntu/NA_Thermo/) to latest master, and (re-)installs it system-wide.
util_sys_asset.sh Copies over essential system settings and packages into config/sys/ that will later be zipped by dj_man backup.

backup/

Contains *.tgz backup files: backup/backup_apache.tgz, backup/backup_config.tgz, backup/backup_mysql.tgz and backup/backup_static.tgz. See src/management/commands/backup.py and src/management/commands/restore.py for usage.

cache/

Contains cache results, cron and Django log files, as well as status text files.

File Description
*.log Log files for cron and Django.
stat_*.json Status JSON files used for admin pages. cache/stat_ver.json contains package versions currently installed, cache/stat_sys.json contains memory and disk capacity; used by /admin/. cache/stat_backup.json contains data/ folder sizes, and daslab Google Drive file list; used by /admin/backup/. cache/stat_dist.json contains distribution info (version tag and comments) of releases in dist/; used by /download/.

config/

Contains app settings and account information. Do not include these files in git! Template files config/*.conf.example are tracked instead.

File Description
arg.conf Default parameters for all demo runs; contains sequences, structures, demo JOB_ID, and other default parameters. Should be adapted from arg.conf.example with no change.
cron.conf List of cron jobs in JSON format. See django-crontab specs. The suffix of each job is for logging into corresponding log files in cache/.
env.conf Server secrets! Contains GitHub webhooks secret, MySQL database, Apache login and email settings for additional admin. See django-environ specs.
err.conf API error codes.
oauth.conf Access token and account information for third-party APIs in JSON format. All vendors are under daslab Gmail account. It also records AWS IDs and Google Analytics ID.
t47_dev.py Django setting flags, isolated from all others.
IS_DEVEL : DEBUG flag. Use 1 for test server, 0 for production.
IS_MAINTENANCE : Flag for temporary server downtime. Set to 1 for downtime, which returns 503 response to all urls.
flow_chart.svg The architecture SVG image shown in the Overview. It is placed here to control access to admin only.
js_app.svg The Javscript public app logics SVG image shown in the Overview. It is placed here to restrict access to admin only.

data/

Contains job results for display and download.

  • Files are named by JOB_ID with prefix of result_.
  • Results are saved to their corresponding category, from data/1d/, data/2d/, and data/3d/.
  • Old files are removed by the cleanup Django command triggered by cron.
File Description
*.html HTML half-pages (lower half excluding Input section) rendered for direct display. They are loaded for job retrieval, or waiting while a job is running.
*.txt, *.zip Downloadable results for the user.
*.json 96-well plate layout specs for the corresponding job result in JSON format, to facilitate drawing by d3.js.

dist/

Contains primerize package releases for download. The meta data for all releases are stored in cache/stat_dist.json. The dj_man dist command automates distribution and meta data.

File Description
Primerize-?.?.?.zip primerize package releases named after their versions.
Primerize-master.zip The latest master branch of the primerize package at https://github.com/DasLab/Primerize/.
Primerize-LICENSE.md The LICENSE statement from the primerize repository to be displayed at /license/.

Clone this wiki locally