dax/dax_tools_utils.py
def should_upload_assessor(assessor_obj, assessor_dict, xsitype, version):
    """
    Check if the assessor is ready to be uploaded to XNAT

    :param assessor_obj: pyxnat assessor Eobject
    :param assessor_dict: assessor dictionary
    :param xsitype: xsitype for the assessor (fsData or proc:GenProcData, ...)
    :param version: version for the assessor
    :return: True if the assessor should be upload, False otherwise
    """
    if not assessor_obj.exists():
        if xsitype == DEFAULT_FS_DATATYPE:
            create_freesurfer_assessor(assessor_obj)
        else:
            create_default_assessor(assessor_obj, assessor_dict['proctype'])
    else:
        # Check if not already complete assessor
        procstatus = assessor_obj.attrs.get(xsitype + '/procstatus')
        if is_complete(assessor_dict, procstatus):
            return False
    # set the status to UPLOADING
    assessor_obj.attrs.mset({xsitype + '/procstatus': UPLOADING,
                             xsitype + '/procversion': version})
    return True

    Check if the assessor is ready to be uploaded to XNAT

    :param assessor_obj: pyxnat assessor Eobject
    :param assessor_dict: assessor dictionary
    :param xsitype: xsitype for the assessor (fsData or proc:GenProcData, ...)
    :param version: version for the assessor
    :return: True if the assessor should be upload, False otherwise
    
Check if the assessor is ready to be uploaded to XNAT
Check if the assessor is ready to be uploaded to XNAT
def should_upload_assessor(assessor_obj, assessor_dict, xsitype, version):
    if not assessor_obj.exists():
        if xsitype == DEFAULT_FS_DATATYPE:
            create_freesurfer_assessor(assessor_obj)
        else:
            create_default_assessor(assessor_obj, assessor_dict['proctype'])
    else:
        procstatus = assessor_obj.attrs.get(xsitype + '/procstatus')
        if is_complete(assessor_dict, procstatus):
            return False
    assessor_obj.attrs.mset({xsitype + '/procstatus': UPLOADING,
                             xsitype + '/procversion': version})
    return True
def should_upload_assessor ( assessor_obj , assessor_dict , xsitype , version ) : if not assessor_obj . exists ( ) : if xsitype == DEFAULT_FS_DATATYPE : create_freesurfer_assessor ( assessor_obj ) else : create_default_assessor ( assessor_obj , assessor_dict [ 'proctype' ] ) else : procstatus = assessor_obj . attrs . get ( xsitype + '/procstatus' ) if is_complete ( assessor_dict , procstatus ) : return False assessor_obj . attrs . mset ( { xsitype + '/procstatus' : UPLOADING , xsitype + '/procversion' : version } ) return True
Check if the assessor is ready to be uploaded to XNAT
Check if the assessor is ready to be uploaded to XNAT
"""
    Check if the assessor is ready to be uploaded to XNAT

    :param assessor_obj: pyxnat assessor Eobject
    :param assessor_dict: assessor dictionary
    :param xsitype: xsitype for the assessor (fsData or proc:GenProcData, ...)
    :param version: version for the assessor
    :return: True if the assessor should be upload, False otherwise
    """ # Check if not already complete assessor # set the status to UPLOADING
True if the assessor should be upload, False otherwise
True if the assessor should be upload False otherwise
assessor_obj
pyxnat assessor Eobject
pyxnat assessor Eobject
assessor_dict
None
xsitype
xsitype for the assessor (fsData or proc:GenProcData, ...)
xsitype for the assessor ( fsData or proc : GenProcData ... )
version
version for the assessor
version for the assessor