Пример #1
0
 def setUp(self):
     """Connect to MongoDB and clear an existing experiment collection.
     Create experiment manager"""
     m = mongo.MongoDBFactory(db_name='scotest')
     db = m.get_database()
     db.experiments.drop()
     self.mngr = experiments.DefaultExperimentManager(db.experiments)
Пример #2
0
 def setUp(self):
     """Connect to MongoDB and clear an existing model collection.
     Create model regisrty manager"""
     # Read model definitions
     with open(MODELS_FILE, 'r') as f:
         self.models = json.load(f)
     m = mongo.MongoDBFactory(db_name='test_sco')
     db = m.get_database()
     db.models.drop()
     self.engine = engine.SCOEngine(m)
 def setUp(self):
     """Connect to MongoDB and clear an existing modelruns collection.
     Create the model run manager"""
     m = mongo.MongoDBFactory(db_name='scotest')
     db = m.get_database()
     db.predictions.drop()
     if os.path.isdir(TMP_DIR):
         shutil.rmtree(TMP_DIR)
     os.makedirs(TMP_DIR)
     self.mngr = predictions.DefaultModelRunManager(db.modelruns, TMP_DIR)
 def setUp(self):
     """Connect to MongoDB and clear an existing funcdata collection. Ensure
     that data directory exists and is empty. Create functional data
     manager."""
     m = mongo.MongoDBFactory(db_name='scotest')
     db = m.get_database()
     db.fmris.drop()
     if os.path.isdir(FMRIS_DIR):
         shutil.rmtree(FMRIS_DIR)
     os.makedirs(FMRIS_DIR)
     self.mngr = funcdata.DefaultFunctionalDataManager(db.fmris, FMRIS_DIR)
 def setUp(self):
     """Connect to MongoDB and clear an existing subjects collection. Ensure
     that data directory exists and is empty. Then create subject manager."""
     self.SUBJECT_FILE = os.path.join(DATA_DIR, 'subjects/ernie.tar.gz')
     self.FALSE_SUBJECT_FILE = os.path.join(
         DATA_DIR, 'subjects/false-subject.tar.gz')
     m = mongo.MongoDBFactory(db_name='scotest')
     db = m.get_database()
     db.subjects.drop()
     if os.path.isdir(SUBJECT_DIR):
         shutil.rmtree(SUBJECT_DIR)
     os.makedirs(SUBJECT_DIR)
     self.mngr = subjects.DefaultSubjectManager(db.subjects, SUBJECT_DIR)
 def setUp(self):
     """Connect to MongoDB and clear an existing images and image group
     collection. Ensure that data directory exists and is empty. Then create
     object managers."""
     m = mongo.MongoDBFactory(db_name='scotest')
     db = m.get_database()
     db.images.drop()
     db.predimages.drop()
     if os.path.isdir(TMP_DIR):
         shutil.rmtree(TMP_DIR)
     os.makedirs(TMP_DIR)
     self.mngr_images = images.DefaultImageManager(db.images, TMP_DIR)
     self.mngr_predimages = images.DefaultPredictionImageSetManager(
         db.predimages)