Beispiel #1
0
def login(config):
    password = os.environ.get('SPIKEFOREST_PASSWORD', None)
    if not password:
        raise Exception('Environment variable not set: SPIKEFOREST_PASSWORD')
    sf.kbucketConfigRemote(share_id=config['share_id'],
                           write=True,
                           password=os.environ['SPIKEFOREST_PASSWORD'])
Beispiel #2
0
def main():
    # Configure readonly access to kbucket
    sf.kbucketConfigRemote(name='spikeforest1-readonly')
    # sf.kbucketConfigLocal()

    APP = TheApp()
    server = vd.VDOMRServer(APP)
    server.start()
Beispiel #3
0
def main():
    # Configure readonly access to kbucket
    if os.environ.get('SPIKEFOREST_PASSWORD', None):
        print('Configuring kbucket as readwrite')
        sf.kbucketConfigRemote(name='spikeforest1-readwrite',
                               password=os.environ.get('SPIKEFOREST_PASSWORD'))
    else:
        print('Configuring kbucket as readonly')
        sf.kbucketConfigRemote(name='spikeforest1-readonly')

    APP = TheApp()
    server = vd.VDOMRServer(APP)
    server.start()
Beispiel #4
0
if __name__ == '__main__':
    parser = argparse.ArgumentParser(
        description='Run SpikeForest batch processing')
    parser.add_argument('command', help='clear, prepare, run, assemble')
    parser.add_argument('batch_name', help='Name of the batch')
    args = parser.parse_args()

    batch_name = args.batch_name

    spikeforest_password = os.environ.get('SPIKEFOREST_PASSWORD', '')
    if not spikeforest_password:
        raise Exception('Environment variable not set: SPIKEFOREST_PASSWORD')

    print('Loading batch: ' + batch_name)
    sf.kbucketConfigRemote(name='spikeforest1-readwrite',
                           password=spikeforest_password)
    obj = kb.loadObject(key=dict(batch_name=batch_name))
    if not obj:
        raise Exception('Unable to find batches object.')

    command = args.command
    if command == 'clear':
        sf.sf_batch.clear_job_results(batch_name=batch_name,
                                      incomplete_only=False)
    elif command == 'prepare':
        sf.sf_batch.download_recordings(batch_name=batch_name)
        sf.sf_batch.clear_job_results(batch_name=batch_name,
                                      incomplete_only=True)
    elif command == 'run':
        sf.sf_batch.run_jobs(batch_name=batch_name)
    elif command == 'assemble':