merge_machine/api.py
def make_mini(proj):
    '''
    Create sample version of selected file (call just after upload).
    
    GET:
        - project_type: must be "normalize"
        - project_id
    POST:
        - data_params: 
                        {
                        module_name: 'INIT' (mandatory to be init)
                        file_name: 
                        }
        - module_params: {
                            sample_size: 
                            randomize:
                        }
    '''
    assert proj.metadata['project_type'] == 'normalize'
    data_params, module_params = _parse_request()
    
    proj.load_data(data_params['module_name'], data_params['file_name'])
    proj.make_mini(module_params)
    
    # Write transformations and log
    proj.write_data()

    Create sample version of selected file (call just after upload).
    
    GET:
        - project_type: must be "normalize"
        - project_id
    POST:
        - data_params: 
                        {
                        module_name: 'INIT' (mandatory to be init)
                        file_name: 
                        }
        - module_params: {
                            sample_size: 
                            randomize:
                        }
    
Create sample version of selected file (call just after upload).
Create sample version of selected file ( call just after upload ) .
def make_mini(proj):
    assert proj.metadata['project_type'] == 'normalize'
    data_params, module_params = _parse_request()
    proj.load_data(data_params['module_name'], data_params['file_name'])
    proj.make_mini(module_params)
    proj.write_data()
def make_mini ( proj ) : assert proj . metadata [ 'project_type' ] == 'normalize' data_params , module_params = _parse_request ( ) proj . load_data ( data_params [ 'module_name' ] , data_params [ 'file_name' ] ) proj . make_mini ( module_params ) proj . write_data ( )
Create sample version of selected file (call just after upload).
Create sample version of selected file ( call just after upload ) .
'''
    Create sample version of selected file (call just after upload).
    
    GET:
        - project_type: must be "normalize"
        - project_id
    POST:
        - data_params: 
                        {
                        module_name: 'INIT' (mandatory to be init)
                        file_name: 
                        }
        - module_params: {
                            sample_size: 
                            randomize:
                        }
    ''' # Write transformations and log
proj