diff --git a/qiita_pet/handlers/download.py b/qiita_pet/handlers/download.py index 98f19e405..8439f764f 100644 --- a/qiita_pet/handlers/download.py +++ b/qiita_pet/handlers/download.py @@ -113,10 +113,10 @@ def _list_artifact_files_nginx(self, artifact): elif x['fp'].startswith(basedir): spath = x['fp'][basedir_len:] to_download.append( - (spath, spath, str(x['checksum']), str(x['fp_size']))) + (spath, spath, '-', str(x['fp_size']))) else: to_download.append( - (x['fp'], x['fp'], str(x['checksum']), str(x['fp_size']))) + (x['fp'], x['fp'], '-', str(x['fp_size']))) for pt in artifact.prep_templates: qmf = pt.qiime_map_fp @@ -404,7 +404,7 @@ def get(self): basedir_len = len(get_db_files_base_dir()) + 1 fp = x['fp'][basedir_len:] - to_download.append((fp, fp, str(x['checksum']), str(x['fp_size']))) + to_download.append((fp, fp, '-', str(x['fp_size']))) self._write_nginx_file_list(to_download) zip_fn = '%s_%s.zip' % ( diff --git a/qiita_pet/test/test_download.py b/qiita_pet/test/test_download.py index e6e03d40f..a6d0bd82c 100644 --- a/qiita_pet/test/test_download.py +++ b/qiita_pet/test/test_download.py @@ -146,26 +146,26 @@ def test_download_study(self): response = self.get('/download_study_bioms/1') self.assertEqual(response.code, 200) exp = ( - '1579715020 1256812 /protected/processed_data/1_study_1001_closed_' + '- 1256812 /protected/processed_data/1_study_1001_closed_' 'reference_otu_table.biom processed_data/1_study_1001_closed_' 'reference_otu_table.biom\n' '- [0-9]* /protected/templates/1_prep_1_qiime_[0-9]*-' '[0-9]*.txt mapping_files/4_mapping_file.txt\n' - '1579715020 1256812 /protected/processed_data/' + '- 1256812 /protected/processed_data/' '1_study_1001_closed_reference_otu_table.biom processed_data/' '1_study_1001_closed_reference_otu_table.biom\n' '- [0-9]* /protected/templates/1_prep_1_qiime_[0-9]*-' '[0-9]*.txt mapping_files/5_mapping_file.txt\n' - '1579715020 1256812 /protected/processed_data/' + '- 1256812 /protected/processed_data/' '1_study_1001_closed_reference_otu_table_Silva.biom processed_data' '/1_study_1001_closed_reference_otu_table_Silva.biom\n' '- [0-9]* /protected/templates/1_prep_1_qiime_[0-9]*-' '[0-9]*.txt mapping_files/6_mapping_file.txt\n' - '1756512010 1093210 /protected/BIOM/7/biom_table.biom ' + '- 1093210 /protected/BIOM/7/biom_table.biom ' 'BIOM/7/biom_table.biom\n' '- [0-9]* /protected/templates/1_prep_2_qiime_[0-9]*-' '[0-9]*.txt mapping_files/7_mapping_file.txt\n' - '[0-9]* [0-9]* /protected/BIOM/{0}/otu_table.biom ' + '- [0-9]* /protected/BIOM/{0}/otu_table.biom ' 'BIOM/{0}/otu_table.biom\n' '- 1 /protected/BIOM/{0}/sortmerna_picked_otus/seqs_otus.log ' 'BIOM/{0}/sortmerna_picked_otus/seqs_otus.log\n' @@ -237,14 +237,14 @@ def test_download_raw_data(self): self.assertEqual(response.code, 200) exp = ( - '2125826711 58 /protected/raw_data/1_s_G1_L001_sequences.fastq.gz ' + '- 58 /protected/raw_data/1_s_G1_L001_sequences.fastq.gz ' 'raw_data/1_s_G1_L001_sequences.fastq.gz\n' - '2125826711 58 /protected/raw_data/' + '- 58 /protected/raw_data/' '1_s_G1_L001_sequences_barcodes.fastq.gz ' 'raw_data/1_s_G1_L001_sequences_barcodes.fastq.gz\n' '- [0-9]* /protected/templates/1_prep_1_qiime_[0-9]*-[0-9]*.txt ' 'mapping_files/1_mapping_file.txt\n' - '1756512010 1093210 /protected/BIOM/7/biom_table.biom ' + '- 1093210 /protected/BIOM/7/biom_table.biom ' 'BIOM/7/biom_table.biom\n' '- [0-9]* /protected/templates/1_prep_2_qiime_[0-9]*-[0-9]*.txt ' 'mapping_files/7_mapping_file.txt\n') @@ -437,11 +437,11 @@ def test_download(self): '/public_download/?data=biom&study_id=1&data_type=18S') self.assertEqual(response.code, 200) exp = ( - '[0-9]* [0-9]* /protected/processed_data/1_study_1001_closed_' + '- [0-9]* /protected/processed_data/1_study_1001_closed_' 'reference_otu_table.biom processed_data/1_study_1001_closed_' 'reference_otu_table.biom\n- [0-9]* /protected/templates/1_prep_' '1_qiime_[0-9]*-[0-9]*.txt mapping_files/4_mapping_file.txt\n' - '[0-9]* [0-9]* /protected/processed_data/1_study_1001_closed_' + '- [0-9]* /protected/processed_data/1_study_1001_closed_' 'reference_otu_table.biom processed_data/1_study_1001_closed_' 'reference_otu_table.biom\n- [0-9]* /protected/templates/1_prep_1' '_qiime_[0-9]*-[0-9]*.txt mapping_files/5_mapping_file.txt\n') @@ -515,7 +515,7 @@ def test_download(self): response = self.get('/public_artifact_download/?artifact_id=5') self.assertEqual(response.code, 200) exp = ( - '[0-9]* [0-9]* /protected/processed_data/' + '- [0-9]* /protected/processed_data/' '1_study_1001_closed_reference_otu_table.biom ' 'processed_data/1_study_1001_closed_reference_otu_table.biom\n' '- 36762 /protected/templates/1_prep_1_qiime_[0-9]*-[0-9]*.txt ' @@ -541,9 +541,9 @@ def test_download(self): self.assertEqual(response_file.code, 200) exp = ( - '2125826711 58 /protected/raw_data/1_s_G1_L001_sequences.fastq.gz ' + '- 58 /protected/raw_data/1_s_G1_L001_sequences.fastq.gz ' 'raw_data/1_s_G1_L001_sequences.fastq.gz\n' - '2125826711 58 /protected/raw_data/1_s_G1_L001_sequences_barcodes.' + '- 58 /protected/raw_data/1_s_G1_L001_sequences_barcodes.' 'fastq.gz raw_data/1_s_G1_L001_sequences_barcodes.fastq.gz\n' '- 36762 /protected/templates/1_prep_1_qiime_[0-9]*-[0-9]*.txt ' 'mapping_files/1_mapping_file.txt\n'