Package: propjockey
Propjockey helps you queue up workflows and dynamically change their priorities for running;it's like having a [slipmat](https://en.wikipedia.org/wiki/Slipmat) for scientific computing.Propjockey is a tool for staff managing scientific computingresources to facilitate a user community voting to prioritizecalculation of properties across a database of known entities. Forexample, across a database of entities corresponding to knowncrystalline materials, the full elastic tensor may not already becalculated for each material because such a calculation iscomputationally expensive, not of interest for all materials, etc.The staff managing the growth and dissemination of this database ofmaterial structures and properties wishes to empower the community ofusers consuming the data to help prioritize computational jobs in away that will dovetail with in-house priorities. Propjockey helps withthis, connecting users to details of running workflows and providingemail notification when property calculations complete.* Former name: Interactive Leaderboard for Property Requests and Notification (ILPRN).Example deployment: http://elastic.pj.materialsproject.org/.[Science Gateways 2016](http://sciencegateways.org/gateways2016/) conference: [extended abstract](docs/gateways2016-extended-abstract.pdf) and [talk slides](docs/gateways2016-talk-slides.pdf).## DevelopmentIn a fresh virtualenv:```pip install -e .export FLASK_APP=propjockeyexport FLASK_DEBUG=1export PROPJOCKEY_SETTINGS=$(pwd)/local_settings.pyflask run```There is a provided `local_settings.example.py` to serve as a templatefor your `local_settings.py`, which if stored at the root level willbe `.gitignore`d.Ensure local settings are appropriate for your use case. Functiondefinitions are part of the settings. Hopefully, many of the varioussettings, including some of the functions, will not need to change foryou to get started.## TestingYou can make a test database derived from your real, live data. Thedatabase will be located at mongodb://localhost:27017/propjockey_test andhave entries, votes, and workflows collections. All user emails inyour real data will be aliased to protect user identities. To drop anyexisting test database and generate a new one using your data:```flask make_test_db```Then, to test the code against the test database:```python setup.py test```The `USE_TEST_CLIENTS` local setting enables you to use your testdatabase during development and not just when running automatedtests. This is nice when lacking a reliable/fast network connection.To save your test database to a file for backup/sharing:```mongodump --db=propjockey_test --gzip --archive=propjockey_test.gz```and to restore it during development / on a testing server:```mongorestore --drop db=propjockey_test --gzip --archive=propjockey_test.gz```## DeploymentThere are many officially documented[options](http://flask.pocoo.org/docs/0.11/deploying/) for deploying aFlask app such as this, for example [gunicorn](http://gunicorn.org/)behind an [nginx](https://nginx.org/en/) proxy, e.g.```# activate the virtualenvgunicorn -w 4 -b 0.0.0.0:4000 propjockey:app# and ensure your nginx configuration `proxy_pass`es to 0.0.0.0:4000```An example proxy setup is described at the official Flaskdocumentation[here](http://flask.pocoo.org/docs/0.11/deploying/wsgi-standalone/#proxy-setups).## Running Email Notification as a Cron Job```# activate the virtualenv# cd to directory with local_settings.py# Ensure `USE_TEST_CLIENTS` local setting is Falseexport PROPJOCKEY_SETTINGS=$(pwd)/local_settings.pypython -m propjockey.notify```