diff --git a/CHANGELOG.md b/CHANGELOG.md index d82f40209..3e65b5805 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Qiita changelog +Version 2022.07 +--------------- + +* Users can opt-in to get emails when their jobs change status in their User Information preferences. +* 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. +* 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 +* 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. +* [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. +* Artifact summaries can now be updated [qiita-spots #3205](https://github.com/qiita-spots/qiita/pull/3205). +* 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. + Version 2022.05 ----------------- diff --git a/qiita_core/__init__.py b/qiita_core/__init__.py index 17d2f32f9..97e580f13 100644 --- a/qiita_core/__init__.py +++ b/qiita_core/__init__.py @@ -6,4 +6,4 @@ # The full license is in the file LICENSE, distributed with this software. # ----------------------------------------------------------------------------- -__version__ = "2022.04" +__version__ = "2022.07" diff --git a/qiita_db/__init__.py b/qiita_db/__init__.py index 32be405fa..3bcecc7c7 100644 --- a/qiita_db/__init__.py +++ b/qiita_db/__init__.py @@ -27,7 +27,7 @@ from . import user from . import processing_job -__version__ = "2022.04" +__version__ = "2022.07" __all__ = ["analysis", "artifact", "archive", "base", "commands", "environment_manager", "exceptions", "investigation", "logger", diff --git a/qiita_db/processing_job.py b/qiita_db/processing_job.py index 33bc662f8..5abc7bdb0 100644 --- a/qiita_db/processing_job.py +++ b/qiita_db/processing_job.py @@ -753,7 +753,7 @@ def status(self): qdb.sql_connection.TRN.add(sql, [self.id]) return qdb.sql_connection.TRN.execute_fetchlast() - def _set_status(self, value): + def _set_status(self, value, error_msg=None): """Sets the status of the job Parameters @@ -761,6 +761,9 @@ def _set_status(self, value): value : str, {'queued', 'running', 'success', 'error', 'in_construction', 'waiting'} The new status of the job + error_msg : str, optional + If not None this is the message that is going to be sent to the + user when the value is 'error' Raises ------ @@ -781,14 +784,22 @@ def _set_status(self, value): new_status = qdb.util.convert_to_id( value, "processing_job_status") - if self.user.info['receive_processing_job_emails']: - # skip if software is internal - ignore_software = ('Qiita') - if self.command.software.name not in ignore_software: - subject = ('Job status change: %s (%s)' % ( - self.command.name, self.id)) - message = ('New status: %s' % (new_status)) - qdb.util.send_email(self.user.email, subject, message) + if value not in {'waiting'}: + if self.user.info['receive_processing_job_emails']: + # skip if software is artifact definition + ignore_software = ('artifact definition', ) + if self.command.software.name not in ignore_software: + ignore_commands = ('Validate', 'complete_job', + 'release_validators') + if self.command.name not in ignore_commands: + subject = 'Job status change: %s (%s)' % ( + self.command.name, self.id) + message = 'New status: %s' % (value) + + if value == 'error' and error_msg is not None: + message += f'\n\nError:\n{error_msg}' + qdb.util.send_email( + self.user.email, subject, message) sql = """UPDATE qiita.processing_job SET processing_job_status_id = %s @@ -1463,7 +1474,6 @@ def _set_error(self, error): raise qdb.exceptions.QiitaDBOperationNotPermittedError( "Can only set up the log for jobs whose status is 'error'") - self._set_status('error') log = qdb.logger.LogEntry.create('Runtime', error) sql = """UPDATE qiita.processing_job @@ -1476,6 +1486,9 @@ def _set_error(self, error): for c in self.children: c.complete(False, error="Parent job '%s' failed." % self.id) + # set as error after everything is in place + self._set_status('error', error_msg=error) + @property def heartbeat(self): """The timestamp of the last heartbeat received from the job diff --git a/qiita_db/software.py b/qiita_db/software.py index cd7867518..96fef4fa6 100644 --- a/qiita_db/software.py +++ b/qiita_db/software.py @@ -51,9 +51,9 @@ class Command(qdb.base.QiitaObject): ------------- create exists - get_commands_by_input_type(cls, artifact_types, active_only=True, - get_html_generator(cls, artifact_type): - get_validator(cls, artifact_type): + get_commands_by_input_type + get_html_generator + get_validator See Also -------- diff --git a/qiita_db/sql_connection.py b/qiita_db/sql_connection.py index 2f4855bf3..f539f5071 100644 --- a/qiita_db/sql_connection.py +++ b/qiita_db/sql_connection.py @@ -198,7 +198,7 @@ def _raise_execution_error(self, sql, sql_args, error): ec_lu = errorcodes.lookup(error.pgcode) raise ValueError( "Error running SQL: %s. MSG: %s\n" % (ec_lu, str(error))) - except (KeyError, AttributeError): + except (KeyError, AttributeError, TypeError): raise ValueError("Error running SQL query: %s" % str(error)) @_checker diff --git a/qiita_pet/__init__.py b/qiita_pet/__init__.py index 17d2f32f9..97e580f13 100644 --- a/qiita_pet/__init__.py +++ b/qiita_pet/__init__.py @@ -6,4 +6,4 @@ # The full license is in the file LICENSE, distributed with this software. # ----------------------------------------------------------------------------- -__version__ = "2022.04" +__version__ = "2022.07" diff --git a/qiita_pet/handlers/analysis_handlers/listing_handlers.py b/qiita_pet/handlers/analysis_handlers/listing_handlers.py index e2d509136..8f2e37bb4 100644 --- a/qiita_pet/handlers/analysis_handlers/listing_handlers.py +++ b/qiita_pet/handlers/analysis_handlers/listing_handlers.py @@ -118,13 +118,15 @@ def get(self): # finding common metadata fields metadata = analysis.metadata_categories - common = [] + common = {'sample': set(), 'prep': set()} for i, (_, m) in enumerate(metadata.items()): - if i == 0: - common = {'sample': set(m['sample']), 'prep': set(m['prep'])} - else: - common['sample'] = common['sample'] & set(m['sample']) - common['prep'] = common['prep'] & set(m['prep']) + svals = set(m['sample']) + pvals = set(m['prep']) + if i != 0: + svals = common['sample'] & svals + pvals = common['prep'] & pvals + common['sample'] = svals + common['prep'] = pvals self.render("analysis_selected.html", sel_data=sel_data, proc_info=proc_data_info, metadata=metadata, common=common) diff --git a/qiita_pet/handlers/api_proxy/__init__.py b/qiita_pet/handlers/api_proxy/__init__.py index 28c6acb66..c5d992301 100644 --- a/qiita_pet/handlers/api_proxy/__init__.py +++ b/qiita_pet/handlers/api_proxy/__init__.py @@ -38,7 +38,7 @@ from .user import (user_jobs_get_req) from .util import check_access, check_fp -__version__ = "2022.04" +__version__ = "2022.07" __all__ = ['prep_template_summary_get_req', 'data_types_get_req', 'study_get_req', 'sample_template_filepaths_get_req', diff --git a/qiita_pet/support_files/doc/source/processingdata/processing-recommendations.rst b/qiita_pet/support_files/doc/source/processingdata/processing-recommendations.rst index da6f10a86..ceb2c5a68 100755 --- a/qiita_pet/support_files/doc/source/processingdata/processing-recommendations.rst +++ b/qiita_pet/support_files/doc/source/processingdata/processing-recommendations.rst @@ -87,6 +87,10 @@ Note that the command produces up to 6 output artifacts based on the aligner and - Per genome Predictions: contains the per genome level taxonomic predictions BIOM table - Per gene Predictions: Only WoLr1, contains the per gene level taxonomic predictions BIOM table +.. note:: + Woltka provides easy transformations for the "per gene Prediction table" to generate functional + profiles, `more information ` + Aligners ^^^^^^^^ diff --git a/qiita_pet/templates/study_ajax/prep_summary.html b/qiita_pet/templates/study_ajax/prep_summary.html index be16d8b3f..c4017e4ce 100644 --- a/qiita_pet/templates/study_ajax/prep_summary.html +++ b/qiita_pet/templates/study_ajax/prep_summary.html @@ -407,6 +407,9 @@ $('#new-prep-name').focus(); $('#new-prep-name').select(); }); + + qiita_websocket.init(window.location.host + '{% raw qiita_config.portal_dir %}/study/list/socket/', error, error); + qiita_websocket.add_callback('sel', show_alert); }); function toggleCheckboxes(element){ diff --git a/qiita_ware/__init__.py b/qiita_ware/__init__.py index 17d2f32f9..97e580f13 100644 --- a/qiita_ware/__init__.py +++ b/qiita_ware/__init__.py @@ -6,4 +6,4 @@ # The full license is in the file LICENSE, distributed with this software. # ----------------------------------------------------------------------------- -__version__ = "2022.04" +__version__ = "2022.07" diff --git a/setup.py b/setup.py index 37100736c..3389ec2c0 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ from setuptools import setup from glob import glob -__version__ = "2022.04" +__version__ = "2022.07" classes = """