from pymongo import MongoClient
import json
import sys
import emission.core.get_database as edb
from emission.tests import common

def purgeAnalysisData():
  edb.get_analysis_timeseries_db().remove()
  edb.get_common_place_db().remove()
  edb.get_common_trip_db().remove()
  edb.get_pipeline_state_db().remove()

if __name__ == '__main__':
  if len(sys.argv) == 0:
    print "USAGE: %s [userName]" % sys.argv[0]
    exit(1)

  purgeAnalysisData()

Reset the emisson state as well
Reset the emisson state as well

Similar to 96eff63790e28741f45f0875fe888687b803eb6e but for emission users.
Ideally this should only include the analysis_db, but we need the pipeline
info, and Josh created two extra collections for the common trips and common
places.
