diff options
author | Frederick Muriuki Muriithi | 2023-10-06 11:34:54 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-10-06 11:34:54 +0300 |
commit | 164da23e29354a74e30db7348d93860f3d5b4ea1 (patch) | |
tree | ca297dd418aaa3878fe7e0ab253521f277ed10ac | |
parent | e672cf9edc00777a928e492151d06d55e58241e1 (diff) | |
download | genenetwork3-164da23e29354a74e30db7348d93860f3d5b4ea1.tar.gz |
Get `CORRELATION_COMMAND` from current_app not `gn3.settings`
The default settings in `gn3.settings` are meant to be overridden thus the
code should not be importing the setting from there, rather, the code should
get its configurations settings from `flask.current_app.config`.
-rw-r--r-- | gn3/computations/rust_correlation.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gn3/computations/rust_correlation.py b/gn3/computations/rust_correlation.py index 546da0e..1ae26b8 100644 --- a/gn3/computations/rust_correlation.py +++ b/gn3/computations/rust_correlation.py @@ -3,15 +3,15 @@ https://github.com/Alexanderlacuna/correlation_rust """ - import subprocess import json import csv import os +from flask import current_app + from gn3.computations.qtlreaper import create_output_directory from gn3.chancy import random_string -from gn3.settings import CORRELATION_COMMAND from gn3.settings import TMPDIR @@ -54,6 +54,7 @@ def run_correlation( """entry function to call rust correlation""" # pylint: disable=too-many-arguments + CORRELATION_COMMAND = current_app.config["CORRELATION_COMMAND"] # make arg? (tmp_dir, tmp_file) = generate_input_files(dataset) (output_file, json_file) = generate_json_file( tmp_dir=tmp_dir, tmp_file=tmp_file, method=method, delimiter=delimiter, |