Skip to content

Commit e6aa09d

Browse files
Merge pull request #3206 from antgonza/2022.07
2022.07
2 parents 9bba2bd + 90fdc92 commit e6aa09d

File tree

13 files changed

+59
-26
lines changed

13 files changed

+59
-26
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Qiita changelog
22

3+
Version 2022.07
4+
---------------
5+
6+
* Users can opt-in to get emails when their jobs change status in their User Information preferences.
7+
* Added BIOM artifact archiving to the system; this unlinks artifacts from the main processing but leaves them in the system in case they are needed in the future.
8+
* Added [qiime2.2022.02](https://github.com/qiita-spots/qp-qiime2/pull/68) to the system; which updated these plugins: qp-qiime2, qtp-biom, qtp-diversity, qtp-visualization
9+
* Users can now select multiple artifacts for analysis [qp-qiime2](https://github.com/qiita-spots/qp-qiime2/pull/69), which gives access to new commands like PCoA biplots.
10+
* [qtp-sequencing](https://github.com/qiita-spots/qtp-sequencing/pull/41/files) now uses fqtools to count the number of sequences in fastq/fastq.gz files as part as the artifact summary.
11+
* Artifact summaries can now be updated [qiita-spots #3205](https://github.com/qiita-spots/qiita/pull/3205).
12+
* Added to the internal (Sequence Processing Pipeline)[https://github.com/qiita-spots/qp-knight-lab-processing] the CHM13 genome so human studies are now filtered by GRCh38 genome + PhiX and CHM13 genome.
13+
314
Version 2022.05
415
-----------------
516

qiita_core/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# The full license is in the file LICENSE, distributed with this software.
77
# -----------------------------------------------------------------------------
88

9-
__version__ = "2022.04"
9+
__version__ = "2022.07"

qiita_db/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
from . import user
2828
from . import processing_job
2929

30-
__version__ = "2022.04"
30+
__version__ = "2022.07"
3131

3232
__all__ = ["analysis", "artifact", "archive", "base", "commands",
3333
"environment_manager", "exceptions", "investigation", "logger",

qiita_db/processing_job.py

+23-10
Original file line numberDiff line numberDiff line change
@@ -753,14 +753,17 @@ def status(self):
753753
qdb.sql_connection.TRN.add(sql, [self.id])
754754
return qdb.sql_connection.TRN.execute_fetchlast()
755755

756-
def _set_status(self, value):
756+
def _set_status(self, value, error_msg=None):
757757
"""Sets the status of the job
758758
759759
Parameters
760760
----------
761761
value : str, {'queued', 'running', 'success', 'error',
762762
'in_construction', 'waiting'}
763763
The new status of the job
764+
error_msg : str, optional
765+
If not None this is the message that is going to be sent to the
766+
user when the value is 'error'
764767
765768
Raises
766769
------
@@ -781,14 +784,22 @@ def _set_status(self, value):
781784
new_status = qdb.util.convert_to_id(
782785
value, "processing_job_status")
783786

784-
if self.user.info['receive_processing_job_emails']:
785-
# skip if software is internal
786-
ignore_software = ('Qiita')
787-
if self.command.software.name not in ignore_software:
788-
subject = ('Job status change: %s (%s)' % (
789-
self.command.name, self.id))
790-
message = ('New status: %s' % (new_status))
791-
qdb.util.send_email(self.user.email, subject, message)
787+
if value not in {'waiting'}:
788+
if self.user.info['receive_processing_job_emails']:
789+
# skip if software is artifact definition
790+
ignore_software = ('artifact definition', )
791+
if self.command.software.name not in ignore_software:
792+
ignore_commands = ('Validate', 'complete_job',
793+
'release_validators')
794+
if self.command.name not in ignore_commands:
795+
subject = 'Job status change: %s (%s)' % (
796+
self.command.name, self.id)
797+
message = 'New status: %s' % (value)
798+
799+
if value == 'error' and error_msg is not None:
800+
message += f'\n\nError:\n{error_msg}'
801+
qdb.util.send_email(
802+
self.user.email, subject, message)
792803

793804
sql = """UPDATE qiita.processing_job
794805
SET processing_job_status_id = %s
@@ -1463,7 +1474,6 @@ def _set_error(self, error):
14631474
raise qdb.exceptions.QiitaDBOperationNotPermittedError(
14641475
"Can only set up the log for jobs whose status is 'error'")
14651476

1466-
self._set_status('error')
14671477
log = qdb.logger.LogEntry.create('Runtime', error)
14681478

14691479
sql = """UPDATE qiita.processing_job
@@ -1476,6 +1486,9 @@ def _set_error(self, error):
14761486
for c in self.children:
14771487
c.complete(False, error="Parent job '%s' failed." % self.id)
14781488

1489+
# set as error after everything is in place
1490+
self._set_status('error', error_msg=error)
1491+
14791492
@property
14801493
def heartbeat(self):
14811494
"""The timestamp of the last heartbeat received from the job

qiita_db/software.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ class Command(qdb.base.QiitaObject):
5151
-------------
5252
create
5353
exists
54-
get_commands_by_input_type(cls, artifact_types, active_only=True,
55-
get_html_generator(cls, artifact_type):
56-
get_validator(cls, artifact_type):
54+
get_commands_by_input_type
55+
get_html_generator
56+
get_validator
5757
5858
See Also
5959
--------

qiita_db/sql_connection.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def _raise_execution_error(self, sql, sql_args, error):
198198
ec_lu = errorcodes.lookup(error.pgcode)
199199
raise ValueError(
200200
"Error running SQL: %s. MSG: %s\n" % (ec_lu, str(error)))
201-
except (KeyError, AttributeError):
201+
except (KeyError, AttributeError, TypeError):
202202
raise ValueError("Error running SQL query: %s" % str(error))
203203

204204
@_checker

qiita_pet/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# The full license is in the file LICENSE, distributed with this software.
77
# -----------------------------------------------------------------------------
88

9-
__version__ = "2022.04"
9+
__version__ = "2022.07"

qiita_pet/handlers/analysis_handlers/listing_handlers.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,15 @@ def get(self):
118118

119119
# finding common metadata fields
120120
metadata = analysis.metadata_categories
121-
common = []
121+
common = {'sample': set(), 'prep': set()}
122122
for i, (_, m) in enumerate(metadata.items()):
123-
if i == 0:
124-
common = {'sample': set(m['sample']), 'prep': set(m['prep'])}
125-
else:
126-
common['sample'] = common['sample'] & set(m['sample'])
127-
common['prep'] = common['prep'] & set(m['prep'])
123+
svals = set(m['sample'])
124+
pvals = set(m['prep'])
125+
if i != 0:
126+
svals = common['sample'] & svals
127+
pvals = common['prep'] & pvals
128+
common['sample'] = svals
129+
common['prep'] = pvals
128130

129131
self.render("analysis_selected.html", sel_data=sel_data,
130132
proc_info=proc_data_info, metadata=metadata, common=common)

qiita_pet/handlers/api_proxy/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
from .user import (user_jobs_get_req)
3939
from .util import check_access, check_fp
4040

41-
__version__ = "2022.04"
41+
__version__ = "2022.07"
4242

4343
__all__ = ['prep_template_summary_get_req', 'data_types_get_req',
4444
'study_get_req', 'sample_template_filepaths_get_req',

qiita_pet/support_files/doc/source/processingdata/processing-recommendations.rst

+4
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ Note that the command produces up to 6 output artifacts based on the aligner and
8787
- Per genome Predictions: contains the per genome level taxonomic predictions BIOM table
8888
- Per gene Predictions: Only WoLr1, contains the per gene level taxonomic predictions BIOM table
8989

90+
.. note::
91+
Woltka provides easy transformations for the "per gene Prediction table" to generate functional
92+
profiles, `more information <https://github.com/qiyunzhu/woltka/blob/master/doc/wol.md#comparison>`
93+
9094
Aligners
9195
^^^^^^^^
9296

qiita_pet/templates/study_ajax/prep_summary.html

+3
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,9 @@
407407
$('#new-prep-name').focus();
408408
$('#new-prep-name').select();
409409
});
410+
411+
qiita_websocket.init(window.location.host + '{% raw qiita_config.portal_dir %}/study/list/socket/', error, error);
412+
qiita_websocket.add_callback('sel', show_alert);
410413
});
411414

412415
function toggleCheckboxes(element){

qiita_ware/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# The full license is in the file LICENSE, distributed with this software.
77
# -----------------------------------------------------------------------------
88

9-
__version__ = "2022.04"
9+
__version__ = "2022.07"

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from setuptools import setup
1111
from glob import glob
1212

13-
__version__ = "2022.04"
13+
__version__ = "2022.07"
1414

1515

1616
classes = """

0 commit comments

Comments
 (0)