diff options
author | Munyoki Kilyungi | 2022-08-29 12:11:41 +0300 |
---|---|---|
committer | BonfaceKilz | 2022-08-31 23:14:30 +0300 |
commit | 8c06a9534d3340ff0287b5c70f63b2000b6eb612 (patch) | |
tree | 799c07875ea3fee05b444b3375cfb69c5c277092 /wqflask/base/data_set.py | |
parent | 404d750ca24b3bb5c6284af354776b9bdb7fcef8 (diff) | |
download | genenetwork2-8c06a9534d3340ff0287b5c70f63b2000b6eb612.tar.gz |
Remove usage of "logger" and un-necessary comments wrt the same
Logging is used to introspect variables or notify the commencement of
a given operation. Logging should only be used to log errors. Also,
most of the logging is either "logger.debug" or "logger.info"; and
this won't show up in production/testing since we need a logging level
above "WARNING" for them to show up.
* wqflask/base/data_set.py (create_datasets_list): Remove logger.
(Markers.add_pvalues): Ditto.
(DataSet.retrieve_other_names): Ditto.
* wqflask/base/mrna_assay_tissue_data.py: Ditto.
* wqflask/base/webqtlCaseData.py: Ditto.
* wqflask/db/call.py (fetch1): Ditto.
(gn_server): Ditto.
* wqflask/db/gn_server.py: Ditto.
* wqflask/maintenance/set_resource_defaults.py: Ditto.
* wqflask/utility/Plot.py (find_outliers): Ditto.
* wqflask/utility/gen_geno_ob.py: Ditto.
* wqflask/utility/helper_functions.py: Ditto.
* wqflask/utility/pillow_utils.py: Ditto.
* wqflask/utility/redis_tools.py: Ditto.
* wqflask/wqflask/api/gen_menu.py (get_groups): Ditto.
* wqflask/wqflask/api/mapping.py: Ditto.
* wqflask/wqflask/api/router.py (get_dataset_info): Ditto.
* wqflask/wqflask/collect.py (report_change): Ditto.
* wqflask/wqflask/correlation/corr_scatter_plot.py: Ditto.
* wqflask/wqflask/ctl/ctl_analysis.py (CTL): Ditto.
(CTL.__init__): Ditto.
(CTL.run_analysis): Ditto.
(CTL.process_results): Ditto.
* wqflask/wqflask/db_info.py: Ditto.
* wqflask/wqflask/do_search.py (DoSearch.execute): Ditto.
(DoSearch.mescape): Ditto.
(DoSearch.get_search): Ditto.
(MrnaAssaySearch.run_combined): Ditto.
(MrnaAssaySearch.run): Ditto.
(PhenotypeSearch.run_combined): Ditto.
(GenotypeSearch.get_where_clause): Ditto.
(LrsSearch.get_where_clause): Ditto.
(MeanSearch.run): Ditto.
(RangeSearch.get_where_clause): Ditto.
(PvalueSearch.run): Ditto.
* wqflask/wqflask/docs.py: Ditto.
* wqflask/wqflask/export_traits.py: Ditto.
* wqflask/wqflask/external_tools/send_to_bnw.py: Ditto.
* wqflask/wqflask/external_tools/send_to_geneweaver.py: Ditto.
* wqflask/wqflask/external_tools/send_to_webgestalt.py: Ditto.
* wqflask/wqflask/gsearch.py (GSearch.__init__): Ditto.
* wqflask/wqflask/heatmap/heatmap.py: Ditto.
* wqflask/wqflask/marker_regression/display_mapping_results.py (DisplayMappingResults): Ditto.
* wqflask/wqflask/marker_regression/gemma_mapping.py: Ditto.
* wqflask/wqflask/marker_regression/plink_mapping.py (run_plink): Ditto.
* wqflask/wqflask/marker_regression/qtlreaper_mapping.py (run_reaper): Ditto.
* wqflask/wqflask/marker_regression/rqtl_mapping.py: Ditto.
* wqflask/wqflask/marker_regression/run_mapping.py (RunMapping.__init__): Ditto.
* wqflask/wqflask/parser.py (parse): Ditto.
* wqflask/wqflask/search_results.py (SearchResultPage.__init__): Ditto.
* wqflask/wqflask/update_search_results.py (GSearch.__init__): Ditto.
* wqflask/wqflask/user_login.py (send_email): Ditto.
(logout): Ditto.
(forgot_password_submit): Ditto.
(password_reset): Ditto.
(password_reset_step2): Ditto.
(register): Ditto.
* wqflask/wqflask/user_session.py (create_signed_cookie): Ditto.
Diffstat (limited to 'wqflask/base/data_set.py')
-rw-r--r-- | wqflask/base/data_set.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index 211c6752..8206b67c 100644 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -22,7 +22,6 @@ from dataclasses import field from dataclasses import InitVar from typing import Optional, Dict, List from db.call import fetchall, fetchone, fetch1 -from utility.logger import getLogger from utility.tools import USE_GN_SERVER, USE_REDIS, flat_files, flat_file_exists, GN2_BASE_URL from db.gn_server import menu_main from pprint import pformat as pf @@ -60,8 +59,6 @@ from redis import Redis r = Redis() -logger = getLogger(__name__) - # Used by create_database to instantiate objects # Each subclass will add to this DS_NAME_MAP = {} @@ -200,7 +197,6 @@ def create_datasets_list(): result = r.get(key) if result: - logger.debug("Redis cache hit") datasets = pickle.loads(result) if result is None: @@ -213,10 +209,6 @@ def create_datasets_list(): for dataset_type in type_dict: query = "SELECT Name FROM {}".format(type_dict[dataset_type]) for result in fetchall(query): - # The query at the beginning of this function isn't - # necessary here, but still would rather just reuse - # it logger.debug("type: {}\tname: - # {}".format(dataset_type, result.Name)) dataset = create_dataset(result.Name, dataset_type) datasets.append(dataset) @@ -259,9 +251,6 @@ class Markers: self.markers = markers def add_pvalues(self, p_values): - logger.debug("length of self.markers:", len(self.markers)) - logger.debug("length of p_values:", len(p_values)) - if isinstance(p_values, list): # THIS IS only needed for the case when we are limiting the number of p-values calculated # if len(self.markers) > len(p_values): @@ -664,8 +653,6 @@ class DataSet: """ % (query_args)) except TypeError: - logger.debug( - "Dataset {} is not yet available in GeneNetwork.".format(self.name)) pass def chunk_dataset(self, dataset, n): |