dax/dax_tools_utils.py
def upload_results(upload_settings, emailaddress):
    """
    Main function to upload the results / PBS / OUTLOG of assessors
     from the queue folder

    :param upload_settings: dictionary defining the upload information
    :return: None
    """
    if len(os.listdir(RESULTS_DIR)) == 0:
        LOGGER.warn('No data need to be uploaded.\n')
        sys.exit()

    warnings = list()

    for upload_dict in upload_settings:
        with XnatUtils.get_interface(host=upload_dict['host'],
                                     user=upload_dict['username'],
                                     pwd=upload_dict['password']) as xnat:
            LOGGER.info('===================================================\
================')
            proj_str = (upload_dict['projects'] if upload_dict['projects']
                        else 'all')
            LOGGER.info('Connecting to XNAT <%s> to start uploading processes \
for projects: %s' % (upload_dict['host'], proj_str))
            if not XnatUtils.has_dax_datatypes(xnat):
                msg = 'Error: dax datatypes are not installed on xnat <%s>.'
                raise DaxUploadError(msg % (upload_dict['host']))

            # 1) Upload the assessor data
            # For each assessor label that need to be upload :
            LOGGER.info(' - Uploading results for assessors')
            warnings.extend(upload_assessors(xnat, upload_dict['projects']))

            # 2) Upload the PBS files
            # For each file, upload it to the PBS resource
            LOGGER.info(' - Uploading PBS files ...')
            upload_pbs(xnat, upload_dict['projects'])

            # 3) Upload the OUTLOG files not uploaded with processes
            LOGGER.info(' - Checking OUTLOG files to upload them for JOB_FAILED \
jobs ...')
            upload_outlog(xnat, upload_dict['projects'])

    send_warning_emails(warnings, emailaddress)

    Main function to upload the results / PBS / OUTLOG of assessors
     from the queue folder

    :param upload_settings: dictionary defining the upload information
    :return: None
    
Main function to upload the results / PBS / OUTLOG of assessors
from the queue folder
Main function to upload the results / PBS / OUTLOG of assessors from the queue folder
def upload_results(upload_settings, emailaddress):
    if len(os.listdir(RESULTS_DIR)) == 0:
        LOGGER.warn('No data need to be uploaded.\n')
        sys.exit()
    warnings = list()
    for upload_dict in upload_settings:
        with XnatUtils.get_interface(host=upload_dict['host'],
                                     user=upload_dict['username'],
                                     pwd=upload_dict['password']) as xnat:
            LOGGER.info('===================================================\
================')
            proj_str = (upload_dict['projects'] if upload_dict['projects']
                        else 'all')
            LOGGER.info('Connecting to XNAT <%s> to start uploading processes \
for projects: %s' % (upload_dict['host'], proj_str))
            if not XnatUtils.has_dax_datatypes(xnat):
                msg = 'Error: dax datatypes are not installed on xnat <%s>.'
                raise DaxUploadError(msg % (upload_dict['host']))
            LOGGER.info(' - Uploading results for assessors')
            warnings.extend(upload_assessors(xnat, upload_dict['projects']))
            LOGGER.info(' - Uploading PBS files ...')
            upload_pbs(xnat, upload_dict['projects'])
            LOGGER.info(' - Checking OUTLOG files to upload them for JOB_FAILED \
jobs ...')
            upload_outlog(xnat, upload_dict['projects'])
    send_warning_emails(warnings, emailaddress)
def upload_results ( upload_settings , emailaddress ) : if len ( os . listdir ( RESULTS_DIR ) ) == 0 : LOGGER . warn ( 'No data need to be uploaded.\n' ) sys . exit ( ) warnings = list ( ) for upload_dict in upload_settings : with XnatUtils . get_interface ( host = upload_dict [ 'host' ] , user = upload_dict [ 'username' ] , pwd = upload_dict [ 'password' ] ) as xnat : LOGGER . info ( '===================================================\
================' ) proj_str = ( upload_dict [ 'projects' ] if upload_dict [ 'projects' ] else 'all' ) LOGGER . info ( 'Connecting to XNAT <%s> to start uploading processes \
for projects: %s' % ( upload_dict [ 'host' ] , proj_str ) ) if not XnatUtils . has_dax_datatypes ( xnat ) : msg = 'Error: dax datatypes are not installed on xnat <%s>.' raise DaxUploadError ( msg % ( upload_dict [ 'host' ] ) ) LOGGER . info ( ' - Uploading results for assessors' ) warnings . extend ( upload_assessors ( xnat , upload_dict [ 'projects' ] ) ) LOGGER . info ( ' - Uploading PBS files ...' ) upload_pbs ( xnat , upload_dict [ 'projects' ] ) LOGGER . info ( ' - Checking OUTLOG files to upload them for JOB_FAILED \
jobs ...' ) upload_outlog ( xnat , upload_dict [ 'projects' ] ) send_warning_emails ( warnings , emailaddress )
Main function to upload the results / PBS / OUTLOG of assessors
from the queue folder
Main function to upload the results / PBS / OUTLOG of assessors from the queue folder
"""
    Main function to upload the results / PBS / OUTLOG of assessors
     from the queue folder

    :param upload_settings: dictionary defining the upload information
    :return: None
    """ # 1) Upload the assessor data # For each assessor label that need to be upload : # 2) Upload the PBS files # For each file, upload it to the PBS resource # 3) Upload the OUTLOG files not uploaded with processes
None
upload_settings
dictionary defining the upload information
dictionary defining the upload information
emailaddress