Skip to content

Commit 640de3a

Browse files
committed
addresssing @ElDeveloper comments
1 parent b6cd23f commit 640de3a

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

qiita_db/meta_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def update_redis_stats():
188188
s = stat(fp)
189189
stats.append((dt, s.st_size, strftime('%Y-%m',
190190
localtime(s.st_ctime))))
191-
except:
191+
except OSError:
192192
missing_files.append(fp)
193193

194194
summary = {}

qiita_db/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ def purge_filepaths(delete_files=True):
731731
Parameters
732732
----------
733733
delete_files : bool
734-
if True it will actually delete the files
734+
if True it will actually delete the files, if False print
735735
"""
736736
with qdb.sql_connection.TRN:
737737
# Get all the (table, column) pairs that reference to the filepath
@@ -785,7 +785,7 @@ def empty_trash_upload_folder(delete_files=True):
785785
Parameters
786786
----------
787787
delete_files : bool
788-
if True it will actually delete the files
788+
if True it will actually delete the files, if False print
789789
"""
790790
gfp = partial(join, get_db_files_base_dir())
791791
with qdb.sql_connection.TRN:

qiita_pet/templates/stats.html

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,26 @@
6363
<tr>
6464
<td>
6565
{% for k in number_studies %}
66-
<i>{{k}}</i>: {{number_studies[k]}} <br/>
66+
<i>{{k}}</i>: {{ "{:,}".format(int(number_studies[k])) }} <br/>
67+
{% end %}
68+
{% if num_studies_ebi and num_studies_ebi is not None %}
69+
<i>submitted to EBI</i>: {{ "{:,}".format(int(num_studies_ebi)) }}
6770
{% end %}
68-
<i>submitted to EBI</i>: {{ num_studies_ebi }}
6971
</td>
7072
<td>
7173
{% for k in number_of_samples %}
72-
<i>{{k}}</i>: {{number_of_samples[k]}} <br/>
74+
<i>{{k}}</i>: {{ "{:,}".format(int(number_of_samples[k])) }} <br/>
75+
{% end %}
76+
{% if num_samples_ebi and num_samples_ebi is not None %}
77+
<i>submitted to EBI</i>: {{ "{:,}".format(int(num_samples_ebi)) }} <br/>
78+
{% end %}
79+
{% if number_samples_ebi_prep and number_samples_ebi_prep is not None %}
80+
<i>submitted to EBI (prep)</i>: {{ "{:,}".format(int(number_samples_ebi_prep)) }}
7381
{% end %}
74-
<i>submitted to EBI</i>: {{ num_samples_ebi }} <br/>
75-
<i>submitted to EBI (prep)</i>: {{ number_samples_ebi_prep }}
7682
</td>
77-
<td>{{ num_users }}</td>
83+
{% if num_users and num_users is not None %}
84+
<td>{{ "{:,}".format(int(num_users)) }}</td>
85+
{% end %}
7886
</tr>
7987
</table>
8088
</div>

0 commit comments

Comments
 (0)