Skip to content
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
15 changes: 5 additions & 10 deletions qiita_db/test/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -866,10 +866,9 @@ def test_generate_study_list(self):
USER('shared@foo.bar'), 'test_study_1', info=info)

snew_info = {
'status': 'sandbox', 'study_title': 'test_study_1',
'study_title': 'test_study_1',
'metadata_complete': True, 'publication_pid': [],
'artifact_biom_ids': [], 'autoloaded': False,
'ebi_submission_status': 'not submitted',
'study_id': new_study.id, 'ebi_study_accession': None,
'owner': 'Shared', 'shared': [],
'study_abstract': 'Some abstract goes here',
Expand Down Expand Up @@ -943,8 +942,6 @@ def _avoid_duplicated_tests(all_artifacts=False):

# make artifacts of prep 2 public
PREP(2).artifact.visibility = 'public'
exp1[0]['status'] = 'public'
exp_both[0]['status'] = 'public'
_avoid_duplicated_tests()

# make artifacts of prep 1 awaiting_approval
Expand Down Expand Up @@ -977,10 +974,10 @@ def test_generate_study_list_without_artifacts(self):
qdb.user.User('shared@foo.bar'), 'test_study_1', info=info)

exp_info = [
{'status': 'private', 'study_title': (
{'study_title': (
'Identification of the Microbiomes for Cannabis Soils'),
'metadata_complete': True, 'publication_pid': [
'123456', '7891011'], 'ebi_submission_status': 'submitted',
'123456', '7891011'],
'study_id': 1, 'ebi_study_accession': 'EBI123456-BB',
'autoloaded': False,
'study_abstract': (
Expand All @@ -996,9 +993,9 @@ def test_generate_study_list_without_artifacts(self):
'lifecycle.'), 'pi': ('PI_dude@foo.bar', 'PIDude'),
'publication_doi': ['10.100/123456', '10.100/7891011'],
'study_alias': 'Cannabis Soils', 'number_samples_collected': 27},
{'status': 'sandbox', 'study_title': 'test_study_1',
{'study_title': 'test_study_1',
'metadata_complete': True, 'publication_pid': [],
'ebi_submission_status': 'not submitted', 'autoloaded': False,
'autoloaded': False,
'study_id': new_study.id, 'ebi_study_accession': None,
'study_abstract': 'Some abstract goes here',
'pi': ('lab_dude@foo.bar', 'LabDude'), 'publication_doi': [],
Expand Down Expand Up @@ -1284,7 +1281,6 @@ def test_purge_filepaths_test(self):
'study_id': 1,
'owner': 'Dude',
'study_alias': 'Cannabis Soils',
'status': 'private',
'study_abstract':
'This is a preliminary study to examine the microbiota '
'associated with the Cannabis plant. Soils samples '
Expand All @@ -1300,7 +1296,6 @@ def test_purge_filepaths_test(self):
'metadata_complete': True,
'autoloaded': False,
'ebi_study_accession': 'EBI123456-BB',
'ebi_submission_status': 'submitted',
'study_title':
'Identification of the Microbiomes for Cannabis Soils',
'number_samples_collected': 27,
Expand Down
6 changes: 0 additions & 6 deletions qiita_db/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1558,9 +1558,6 @@ def generate_study_list(user, visibility):
del info["shared_with_name"]
del info["shared_with_email"]

study = qdb.study.Study(info['study_id'])
info['status'] = study.status
info['ebi_submission_status'] = study.ebi_submission_status
infolist.append(info)
return infolist

Expand Down Expand Up @@ -1642,9 +1639,6 @@ def generate_study_list_without_artifacts(study_ids, portal=None):
del info["pi_email"]
del info["pi_name"]

study = qdb.study.Study(info['study_id'])
info['status'] = study.status
info['ebi_submission_status'] = study.ebi_submission_status
infolist.append(info)
return infolist

Expand Down
9 changes: 4 additions & 5 deletions qiita_pet/handlers/study_handlers/listing_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,12 @@ def get(self, ignore):

info[i]['pi'] = study_person_linkifier(info[i]['pi'])

info[i]['ebi_info'] = info[i]['ebi_submission_status']
info[i]['ebi_info'] = ''
ebi_study_accession = info[i]['ebi_study_accession']
if ebi_study_accession:
info[i]['ebi_info'] = '%s (%s)' % (
''.join([EBI_LINKIFIER.format(a)
for a in ebi_study_accession.split(',')]),
info[i]['ebi_submission_status'])
info[i]['ebi_info'] = ''.join([
EBI_LINKIFIER.format(a)
for a in ebi_study_accession.split(',')])

# build the table json
results = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ def setUp(self):
'study_title': ('Identification of the Microbiomes for '
'Cannabis Soils'),
'metadata_complete': True,
'ebi_submission_status': 'submitted',
'study_id': 1,
'study_alias': 'Cannabis Soils',
'owner': 'Dude',
Expand Down
2 changes: 0 additions & 2 deletions qiita_pet/templates/list_studies.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
{ "data": "shared" },
{ "data": "pi" },
{ "data": "pubs" },
{ "data": "status" },
{ "data": "ebi_info" },
{ "data": "study_alias" }],
columnDefs: [
Expand Down Expand Up @@ -379,7 +378,6 @@ <h3 class="gray-msg">Your Studies</h3>
<th>Shared With These Users</th>
<th>Principal Investigator</th>
<th>Publications</th>
<th>Status</th>
<th>Qiita EBI submission</th>
<th>Study Alias</th>
</tr>
Expand Down
5 changes: 2 additions & 3 deletions qiita_pet/test/test_qiita_redbiom.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,9 @@ def test_post_errors(self):


DATA = [
{'status': 'private',
'study_title': 'Identification of the Microbiomes for Cannabis Soils',
{'study_title': 'Identification of the Microbiomes for Cannabis Soils',
'metadata_complete': True, 'publication_pid': ['123456', '7891011'],
'ebi_submission_status': 'submitted', 'autoloaded': False,
'autoloaded': False,
'study_id': 1, 'ebi_study_accession': 'EBI123456-BB',
'study_abstract': ('This is a preliminary study to examine the '
'microbiota associated with the Cannabis plant. Soils '
Expand Down