From eec94ddb35a1c2619761ce1d56549cb6187c1aed Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 7 Apr 2022 06:29:20 -0600 Subject: [PATCH 1/6] fixes for 2022.04 --- CHANGELOG.md | 12 ++++++++++++ qiita_core/__init__.py | 2 +- qiita_db/__init__.py | 2 +- qiita_db/analysis.py | 4 ++-- qiita_pet/__init__.py | 2 +- .../analysis_handlers/base_handlers.py | 3 +++ qiita_pet/handlers/api_proxy/__init__.py | 2 +- qiita_pet/templates/analysis_selected.html | 18 +++++++++++------- qiita_ware/__init__.py | 2 +- setup.py | 2 +- 10 files changed, 34 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c142b0e6..de4d9e070 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Qiita changelog +Version 2022.04 +--------------- + +* Moved from Python 3.6 to 3.9. +* Added support for Pandas 1.4.0, [details here](https://github.com/qiita-spots/qiita/pull/3174). +* Updated all available JavaScript libraries, [details here](https://github.com/qiita-spots/qiita/pull/3177). +* User can select which metadata to use when creating a new analysis, by default only overlapping metadata in all studies is selected. +* Now we can fully delete users in the backend. +* Fixed outstanding issues to add default workflow to a preparation, [details here](https://github.com/qiita-spots/qiita/issues/3158). +* Fixed the following issues: [3183](https://github.com/qiita-spots/qiita/issues/3183), [3182](https://github.com/qiita-spots/qiita/issues/3182), [3170](https://github.com/qiita-spots/qiita/issues/3170) + + Version 2021.11 --------------- diff --git a/qiita_core/__init__.py b/qiita_core/__init__.py index eae6d2551..17d2f32f9 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__ = "2021.11" +__version__ = "2022.04" diff --git a/qiita_db/__init__.py b/qiita_db/__init__.py index f5b72f836..32be405fa 100644 --- a/qiita_db/__init__.py +++ b/qiita_db/__init__.py @@ -27,7 +27,7 @@ from . import user from . import processing_job -__version__ = "2021.11" +__version__ = "2022.04" __all__ = ["analysis", "artifact", "archive", "base", "commands", "environment_manager", "exceptions", "investigation", "logger", diff --git a/qiita_db/analysis.py b/qiita_db/analysis.py index b21f10a1b..137bd78d9 100644 --- a/qiita_db/analysis.py +++ b/qiita_db/analysis.py @@ -1086,12 +1086,12 @@ def _build_mapping_file(self, samples, rename_dup_samples=False, if si not in sample_infos: si_df = si.to_dataframe() if categories is not None: - si_df = si_df[categories & set(si_df.columns)] + si_df = si_df[set(categories) & set(si_df.columns)] sample_infos[si] = si_df pt = artifact.prep_templates[0] pt_df = pt.to_dataframe() if categories is not None: - pt_df = pt_df[categories & set(pt_df.columns)] + pt_df = pt_df[set(categories) & set(pt_df.columns)] qm = pt_df.join(sample_infos[si], lsuffix="_prep") diff --git a/qiita_pet/__init__.py b/qiita_pet/__init__.py index eae6d2551..17d2f32f9 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__ = "2021.11" +__version__ = "2022.04" diff --git a/qiita_pet/handlers/analysis_handlers/base_handlers.py b/qiita_pet/handlers/analysis_handlers/base_handlers.py index 8000d3884..a063d64f8 100644 --- a/qiita_pet/handlers/analysis_handlers/base_handlers.py +++ b/qiita_pet/handlers/analysis_handlers/base_handlers.py @@ -27,6 +27,9 @@ def post(self): desc = self.get_argument('description') mdsi = self.get_argument('merge_duplicated_sample_ids', False) metadata = self.request.arguments.get('analysis-metadata', None) + # we need to change from bytes to strings + if metadata is not None: + metadata = [m.decode('utf-8') for m in metadata] if mdsi in (b'on', 'on'): mdsi = True diff --git a/qiita_pet/handlers/api_proxy/__init__.py b/qiita_pet/handlers/api_proxy/__init__.py index a00b812af..28c6acb66 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__ = "2021.11" +__version__ = "2022.04" __all__ = ['prep_template_summary_get_req', 'data_types_get_req', 'study_get_req', 'sample_template_filepaths_get_req', diff --git a/qiita_pet/templates/analysis_selected.html b/qiita_pet/templates/analysis_selected.html index a5915a89f..9543a81b8 100644 --- a/qiita_pet/templates/analysis_selected.html +++ b/qiita_pet/templates/analysis_selected.html @@ -72,16 +72,20 @@ if (is_sample) { if (jQuery.inArray(option.text, common_sample_fields) >= 0) { option.selected=true; - $('#analysis-metadata').append( - $('