scripts/check_md5s.py
def validate_md5(job: hb.batch.job, file, md5_path=None) -> hb.batch.job:
    """
    This quickly validates a file and it's md5
    """

    # Calculate md5 checksum.
    md5 = md5_path or f'{file}.md5'
    job.env('GOOGLE_APPLICATION_CREDENTIALS', '/gsa-key/key.json')
    job.command(
        f"""\
gcloud -q auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS
gsutil cat {file} | md5sum | cut -d " " -f1 > /tmp/uploaded.md5
diff <(cat /tmp/uploaded.md5) <(gsutil cat {md5} | cut -d " " -f1)
    """
    )

    return job

    This quickly validates a file and it's md5
    
This quickly validates a file and it's md5
This quickly validates a file and it ' s md5
def validate_md5(job: hb.batch.job, file, md5_path=None) -> hb.batch.job:
    md5 = md5_path or f'{file}.md5'
    job.env('GOOGLE_APPLICATION_CREDENTIALS', '/gsa-key/key.json')
    job.command(
        f"""\
gcloud -q auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS
gsutil cat {file} | md5sum | cut -d " " -f1 > /tmp/uploaded.md5
diff <(cat /tmp/uploaded.md5) <(gsutil cat {md5} | cut -d " " -f1)
    """
    )
    return job
def validate_md5 ( job : hb . batch . job , file , md5_path = None ) -> hb . batch . job : md5 = md5_path or f'{file}.md5' job . env ( 'GOOGLE_APPLICATION_CREDENTIALS' , '/gsa-key/key.json' ) job . command ( f"""\
gcloud -q auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS
gsutil cat {file} | md5sum | cut -d " " -f1 > /tmp/uploaded.md5
diff <(cat /tmp/uploaded.md5) <(gsutil cat {md5} | cut -d " " -f1)
    """ ) return job
This quickly validates a file and it's md5
This quickly validates a file and it ' s md5
"""
    This quickly validates a file and it's md5
    """ # Calculate md5 checksum.
job
hb.batch.job
file
md5_path