Workflow

This page explains how to develop this software and the various processes involved. For now, refer to the fabfile for useful shortcut commands.

Fabric Commands

Define common admin and maintenance tasks here. For more info: http://docs.fabfile.org/en/latest/

fabfile.pip_install(environment='dev')

Install pip requirements for an environment: test, prod, [dev]

fabfile.dependencies(default_env='dev')[source]

Install requirements for pip, npm, and bower all at once.

fabfile.test(settings_module='msgvis.settings.test')

Run tests

fabfile.test_coverage(settings_module='msgvis.settings.test')

Run tests with coverage

fabfile.make_test_data(outfile=path(u'/home/docs/checkouts/readthedocs.org/user_builds/textvisdrg/checkouts/latest/setup/fixtures/test_data.json'))

Updates the test_data.json file based on what is in the database

fabfile.load_test_data(infile=path(u'/home/docs/checkouts/readthedocs.org/user_builds/textvisdrg/checkouts/latest/setup/fixtures/test_data.json'))

Load test data from test_data.json

fabfile.generate_fixtures()[source]

Regenerate configured fixtures from the database.

fabfile.load_fixtures()[source]

Replaces the database tables with the contents of fixtures.

fabfile.import_corpus(dataset_file_or_dir)[source]

Import a dataset from a file

fabfile.restart_webserver()[source]

Restart a local gunicorn process

fabfile.supervisor()[source]

Starts the supervisor process

fabfile.deploy(branch=None)[source]

SSH into a remote server, run commands to update deployment, and start the server.

This requires that the server is already running a fairly recent copy of the code.

Furthermore, the app must use a

fabfile.topic_pipeline(dataset, name='my topic model', num_topics=30)[source]

Run the topic pipeline on a dataset

fabfile.info()[source]

Print a bunch of info about the environment

fabfile.nltk_init()

Download required nltk corpora

fabfile.memcached_status()[source]

Display the status of the memcached server

Extra Fabric Commands

A collection of runnable fabric tasks. Make sure to call conf.configure() first!

fabutils.tasks.pull()[source]

Just runs git pull

fabutils.tasks.manage(command)[source]

Run a Django management command.

fabutils.tasks.migrate()[source]

Runs migrations

fabutils.tasks.build_static()[source]

Builds static files for production

fabutils.tasks.docs(easy=None)[source]

Build the documentation

fabutils.tasks.runserver()[source]

Runs the Django development server

fabutils.tasks.reset_db()[source]

Removes all of the tables

fabutils.tasks.clear_cache()[source]

Deletes the cached static files

fabutils.tasks.interpolate_env(outpath=None)[source]

Writes a .env file with variables interpolated from the current environment

fabutils.tasks.check_database()[source]

Makes sure the database is accessible

fabutils.tasks.print_env()[source]

Print the local .env file contents

fabutils.tasks.npm_install()[source]

Install npm requirements

fabutils.tasks.bower_install()[source]

Install bower requirements