merge_machine/api.py
def _init_project(project_type, 
                 project_id=None, 
                 create_new=False, 
                 display_name=None, 
                 description=None):
    '''
    Runs the appropriate constructor for Linker or Normalizer projects
    
    DEV NOTE: Use this in api calls that have project_type as a variable
    '''
    _check_project_type(project_type)

    project_id = secure_filename(project_id)

    if project_type == 'link':
        proj = ESLinker(project_id=project_id, 
                          create_new=create_new, 
                          display_name=display_name, 
                          description=description)
    else:
        proj = ESNormalizer(project_id=project_id, 
                              create_new=create_new, 
                              display_name=display_name, 
                              description=description)
    
    return proj

    Runs the appropriate constructor for Linker or Normalizer projects
    
    DEV NOTE: Use this in api calls that have project_type as a variable
    
Runs the appropriate constructor for Linker or Normalizer projects
DEV NOTE: Use this in api calls that have project_type as a variable
Runs the appropriate constructor for Linker or Normalizer projects DEV NOTE : Use this in api calls that have project_type as a variable
def _init_project(project_type, 
                 project_id=None, 
                 create_new=False, 
                 display_name=None, 
                 description=None):
    _check_project_type(project_type)
    project_id = secure_filename(project_id)
    if project_type == 'link':
        proj = ESLinker(project_id=project_id, 
                          create_new=create_new, 
                          display_name=display_name, 
                          description=description)
    else:
        proj = ESNormalizer(project_id=project_id, 
                              create_new=create_new, 
                              display_name=display_name, 
                              description=description)
    return proj
def _init_project ( project_type , project_id = None , create_new = False , display_name = None , description = None ) : _check_project_type ( project_type ) project_id = secure_filename ( project_id ) if project_type == 'link' : proj = ESLinker ( project_id = project_id , create_new = create_new , display_name = display_name , description = description ) else : proj = ESNormalizer ( project_id = project_id , create_new = create_new , display_name = display_name , description = description ) return proj
Runs the appropriate constructor for Linker or Normalizer projects
DEV NOTE: Use this in api calls that have project_type as a variable
Runs the appropriate constructor for Linker or Normalizer projects DEV NOTE : Use this in api calls that have project_type as a variable
'''
    Runs the appropriate constructor for Linker or Normalizer projects
    
    DEV NOTE: Use this in api calls that have project_type as a variable
    '''
project_type
project_id
create_new
display_name
description