aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/redis_tools.py
AgeCommit message (Collapse)Author
2022-08-31Remove usage of "logger" and un-necessary comments wrt the sameMunyoki Kilyungi
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.
2022-04-04Return None in load_json_from_redis when the item doesn't existzsloan
For some reason that isn't clear to me yet, a logged-in user session ID was set even when a user wasn't logged in, causing the user session code to attempt to fetch user information for a non-existent user ID
2021-10-28Remove the use of '@deprecated'BonfaceKilz
This causes noisy logging.
2021-10-25utility: redis_tools: Remove dead functionsBonfaceKilz
2021-10-25Mark `get_resource_info` as deprecatedBonfaceKilz
2021-10-04Changed get_user_groups to pull both the ID and details in the for loop from ↵zsloan
group_list by using group_list.items()
2021-09-10Removed encoding, since it's apparently not needed since the Python 3 ↵zsloan
switchover (and was causing there to be no matches between user IDs and groups)
2021-06-15Fix issue where column values were used as str instead of bytes; pretty sure ↵zsloan
this was introduced by Python3
2021-04-30autopep8: Fix E501BonfaceKilz
2021-03-16Fixed encoding in load_json_from_redis to account for the first that column ↵zsloan
values are sometimes stored as bytes and sometimes as strings
2021-03-16Fixed encoding to make get_user_groups work properly, since the user IDs for ↵zsloan
groups in Redis are stored as strings
2021-02-18Remove the deocde since it was throwing an errorzsloan
2021-02-17Fixed error caused by user IDs being encoded as byteszsloan
2020-11-02Created function for encoding the column value as bytes when fetching from ↵zsloan
the JSON-formatted string pulled from Redis (since this was needed after the Python 3 switchover) * wqflask/utility/redis_tools.py - Created function load_json_from_redis that encodes the key (column_value) when fetching a value from the JSON pulled from Redis
2020-09-26Merge branch 'testing' into build/python3-migrationBonfaceKilz
2020-09-18Apply pep8 formattingBonfaceKilz
2020-09-17Merge branch 'testing' into build/python3-migrationBonfaceKilz
2020-08-31Fixed issue that was causing updating resource default privileges to notzsloan
work * wqflask/utility/redis_tools.py - There was an issue where resources wouldn't be updated if they already existed. This is because the code didn't yet account for the "update" tag (that is meant to give the option of preventing updating resources when running the script to enter all resources into Redis). I changed the logic to add a resource if "update" is True or the resource doesn't already exist (so it won't if update is False and the resource exists).
2020-08-26Remove "from __future__ import new_feature" statementsBonfaceKilz
See: <https://docs.python.org/2/library/2to3.html#2to3fixer-future>
2020-07-22It should add new resources to Redis automatically nowzsloan
2020-07-06Fixed some of the logic with how traits are authenticated to avoid situation ↵zsloan
where a trait is authenticated twice
2020-06-24Temporary partial fix to issue of resources without info; need to add ↵zsloan
something that automatically inserts resources with default privileges
2020-06-17A user's id is now set as a parameter if it doesn't already existauthentication_testzsloan
2020-06-17Adding all the authentication stuffzsloan
2020-06-05Commiting other current group/resource management code, plus the new fileszsloan
2020-06-04Really should have split this into many more commits:zsloan
- Now use proxy to pull trait data and hide traits/results that the user doesn't have view permission for - Created a factory method for creating trait ob so it can return None when user doesn't have view permissions (this is why such a large number of files are changed) - Added metadata to permutation export - Added current group management code - Added fixed password verification e-mail code
2020-05-28Added lines calling proxy for publish datasets + added some resource redis ↵zsloan
queries and a missing import for the hmac functions
2020-05-12Added change for F2s in r/qtl and fixed minor issue in save_user in redis_toolszsloan
2020-05-07Committing current progress on group manager + a minor fix in dataset.pyzsloan
2020-05-06Commiting a few minor changes plus returning rqtl_mapping.py to the same as ↵zsloan
on testing branch before merging Danny's changes and testing them
2020-02-12Fixed issue that broke some logins with the new redis user codezsloan
2020-01-23Forgot to commit new file containing Redis functionszsloan