<commit_before># Example Python script to execute the labcas-upload workflow

from gov.nasa.jpl.edrn.labcas.labcas_client import LabcasClient

if __name__ == '__main__':
        
    collection_name = 'IPMN Lesions'
    collection_description = 'Lesions of Intraductal Papillary Mucinous Neoplasm'
    dataset_name = 'P1-06_H03'
    owner_principal = 'uid=anirban,dc=edrn,dc=jpl,dc=nasa,dc=gov'
    dataset_description = 'Lesions images'

    product_type = collection_name.replace(' ','_')
    dataset_id = dataset_name.replace(' ','_') # must match directory name in $LABCAS_STAGING/<product_type>
    labcasClient = LabcasClient()
    
    # print out workflow definition
    #labcasClient.getWorkflowsByEvent("labcas-upload")
    # or equivalently
    labcasClient.getWorkflowById("urn:edrn:LabcasUploadWorkflow")
    
    # required metadata fields
    #./wmgr-client --url http://localhost:9001 --operation --sendEvent --eventName labcas-upload --metaData 
    # --key DatasetId mydata --key ProductType 'MyData' --key Description 'My own data' 
    # --key ProtocolId 1 --key LeadPI '<NAME>' --key ProtocolName 'GSTP1 Methylation' --key OrganSite Lung --key OwnerPrincipal EDRN_CANCER_GROUP
    # --key DataCustodian '<NAME>' --key DataCustodianEmail '<EMAIL>' --key CollaborativeGroup 'Prostate and Urologic'
    metadata = { # required metadata<commit_msg>Updating NIST script<commit_after># Example Python script to execute the labcas-upload workflow

from gov.nasa.jpl.edrn.labcas.labcas_client import LabcasClient

if __name__ == '__main__':
        
    collection_name = 'IPMN Lesions'
    collection_description = 'Lesions of Intraductal Papillary Mucinous Neoplasm'
    dataset_name = 'P1-06_H03'
    #dataset_name = '2016_I_NCIU01'
    owner_principal = 'uid=anirban,dc=edrn,dc=jpl,dc=nasa,dc=gov'
    dataset_description = 'Lesions images'

    product_type = collection_name.replace(' ','_')
    dataset_id = dataset_name.replace(' ','_') # must match directory name in $LABCAS_STAGING/<product_type>
    labcasClient = LabcasClient()
    
    # print out workflow definition
    #labcasClient.getWorkflowsByEvent("labcas-upload")
    # or equivalently
    labcasClient.getWorkflowById("urn:edrn:LabcasUploadWorkflow")
    
    # required metadata fields
    #./wmgr-client --url http://localhost:9001 --operation --sendEvent --eventName labcas-upload --metaData 
    # --key DatasetId mydata --key ProductType 'MyData' --key Description 'My own data' 
    # --key ProtocolId 1 --key LeadPI '<NAME>' --key ProtocolName 'GSTP1 Methylation' --key OrganSite Lung --key OwnerPrincipal EDRN_CANCER_GROUP
    # --key DataCustodian '<NAME>' --key DataCustodianEmail '<EMAIL>' --key CollaborativeGroup 'Prostate and Urologic'
    metadata = { # required metadata
{'fraction_non_alphanumeric': 0.10962856112513523, 'fraction_numerical': 0.01009736747205193, 'mean_word_length': 4.007220216606498, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2145971', 'n_tokens_mistral': 924, 'n_tokens_neox': 875, 'n_words': 213}