Skip to content

Fix 2920 #3042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions qiita_pet/handlers/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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' % (
Expand Down
26 changes: 13 additions & 13 deletions qiita_pet/test/test_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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 '
Expand All @@ -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'
Expand Down