pip_install = factories.pip_install_task(pip_requirements, default_env='dev') def dependencies(default_env='dev'): """Install requirements for pip, npm, and bower all at once.""" pip_install(default_env) npm_install() bower_install() nltk_init() test = factories.test_task(default_settings='msgvis.settings.test') test_coverage = factories.coverage_task(default_settings='msgvis.settings.test') test_data_path = conf.PROJECT_ROOT / 'setup' / 'fixtures' / 'test_data.json' make_test_data = factories.make_test_data_task(('base', 'api', # 'corpus', 'dimensions', 'datatable', 'importer', 'enhance', 'questions', 'auth', '--exclude=auth.Permission'), test_data_path) load_test_data = factories.load_test_data_task(test_data_path) # Model keys to fixture paths from PROJECT_ROOT model_fixtures = ( ('corpus.Language', 'msgvis/apps/corpus/fixtures/languages.json'), ('corpus.MessageType', 'msgvis/apps/corpus/fixtures/messagetypes.json'), ('corpus.Timezone', 'msgvis/apps/corpus/fixtures/timezones.json'), ('dimensions', 'msgvis/apps/dimensions/fixtures/dimensions.json'), ('questions', 'msgvis/apps/questions/fixtures/questions.json'), ) def generate_fixtures():
pip_install = factories.pip_install_task(pip_requirements, default_env='dev') def dependencies(default_env='dev'): """Install requirements for pip, npm, and bower all at once.""" pip_install(default_env) npm_install() bower_install() test = factories.test_task(default_settings='msgvis.settings.test') test_coverage = factories.coverage_task(default_settings='msgvis.settings.test') test_data_path = conf.PROJECT_ROOT / 'setup' / 'fixtures' / 'test_data.json' make_test_data = factories.make_test_data_task(('base', 'api', # 'corpus', 'dimensions', 'datatable', 'importer', 'enhance', 'questions', 'auth', '--exclude=auth.Permission'), test_data_path) load_test_data = factories.load_test_data_task(test_data_path) # Model keys to fixture paths from PROJECT_ROOT model_fixtures = { 'corpus.Language': 'msgvis/apps/corpus/fixtures/languages.json', 'corpus.MessageType': 'msgvis/apps/corpus/fixtures/messagetypes.json', 'corpus.Timezone': 'msgvis/apps/corpus/fixtures/timezones.json', } def generate_fixtures(app_or_model=None): """
npm_install() bower_install() nltk_init() test = factories.test_task(default_settings='msgvis.settings.test') test_coverage = factories.coverage_task( default_settings='msgvis.settings.test') test_data_path = conf.PROJECT_ROOT / 'setup' / 'fixtures' / 'test_data.json' make_test_data = factories.make_test_data_task( ( 'base', 'api', # 'corpus', 'corpus', 'coding', 'experiment', 'importer', 'enhance', 'auth', '--exclude=auth.Permission'), test_data_path) load_test_data = factories.load_test_data_task(test_data_path) # Model keys to fixture paths from PROJECT_ROOT model_fixtures = ( ('corpus.Language', 'msgvis/apps/corpus/fixtures/languages.json'), ('corpus.MessageType', 'msgvis/apps/corpus/fixtures/messagetypes.json'), ('corpus.Timezone', 'msgvis/apps/corpus/fixtures/timezones.json'), ('dimensions', 'msgvis/apps/dimensions/fixtures/dimensions.json'), ('questions', 'msgvis/apps/questions/fixtures/questions.json'), )
# A dependencies management task dependencies = factories.dependencies_task( { 'dev': ('-r requirements/local.txt',), 'prod': ('-r requirements/prod.txt',), 'test': ('-r requirements/test.txt',), }, default_env='dev' ) test = factories.test_task(default_settings='message_coding.settings.test') test_coverage = factories.coverage_task(default_settings='message_coding.settings.test') test_data_path = conf.PROJECT_ROOT / 'setup' / 'fixtures' / 'test_data.json' make_test_data = factories.make_test_data_task(('base', 'api', 'project', 'dataset', 'coding', 'auth', '--exclude=auth.Permission'), test_data_path) load_test_data = factories.load_test_data_task(test_data_path) def reset_dev(pull=None): """ Fully update the development environment. This is useful after a major update. Runs reset_db, installs dependencies, migrate, load_test_data, and clear_cache. """ print "\n" reset_db() if pull is not None: print "\n"